Skip to content


Subversion checkout URL

You can clone with
Download ZIP


[bug] get_formsets may not drop inlines #418

apollo13 opened this Issue · 4 comments

4 participants


looking at you are returning (if the user doesn't have the permissions) less inlines than you should. The add_view shows you the problem: if you remove Inlines from get_formsets zip won't be able to connect the Formset with the inline any longer; which might?! result in data loss (If you change the queryset method on the inline).

Prefered solution would be to get a get_formsets_with_inlines method into django 1.3 so we can return the correct formsets along with their inlines…


closed because we can't reproduce or fully understand what the issue should be here

@ojii ojii reopened this

reopened, this could possibly cause issues, but unless someone actually reports an issue we'll keep this on very low priority.


In the project that I'm working on, the cms.admin.pageadmin.PageAdmin class has been extended and an additional custom inline has been added to the list of inlines.

The above problem can indeed happen when the logged-in user is not allowed to change page permissions. This causes PagePermissionInlineAdmin to be dropped which means the variables self.inline_instances and formsets in the following line no longer have the same length:

for inline, formset in zip(self.inline_instances, formsets):

which is at django.contrib.admin.options.change_view . To be precise, the variables then have the following values:

self.inline_instances = [<cms.admin.permissionadmin.PagePermissionInlineAdmin object at 0x105289310>, <cmsext.admin.ExtraPageFieldsInline object at 0x1052893d0>]
formsets = [<django.forms.formsets.ExtraPageFieldsFormFormSet object at 0x105568490>]

The second inline / formset (i.e., our addition) should show up but in no longer does due to the fact that PagePermissionInlineAdmin has been dropped.


closed as we will follow a different path for extending page and titles models.

@digi604 digi604 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.