#20998: Form GIS widgets render() lack of modularity
-------------------------------+------------------------
Reporter: leplatrem | Owner: nobody
Type: Uncategorized | Status: new
Component: GIS | Version: 1.6-beta-1
Severity: Normal | Keywords: refactor
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------
When subclassing GIS form widgets, there should be a way to override
geometry serialization, without having to duplicate reprojection
behaviour.
https://github.com/django/django/blob/1.6b2/django/contrib/gis/forms/widgets.py#L37-L74
I propose to add some additional private methods:
* _deserialize: string (wkt) to geos (geos)
* _transform: from map widget to model projection
* _serialize: geometry to string (wkt)
This would open doors to widgets that support other representation formats
(geojson, topojson, ...)
--
Ticket URL: <https://code.djangoproject.com/ticket/20998>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.87fd1a62593e64804024df5f21b08e83%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.