Wednesday, October 13, 2021

Re: Child data table in Django

Dear Sebstian,

Thank you for your email. Frankly speaking I do not have the code for that kind of table. I used to use the usual datatable but now I want to implement the one with child row as the image I attached previously.

Regards, 

On Wed, 13 Oct 2021 at 15:30, Sebastian Jung <sebastian.jung2@gmail.com> wrote:
Hello eugene,

You have implement also jquery >= 3.5.1 and datatablea.min.js

Please show us your html code and javascript code that open row when you click on this item...

Regards

Eugene TUYIZERE <eugenetuyizere@gmail.com> schrieb am Mi., 13. Okt. 2021, 14:05:
Dear All,

Kindly assist me to have a tutorial or code to make this kind of table in django. I failed to do this from the datatable .net tutorial.


regards, 

--
 Eugene

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABxpZHuY_zoSvcwQL79UPts6g%3DmJRD%3DO_B%2Bc5%3DvinOtPKNLFLw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKGT9mxwBrDNvAGSqXkoXhKkvaNowY45LiCWgLzWxgiytJPZbw%40mail.gmail.com.


--
TUYIZERE Eugene

Msc Degree in Mathematical Science

African Institute for Mathematical Sciences (AIMS Cameroon)
Crystal Garden-Lime, Cameroon


Bsc in Computer Science

UR-Nyagatare Campus

Email: eugene.tuyizere@aims-cameroon.org
           eugenetuyizere@gmail.com

Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABxpZHupRhi6z8KH%2BrT5hapSfa3hRSV%2B7NsTf7cA9KAkb4TmiA%40mail.gmail.com.

Re: Child data table in Django

Hello eugene,

You have implement also jquery >= 3.5.1 and datatablea.min.js

Please show us your html code and javascript code that open row when you click on this item...

Regards

Eugene TUYIZERE <eugenetuyizere@gmail.com> schrieb am Mi., 13. Okt. 2021, 14:05:
Dear All,

Kindly assist me to have a tutorial or code to make this kind of table in django. I failed to do this from the datatable .net tutorial.


regards, 

--
 Eugene

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABxpZHuY_zoSvcwQL79UPts6g%3DmJRD%3DO_B%2Bc5%3DvinOtPKNLFLw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKGT9mxwBrDNvAGSqXkoXhKkvaNowY45LiCWgLzWxgiytJPZbw%40mail.gmail.com.

Re: Child data table in Django

I want to make the same as this below but using django. That is what I want. The data are in one table but display shows child table 


any one help please

On Wed, 13 Oct 2021 at 14:28, Ammar Mohammed <amarben1000@gmail.com> wrote:
Hello Dear

You can use djangos prefetch_related in the docs :

prefetch_related()

prefetch_related(*lookups)

Returns a QuerySet that will automatically retrieve, in a single batch, related objects for each of the specified lookups.

This has a similar purpose to select_related, in that both are designed to stop the deluge of database queries that is caused by accessing related objects, but the strategy is quite different.

select_related works by creating an SQL join and including the fields of the related object in the SELECT statement. For this reason, select_related gets the related objects in the same database query. However, to avoid the much larger result set that would result from joining across a 'many' relationship, select_related is limited to single-valued relationships - foreign key and one-to-one.

prefetch_related, on the other hand, does a separate lookup for each relationship, and does the 'joining' in Python. This allows it to prefetch many-to-many and many-to-one objects, which cannot be done using select_related, in addition to the foreign key and one-to-one relationships that are supported by select_related. It also supports prefetching of GenericRelation and GenericForeignKey, however, it must be restricted to a homogeneous set of results. For example, prefetching objects referenced by a GenericForeignKey is only supported if the query is restricted to one ContentType.

For example, suppose you have these models:

from django.db import models    class Topping(models.Model):      name = models.CharField(max_length=30)    class Pizza(models.Model):      name = models.CharField(max_length=50)      toppings = models.ManyToManyField(Topping)        def __str__(self):              # __unicode__ on Python 2          return "%s (%s)" % (              self.name,              ", ".join(topping.name for topping in self.toppings.all()),          )  

and run:


On Wed, 13 Oct 2021, 2:06 PM Eugene TUYIZERE, <eugenetuyizere@gmail.com> wrote:
Dear All,

Kindly assist me to have a tutorial or code to make this kind of table in django. I failed to do this from the datatable .net tutorial.


regards, 

--
 Eugene

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABxpZHuY_zoSvcwQL79UPts6g%3DmJRD%3DO_B%2Bc5%3DvinOtPKNLFLw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHs1H7vL%3Dzawt%2BqPiBU1qrZojSLpdjZuMWYiWT3jic-8dZfTEw%40mail.gmail.com.


--
TUYIZERE Eugene

Msc Degree in Mathematical Science

African Institute for Mathematical Sciences (AIMS Cameroon)
Crystal Garden-Lime, Cameroon


Bsc in Computer Science

UR-Nyagatare Campus

Email: eugene.tuyizere@aims-cameroon.org
           eugenetuyizere@gmail.com

Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABxpZHtwZg6JVSMa4Gbc%2B2cb1obRNs5mxsX95qghNAsM23%2B%2BUg%40mail.gmail.com.

