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

Update URLField to handle file urls #21

Open
beta1042 opened this issue Jul 9, 2015 · 0 comments
Open

Update URLField to handle file urls #21

beta1042 opened this issue Jul 9, 2015 · 0 comments

Comments

@beta1042
Copy link

beta1042 commented Jul 9, 2015

I work in a corporate sharepoint site and we have list content linked back to actual files on our network (more of just a reference list than a live edited list). Issue is that the hyperlinks are linked to href='file://...' links.

I ended up editing the lists/types.py file, URLField class to accept "file:" url links.
was:
...value['href'].startswith(prefix) for prefix in ('mailto:', 'http:', 'https:')
is:
...value['href'].startswith(prefix) for prefix in ('mailto:', 'http:', 'https:', 'file:')

Any reason why this couldn't be standard behavior moving forward?

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

1 participant