#23874: Admin Interface: Unique constraint in gis.db.models raises Integrity 
Error
instead of the unique error message
-------------------------+-------------------------------------------------
     Reporter:           |      Owner:  nobody
  raratiru               |     Status:  new
         Type:           |    Version:  1.7
  Uncategorized          |   Keywords:  IntegrityError, Unique Constraint,
    Component:  GIS      |  Admin
     Severity:  Normal   |  Has patch:  0
 Triage Stage:           |      UI/UX:  0
  Unreviewed             |
Easy pickings:  0        |
-------------------------+-------------------------------------------------
 models.py
 {{{
 from django.contrib.gis.db import models as geomodels

 class GeoUnique(geomodels.Model):
     geo_point = geomodels.PointField(
         unique=True,
         srid=4326
         )
     geoobjects = geomodels.GeoManager()
 }}}


 In the admin interface, if the same PointField is entered twice, an
 IntegrityError rises with a 40x Bad Request, while in any other of the
 django.db.models if the unique constraint is "on" and "activated" a
 friendly message notifies the user that the model instance cannot be
 saved.

--
Ticket URL: <https://code.djangoproject.com/ticket/23874>
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/051.859d216605601326ccca1fbb3331edb5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to