1
0
mirror of https://github.com/django/django.git synced 2024-12-24 18:16:19 +00:00

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:
Justin Bronn 2009-01-16 20:05:39 +00:00
parent 1c1425130d
commit 547649f962

View File

@ -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)