#21003: BaseGeometryWidget is not idempotent
-------------------------------------+-------------------------------------
     Reporter:  leplatrem            |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |                  Version:
    Component:  GIS                  |  1.6-beta-1
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by leplatrem):

 Hum, unless I don't get it, it's wrong.

 In your proposition, you assign the database field srid to the data coming
 for the widget, whereas you should be using the widget's srid !

 Something like this :

 ::

     if not data.srid:
         data.srid = self.widget.map_srid


 If you want to see another approach, for example, in django-leaflet, I did
 that to fix that problem:
 https://github.com/makinacorpus/django-
 
leaflet/blob/add_leaflet_form_widget_and_admin/leaflet/templates/leaflet/widget.html#L34
 Which is a consequence of the lack of modularity mentionned in #20998:
 because in this particular case, what is transmitted between the field and
 and the widgets is EWKT !

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21003#comment:2>
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/067.c8505fdf667564e0c9cf5a26a1624ba7%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to