Re: FTP prefic in URL field

2011-07-18 Thread ggavy
Thanks Tim, I kinda guessed that would be the case. Thanks for the advice. G On Jul 15, 3:12 pm, Tim Shaffer wrote: > Yeah, it doesn't look like 1.1 allowed for ftp protocol: > > https://github.com/django/django/blob/1.1.X/django/forms/fields.py#L545 > > Best bet might be to create your ow

Re: FTP prefic in URL field

2011-07-15 Thread Tim Shaffer
Yeah, it doesn't look like 1.1 allowed for ftp protocol: https://github.com/django/django/blob/1.1.X/django/forms/fields.py#L545 Best bet might be to create your own URLField class and overwrite the __init__ method to use your own regular expression. Kind of a pain. It's a little easier in futu

Re: FTP prefic in URL field

2011-07-15 Thread ggavy
Hi Tim, I'm getting the 'Enter a valid URL.' error returned. I am however using Django 1.1, and thought that was the issue (I'm not sure where to look for the validator.py in this older version, but I think Iread somewhere that ftp wasn't in the regex at that version). Migrating to 1.2 isn't p

Re: FTP prefic in URL field

2011-07-15 Thread Tim Shaffer
It looks like the URLValidator should in fact accept ftp: https://github.com/django/django/blob/master/django/core/validators.py#L46 What's the specific error you're getting? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discuss

FTP prefic in URL field

2011-07-15 Thread ggavy
Hi all, I'm using a URLField in a model and form. However the form validation for this does not accept 'ftp://' type prefixes. What are my options here? Do I need to write a custom field or is it possible to modify the 'validate' method on the field itself so that it includes the default URL r