Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding url without "http://" is considered not a URL #32

Open
daydream05 opened this issue Aug 22, 2016 · 5 comments
Open

Adding url without "http://" is considered not a URL #32

daydream05 opened this issue Aug 22, 2016 · 5 comments

Comments

@daydream05
Copy link

daydream05 commented Aug 22, 2016

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
@leifos
Copy link
Collaborator

leifos commented Oct 20, 2016

Thanks - we'll have to look into this..

@leonnardo
Copy link

It is working fine for me

@leifos
Copy link
Collaborator

leifos commented Nov 6, 2016

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 notifications@github.com wrote:

So do I as leonnardo


You are receiving this because you commented.
Reply to this email directly, view it on GitHub #32 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AB02B0gTmQKGVQJsvo4Z9rc11nTDgIeQks5q6zYQgaJpZM4JqPHV.

@NinjaOnRails
Copy link

For me, "https://" is not being accepted. Only "http://" is.

@vankhoa011
Copy link

Hi @leifos ,
I got the same problem . I'm working on
OS X El Capitan.
Chrome,
Python 3.6.1,
Django==1.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants