david / semanticdjango (http://semanticdjango.org/)

fork of django-trunk

The right time for a semantic contrib, that's my pony.

Clone this repository (size: 23.1 MB): HTTPS / SSH
$ hg clone http://code.welldev.org/semanticdjango
commit 6474: 68ed098c52a6
parent 6473: 4495a99a3b56
branch: default
Fixed geographic admin to be compatible with `ModelAdmin.formfield_for_dbfield` changes in r9760.
jbronn
20 months ago

Changed (Δ50 bytes):

raw changeset »

django/contrib/gis/admin/options.py (1 lines added, 0 lines removed)

Up to file-list django/contrib/gis/admin/options.py:

@@ -53,6 +53,7 @@ class GeoModelAdmin(ModelAdmin):
53
53
        for viewing/editing GeometryFields.
54
54
        """
55
55
        if isinstance(db_field, models.GeometryField):
56
            request = kwargs.pop('request', None)
56
57
            # Setting the widget with the newly defined widget.
57
58
            kwargs['widget'] = self.get_map_widget(db_field)
58
59
            return db_field.formfield(**kwargs)