diff --git a/django/contrib/gis/admin/options.py b/django/contrib/gis/admin/options.py index 26d60e55c8..7ec2c250ee 100644 --- a/django/contrib/gis/admin/options.py +++ b/django/contrib/gis/admin/options.py @@ -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)