Re: Integrity error handling

2009-05-27 Thread orokusaki
In your form sub-class class you'll need to override the clean method to check for duplicate entries and raise a validation error if they exists: from somewhere import models from somewhere import forms class myForm(forms.ModelForm): some_unique_field = forms.CharField() class M

Re: Integrity error handling

2009-05-21 Thread Bobby Roberts
any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr.

Integrity error handling

2009-05-20 Thread Bobby Roberts
hi group I have a situation here. I need to make sure that a field is unique in the database. In my model i have the following: url= models.CharField (max_length=254, blank=False, db_index=True,unique=True) When i go to save, it throws the IntegrityError just like it should. How can i tra