Skip to content

Commit

Permalink
Serializers must specify fields now
Browse files Browse the repository at this point in the history
  • Loading branch information
bkg committed Dec 8, 2016
1 parent a333f8f commit 4926fc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions spillway/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def get_serializer_class(self):
class DefaultSerializer(self.model_serializer_class):
class Meta:
model = self.queryset.model
fields = '__all__'
return DefaultSerializer


Expand Down
3 changes: 3 additions & 0 deletions tests/test_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,21 @@ def build_absolute_uri(self, url):
class LocationSerializer(serializers.GeoModelSerializer):
class Meta:
model = Location
fields = '__all__'
geom_field = 'geom'


class LocationFeatureSerializer(serializers.FeatureSerializer):
class Meta:
model = Location
fields = '__all__'
geom_field = 'geom'


class RasterStoreSerializer(serializers.RasterModelSerializer):
class Meta:
model = RasterStore
fields = '__all__'


class PaginatedGeoListView(generics.GeoListView):
Expand Down

0 comments on commit 4926fc2

Please sign in to comment.