Skip to content

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

Description

@daydream05

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions