tango_with_django_19
tango_with_django_19 copied to clipboard
Adding url without "http://" is considered not a URL
Even with cleaning the data provided, it's still saved as the original input
def clean(self):
cleaned_data = self.cleaned_data
url = cleaned_data.get('url')
# if url is not empty and doesn't start with 'http://'
if url and not url.startswith('http://'):
url = 'http://' + url
cleaned_data['url'] = url
return cleaned_data
Thanks - we'll have to look into this..
It is working fine for me
Hi Vince, Hi All,
Vince, what browser/os/python/django are you using?
Also, check your code to make sure the indentation is correct - so that the method is within the PageForm.
Leif
On 4 Nov 2016, at 13:41, yamei [email protected] wrote:
So do I as leonnardo
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/leifos/tango_with_django_19/issues/32#issuecomment-258433812, or mute the thread https://github.com/notifications/unsubscribe-auth/AB02B0gTmQKGVQJsvo4Z9rc11nTDgIeQks5q6zYQgaJpZM4JqPHV.
For me, "https://" is not being accepted. Only "http://" is.
Hi @leifos , I got the same problem . I'm working on OS X El Capitan. Chrome, Python 3.6.1, Django==1.9