Thanks - I guess I will have to add the extra validator. Any chance you would know how to write one for this (i.e. how to add the validator to the model, and then pass it back to the default validator once it's done?)
canen wrote: > On Nov 15, 2:45 pm, "Julio Nobrega" <[EMAIL PROTECTED]> wrote: > > Override the save method on your model to check if the "http://" > > string is not in the self.field_name, and if it's not, add it. > > http://www.djangoproject.com/documentation/model_api/#overriding-defa... > > > If it fails validation I don't think it would reach the save method, I > could be wrong. You can always add an extra validator > http://www.djangoproject.com/documentation/model_api/#validator-list > > > On 11/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > > > > > Hey, > > > > > Am trying to use a URLField in my app, but if the user doesn't stick > > > http:// on the front of it, it fails vaildation. Is there a way to > > > automatically add one if one isn't present - rather than it just > > > failing validation? > > > > > Many Thanks, > > > Oliver-- > > Julio Nobrega -http://www.inerciasensorial.com.br --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---