GeoModelSerializer obsolete in upcoming 0.9.3

47 views
Skip to first unread message

Federico Capoano

unread,
Jul 17, 2015, 1:26:31 PM7/17/15
to django-rest-...@googlegroups.com
Check out this change:

There'll be no more need to base your serializers on GeoModelSerializer since 0.9.3.

You just need to add 'rest_framework_gis' in your INSTALLED_APPS, and the app inizialization will take care of updating DRF fields mapping only once when the project is initialized.

Doing the old way will still work in 0.9.3 although issuing loud deprecation warnings. I'll remove GeoModelSerializer in 1.0.

Federico

Douglas Meehan

unread,
Jul 20, 2015, 4:40:02 PM7/20/15
to django-rest-...@googlegroups.com
I have a question about this. Does this mean that if I have DRF-gis installed then there is no way to get the default ModelSerializer behavior from DRF (where geo fields are rendered as WKT strings)? This may not be an issue for most use cases, but potentially could be. 


--
You received this message because you are subscribed to the Google Groups "Django REST Framework GIS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framew...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Federico Capoano

unread,
Jul 21, 2015, 4:31:41 AM7/21/15
to django-rest-...@googlegroups.com, dme...@gmail.com
That would be quite awkward, but easily solvable in several ways. For example, by leaving a legacy GeoModelSerializer with the old behaviour without the need of adding drf-gis to INSTALLED_APPS.

Federico
Reply all
Reply to author
Forward
0 new messages