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
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.
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
3 matches
Mail list logo