Re: [Django] #31879: Changing a model formset's queryset has no effect when self.forms is accessed

2020-08-13 Thread Django
#31879: Changing a model formset's queryset has no effect when self.forms is
accessed
---+--
 Reporter:  kemar  |Owner:  nobody
 Type:  Uncategorized  |   Status:  closed
Component:  Forms  |  Version:  3.1
 Severity:  Normal |   Resolution:  invalid
 Keywords:  formsets   | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by kemar):

 Understood. Thank you for taking the time to answer so carefully.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #31879: Changing a model formset's queryset has no effect when self.forms is accessed

2020-08-13 Thread Django
#31879: Changing a model formset's queryset has no effect when self.forms is
accessed
---+--
 Reporter:  kemar  |Owner:  nobody
 Type:  Uncategorized  |   Status:  closed
Component:  Forms  |  Version:  3.1
 Severity:  Normal |   Resolution:  invalid
 Keywords:  formsets   | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Carlton Gibson):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 This is expected behaviour. We call `get_queryset()` when generating the
 forms — if you generate them before setting the `queryset` attribute then
 it'll be too late to have effect. The underlying `_queryset` cache is an
 optimisation for almost all use-cases. It can be cleared, or you can
 override `get_queryset()` if needed.

 Please don't use the issue tracker for this kind of usage question. See
 TicketClosingReasons/UseSupportChannels. Thanks.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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