Skip to content

Commit

Permalink
[tests] Fixed "explicit field declaration" deprecation error
Browse files Browse the repository at this point in the history
Raised by DRF 3.5. Related to #119 - I've used a workaround here.
  • Loading branch information
nemesifier committed Nov 22, 2016
1 parent e257d29 commit 6479949
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/django_restframework_gis_tests/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class LocationGeoSerializer(serializers.ModelSerializer):

class Meta:
model = Location
exclude = []


class PaginatedLocationGeoSerializer(pagination.PageNumberPagination):
Expand All @@ -46,6 +47,7 @@ def get_fancy_name(self, obj):
class Meta:
model = Location
geo_field = 'geometry'
exclude = []


class LocationGeoFeatureSlugSerializer(LocationGeoFeatureSerializer):
Expand All @@ -63,6 +65,7 @@ class Meta:
model = Location
geo_field = 'geometry'
id_field = False
exclude = []


class LocationGeoFeatureNoIdSerializer(LocationGeoFeatureSerializer):
Expand All @@ -88,6 +91,7 @@ def get_fancy_name(self, obj):
class Meta:
model = Location
geo_field = 'geometry'
exclude = []


class BoxedLocationGeoFeatureSerializer(gis_serializers.GeoFeatureModelSerializer):
Expand All @@ -106,6 +110,7 @@ class Meta:
model = Location
geo_field = 'geometry'
auto_bbox = True
exclude = []


class LocationGeoFeatureMethodSerializer(gis_serializers.GeoFeatureModelSerializer):
Expand All @@ -120,6 +125,7 @@ def get_new_geometry(self, obj):
class Meta:
model = Location
geo_field = 'new_geometry'
exclude = []


class NoneGeoFeatureMethodSerializer(gis_serializers.GeoFeatureModelSerializer):
Expand Down

0 comments on commit 6479949

Please sign in to comment.