I’ve a model called urls (see below), how to handle some sort of link does not exists exception if I set verify_exists = True?
If the given link does not exist then this form is being invalid.
class Urls(models.Model):
title = models.CharField(max_length = 100)
link = models.URLField(verify_exists = True, verbose_name = u'URI')
class Meta:
app_label = 'core'
def __unicode__(self):
return self.title + ': ' + self.link
Sultan
You will probably need to overwrite the clean() method for that particular field in the form
http://docs.djangoproject.com/en/dev/ref/forms/validation/