On Thu, Nov 1, 2018 at 8:14 PM Jonathan Berger <jonathanberger@gmail.com> wrote:
Per the db and model FAQ: expected behavior is that 'connection.queries' should contain a list of all SQL queries made by an app.I'm finding actual behavior for a Form subclass that has a ModelMultipleChoiceField with a default queryset, does not add that query to 'connection.queries'. This violates expected behavior.
https://docs.djangoproject.com/en/2.1/ref/forms/fields/#django.forms.ModelChoiceField.queryset notes the queryset is "evaluated when the form is rendered." ...are you rendering the form or just instantiating it (per the subject)?
Karen
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACS9racCtAAgPLwv7-SBw-40Sddge_r9hpBS5eDBqE_1GGJbqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment