Thursday, December 26, 2019

Re: Duplication of Query - reg

Hi,

That could be a behavior of a template tag or a "for" block in the template.
You may consider to use ".select_related" and ".prefetch_related" in view.

Saygılarımla,
Sencer HAMARAT



On Fri, Dec 27, 2019 at 4:59 AM Raja Sekar Sambath <apkrajar@gmail.com> wrote:
Hi,

I have a table of data with self relation , I am Querying all records and displaying them in tabular format in a template

I find a strange behaviour that the query has been executed recursively for each records of table, any better / suggestion solution for this issue.





--
Thanks & Regards,

Raja Sekar Sampath
+91 9087434567.

--
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/CAAS5AE7EfWrDp7V_b-Uw%3DOFB-O02nXr%3De5ODomEH1sRUB3QeFg%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/CACp8TZjKuYgbrFa7qudc7fCBqufZG3q7nf-QZyPWpbNXpzZgYQ%40mail.gmail.com.

No comments:

Post a Comment