mirror of https://github.com/django/django.git
Fixed geographic admin to be compatible with `ModelAdmin.formfield_for_dbfield` changes in r9760.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9763 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
1c1425130d
commit
547649f962
|
@ -53,6 +53,7 @@ class GeoModelAdmin(ModelAdmin):
|
|||
for viewing/editing GeometryFields.
|
||||
"""
|
||||
if isinstance(db_field, models.GeometryField):
|
||||
request = kwargs.pop('request', None)
|
||||
# Setting the widget with the newly defined widget.
|
||||
kwargs['widget'] = self.get_map_widget(db_field)
|
||||
return db_field.formfield(**kwargs)
|
||||
|
|
Loading…
Reference in New Issue