#9707: IntegrityError with Charfield and option unique=True
-----------------------+----------------------------------------------------
 Reporter:  anonymous  |       Owner:  nobody    
   Status:  new        |   Milestone:            
Component:  Forms      |     Version:  SVN       
 Keywords:             |       Stage:  Unreviewed
Has_patch:  0          |  
-----------------------+----------------------------------------------------
 I have this model :

 {{{
 class Group(models.Model):
     idGroup = models.AutoField(primary_key=True)
     name = models.CharField('Name', max_length=50, unique=True)
 }}}

 In django admin interface when i add a Group with the same name of other
 Group I obtain the error

 Exception Type:         IntegrityError
 Exception Value:        (1062, "Duplicate entry 'xxxx' for key 2")

 How can i have a regular validation error in admin interface ?

 PS : I use Mysql with InnoDB

 Thanks in advance

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9707>
Django <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to