Skip to content

Commit

Permalink
Merge pull request #95 from Microdisseny/with-modelname
Browse files Browse the repository at this point in the history
make with_modelname option available in views
  • Loading branch information
Gagaro committed May 15, 2018
2 parents 0bcf543 + 4568ecd commit f0fc8ff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion djgeojson/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class GeoJSONResponseMixin(object):

use_natural_keys = False

with_modelname = True

def render_to_response(self, context, **response_kwargs):
"""
Returns a JSON response, transforming 'context' to make the payload.
Expand All @@ -70,7 +72,8 @@ def render_to_response(self, context, **response_kwargs):
force2d=self.force2d,
bbox=self.bbox,
bbox_auto=self.bbox_auto,
use_natural_keys=self.use_natural_keys)
use_natural_keys=self.use_natural_keys,
with_modelname=self.with_modelname)
serializer.serialize(queryset, stream=response, ensure_ascii=False,
**options)
return response
Expand Down

0 comments on commit f0fc8ff

Please sign in to comment.