Now I'm facing one problem whenever I'm trying to iterate a loop I'm
getting too many SQL variables. Actually after iterating the loop I want to
render all the value in the template.
if could you resolve this it would be very good for me.
Thank you for your time and response
Regards,
Soumen
On T
Profile.objects.filter().select_related("user").prefetch_related("location")
On Thu, May 28, 2020, 2:01 AM Soumen Khatua
wrote:
> I also know about this concept but I don't how I can achieve it, Could
> you give me an example?
> Suppose I have:
>
>
>
>
>
>
>
> *class Profile(models.Model):us
I also know about this concept but I don't how I can achieve it, Could
you give me an example?
Suppose I have:
*class Profile(models.Model):user = models.OneToOneField(
settings.AUTH_USER_MODEL,on_delete = models.CASCADE,
related_name="profile")location = models.ManyToMan
select_related for fk and prefetch_related for m2m in django, you can chain
them together
Regards,
Chetan Ganji
+91-900-483-4183
ganji.che...@gmail.com
http://ryucoder.in
On Wed, May 27, 2020 at 4:51 PM Soumen Khatua
wrote:
> Hi Folks,
> I have many to many relationships and Foreign Key in the
4 matches
Mail list logo