Fixed Django 1.8 support for related field widgets.

The RelatedFieldWidgetWrapper tries to resolve the "change" url with
"__fk__" as ID value, which broke with our strict pk_regex
fix_request_path_info
Diederik van der Boor 2015-04-30 11:39:13 +02:00
parent 9d68dee7dd
commit 1ff5f148b6
2 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,12 @@
Changelog
==========
Version 0.7.1 (2015-04/30)
--------------------------
* Fixed Django 1.8 support for related field widgets.
Version 0.7 (2015-04-08)
------------------------

View File

@ -120,7 +120,7 @@ class PolymorphicParentModelAdmin(admin.ModelAdmin):
#: The regular expression to filter the primary key in the URL.
#: This accepts only numbers as defensive measure against catch-all URLs.
#: If your primary key consists of string values, update this regular expression.
pk_regex = '(\d+)'
pk_regex = '(\d+|__fk__)'
def __init__(self, model, admin_site, *args, **kwargs):