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
This commit is contained in:
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
+1 -1
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):