#21496: Django 1.6 django.contrib.gis GeometryField crashes on alternate widget
----------------------------+--------------------
     Reporter:  rhettg@…    |      Owner:  nobody
         Type:  Bug         |     Status:  new
    Component:  GIS         |    Version:  1.6
     Severity:  Normal      |   Keywords:
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0           |      UI/UX:  0
----------------------------+--------------------
 If I use a TextInput widget to edit a PointField, form validation crashes
 because the widget doesn't have a `map_srid`.

 The string representation of a Point using the default srid (4326) doesn't
 define the SRID, which is unfortunate.
   >> p.srid
   4326
   >> str(p)
   'POINT (-122.3996132001327055 37.7942941983347467)'

   >> p2 = GEOSGeometry('POINT (-122.3996132001327055
 37.7942941983347467)')
   >> p2.srid
   None

 I think the best solution would be to allow the field to transform the
 value into whatever the default is set as for the field, unless otherwise
 specified by the widget.

 So something like the following PR would be required:
 https://github.com/django/django/pull/1966

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21496>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/059.92dcc728a18df3969ae39891a2ad62bf%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to