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
1 changed files with 1 additions and 0 deletions

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)