#10799: List editable breaks with model inheritance and parent_link=True
-------------------------------------------+--------------------------------
Reporter: willhardy | Owner: nobody
Status: new | Milestone: 1.1
Component: django.contrib.admin | Version: SVN
Resolution: | Keywords: list_editable
parent_link inheritance
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------------------+--------------------------------
Changes (by willhardy):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
A couple of extra bits of potentially useful information:
1. exception appears whether or not `parent_link` is set as a
`primary_key`.
2. looking at line 950 of `django/contrib/admin/options.py`:
{{{
elif self.list_editable:
FormSet = self.get_changelist_formset(request)
formset = cl.formset = FormSet(queryset=cl.result_list)
}}}
The `FormSet` here looks ok (`parent_link` and non-`parent_link` version
appear to be the same), but each of the forms in `formset.forms` is
missing the field for the primary key. The `result_list` is of course the
same with or without `parent_link`.
I find this strange because it appears to use the (no doubt well-tested)
generic factory functions from forms.models.
I don't know the internal django code well enough to give a useful opinion
here, but this is what I was able to observe.
--
Ticket URL: <http://code.djangoproject.com/ticket/10799#comment:1>
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
-~----------~----~----~----~------~----~------~--~---