mirror of
https://github.com/django/django.git
synced 2024-12-25 02:26:12 +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:
parent
1c1425130d
commit
547649f962
@ -53,6 +53,7 @@ class GeoModelAdmin(ModelAdmin):
|
|||||||
for viewing/editing GeometryFields.
|
for viewing/editing GeometryFields.
|
||||||
"""
|
"""
|
||||||
if isinstance(db_field, models.GeometryField):
|
if isinstance(db_field, models.GeometryField):
|
||||||
|
request = kwargs.pop('request', None)
|
||||||
# Setting the widget with the newly defined widget.
|
# Setting the widget with the newly defined widget.
|
||||||
kwargs['widget'] = self.get_map_widget(db_field)
|
kwargs['widget'] = self.get_map_widget(db_field)
|
||||||
return db_field.formfield(**kwargs)
|
return db_field.formfield(**kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user