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-default-model-methods


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
-~----------~----~----~----~------~----~------~--~---

Reply via email to