Skip to content

Commit

Permalink
GeometryFilter: use BaseGeometryWidget
Browse files Browse the repository at this point in the history
The default widget for `GeometryField` (`OpenLayersWidget`) was changed
to use `map_srid = 3857` in django/django@93eca976.
  • Loading branch information
blueyed committed May 20, 2017
1 parent 572c02c commit eb54fc0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rest_framework_gis/filters.py
Expand Up @@ -75,6 +75,10 @@ def filter_queryset(self, request, queryset, view):
class GeometryFilter(django_filters.Filter):
field_class = forms.GeometryField

def __init__(self, *args, **kwargs):
kwargs.setdefault('widget', forms.BaseGeometryWidget)
super(GeometryFilter, self).__init__(*args, **kwargs)


class GeoFilterSet(django_filters.FilterSet):
GEOFILTER_FOR_DBFIELD_DEFAULTS = {
Expand Down

0 comments on commit eb54fc0

Please sign in to comment.