1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.6.x] Fixed #21428 -- editable GenericRelation regression

The GenericRelation refactoring removed GenericRelations from
model._meta.many_to_many. This had the side effect of disallowing
editable GenericRelations in ModelForms. Editable GenericRelations
aren't officially supported, but if we don't fix this we don't offer any
upgrade path for those who used the ability to set editable=True
in GenericRelation subclass.

Thanks to Trac alias joshcartme for the report and stephencmd and Loic
for working on this issue.

Backpatch of 0e079e4331 from master.
This commit is contained in:
Anssi Kääriäinen
2013-11-12 21:35:52 +02:00
parent e8dea1f35c
commit 1fd762c106
5 changed files with 34 additions and 6 deletions

View File

@@ -20,3 +20,5 @@ Bug fixes
* Fixed :class:`~django.contrib.auth.backends.ModelBackend` raising
``UnboundLocalError`` if :func:`~django.contrib.auth.get_user_model`
raised an error (#21439).
* Fixed a regression that prevented editable ``GenericRelation`` subclasses
from working in ``ModelForms``.