#9076: Inline forms can result in a "Please correct the errors below." message
with no errors listed.
---------------------------------+------------------------------------------
Reporter: coady | Owner: nobody
Status: reopened | Milestone:
Component: Forms | Version: 1.0
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------+------------------------------------------
Changes (by bthomas):
* has_patch: 0 => 1
Comment:
Attached a possible fix for this. BaseInlineFormSet was overriding
get_queryset, and always returning a new QuerySet instead of caching it
like BaseModelFormSet does. I fixed this to pass that QuerySet to the
super() call. Not only does this seem to fix the issue, but it can reduce
the number of database queries run by 1 query per inline model instance,
which can be significant if you have a lot of children for a model. My
next project is figuring out how they can all share querysets for their
ModelChoiceFields...
I think #9006 can be fixed independently of this. With my patch, the
queries run do not use LIMIT/OFFSET anymore.
--
Ticket URL: <http://code.djangoproject.com/ticket/9076#comment:17>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---