Re: Child data table in Django

Hello Dear

You can use djangos prefetch_related in the docs :

prefetch_related()

prefetch_related(*lookups)

Returns a QuerySet that will automatically retrieve, in a single batch, related objects for each of the specified lookups.

This has a similar purpose to select_related, in that both are designed to stop the deluge of database queries that is caused by accessing related objects, but the strategy is quite different.

select_related works by creating an SQL join and including the fields of the related object in the SELECT statement. For this reason, select_related gets the related objects in the same database query. However, to avoid the much larger result set that would result from joining across a 'many' relationship, select_related is limited to single-valued relationships - foreign key and one-to-one.

prefetch_related, on the other hand, does a separate lookup for each relationship, and does the 'joining' in Python. This allows it to prefetch many-to-many and many-to-one objects, which cannot be done using select_related, in addition to the foreign key and one-to-one relationships that are supported by select_related. It also supports prefetching of GenericRelation and GenericForeignKey, however, it must be restricted to a homogeneous set of results. For example, prefetching objects referenced by a GenericForeignKey is only supported if the query is restricted to one ContentType.

For example, suppose you have these models:

from django.db import models    class Topping(models.Model):      name = models.CharField(max_length=30)    class Pizza(models.Model):      name = models.CharField(max_length=50)      toppings = models.ManyToManyField(Topping)        def __str__(self):              # __unicode__ on Python 2          return "%s (%s)" % (              self.name,              ", ".join(topping.name for topping in self.toppings.all()),          )  

and run:


On Wed, 13 Oct 2021, 2:06 PM Eugene TUYIZERE, <eugenetuyizere@gmail.com> wrote:
Dear All,

Kindly assist me to have a tutorial or code to make this kind of table in django. I failed to do this from the datatable .net tutorial.


regards, 

--
 Eugene

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABxpZHuY_zoSvcwQL79UPts6g%3DmJRD%3DO_B%2Bc5%3DvinOtPKNLFLw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHs1H7vL%3Dzawt%2BqPiBU1qrZojSLpdjZuMWYiWT3jic-8dZfTEw%40mail.gmail.com.

Child data table in Django

Dear All,

Kindly assist me to have a tutorial or code to make this kind of table in django. I failed to do this from the datatable .net tutorial.


regards, 

--
 Eugene

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABxpZHuY_zoSvcwQL79UPts6g%3DmJRD%3DO_B%2Bc5%3DvinOtPKNLFLw%40mail.gmail.com.

Tuesday, October 12, 2021

Re: Invalid parameter: redirect_uri

It works when I try to access keycloak from 127.0.0.1 but not localhost so it looks like a keycloak setup issue, not a keycloak implementation problem.

On Tue, Oct 12, 2021 at 12:01 PM Ammon Quackenbush <aq229@chem.byu.edu> wrote:
Setting LOGIN_REDIRECT_URL works in that I am redirected to that URL after I log in. I still see the error when I click on the login screen, though.

On Tuesday, October 12, 2021 at 7:52:04 AM UTC-6 Anil Felipe Duggirala wrote:
On Mon, Oct 11, 2021, at 5:40 PM, Ammon Quackenbush wrote:
> I can set the logout redirect url successfully with LOGOUT_REDIRECT_URL
> in my project's settings.py, but I still get this error when I try to
> log in.
>
> On Thursday, October 7, 2021 at 3:54:24 PM UTC-6 Ammon Quackenbush wrote:
>> I am setting up keycloak with a django webapp and this is the error I am getting:
>>
>> WE'RE *SORRY* ...
>> Invalid parameter: redirect_uri
>>
>>
>>
>> I have tried setting the LOGOUT_REDIRECT_URL and POST_LOGOUT_REDIRECT_URL settings in my project settings.py but that had no effect.
>>
>> Any ideas on how I can fix this?

Have you set the LOGIN_REDIRECT_URL ?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAAMJ1qY%2BHjYiTcaCUbGAB734y%3DWQ1EahKmYiO-h5AOBqYZKOFg%40mail.gmail.com.

Re: Invalid parameter: redirect_uri

Setting LOGIN_REDIRECT_URL works in that I am redirected to that URL after I log in. I still see the error when I click on the login screen, though.

On Tuesday, October 12, 2021 at 7:52:04 AM UTC-6 Anil Felipe Duggirala wrote:
On Mon, Oct 11, 2021, at 5:40 PM, Ammon Quackenbush wrote:
> I can set the logout redirect url successfully with LOGOUT_REDIRECT_URL
> in my project's settings.py, but I still get this error when I try to
> log in.
>
> On Thursday, October 7, 2021 at 3:54:24 PM UTC-6 Ammon Quackenbush wrote:
>> I am setting up keycloak with a django webapp and this is the error I am getting:
>>
>> WE'RE *SORRY* ...
>> Invalid parameter: redirect_uri
>>
>>
>>
>> I have tried setting the LOGOUT_REDIRECT_URL and POST_LOGOUT_REDIRECT_URL settings in my project settings.py but that had no effect.
>>
>> Any ideas on how I can fix this?

Have you set the LOGIN_REDIRECT_URL ?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a5de3f4f-beb5-4d2d-8fca-08adb1f8a197n%40googlegroups.com.