Opened 3 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#35981 closed New feature (wontfix)

Add ftp:// protocol to list of protocols in shortcut function in "django/contrib/contenttypes/views.py"

Reported by: Nikolay Fedorov Owned by:
Component: contrib.contenttypes Version: 5.1
Severity: Normal Keywords: view, shortcut, ftp
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I use URLField (that support ftp protocols by default) with ftp:// for pass to get_absolute_url of my model class and has error trying to follow "View on site" on my admin.
Please add ftp:// protocol to list of protocols in shortcut function in "django/contrib/contenttypes/views.py" (line: 41)

Attachments (1)

Снимок экрана 2024-12-06 в 23.48.29.png (38.9 KB ) - added by Nikolay Fedorov 3 weeks ago.

Download all attachments as: .zip

Change History (4)

comment:1 by Tim Graham, 3 weeks ago

Resolution: wontfix
Status: newclosed
Type: BugNew feature

Thanks for the suggestion. Given that this seems to be a very niche use case, as well as the fact that major browsers like Firefox and Chrome no longer support FTP, I don't see a compelling reason to make this change.

comment:2 by Nikolay Fedorov, 3 weeks ago

Thank you for answer and sorry for the inconvenience, but it's not about browsers, but about the OS explorer, which opens the directory by link. In my project, I use ftp links as a way to access files stored on a different computer than the one running django. I am not able to use FilePathField for example. Then why does URLField support the ftp protocol natively?

Version 1, edited 3 weeks ago by Nikolay Fedorov (previous) (next) (diff)

comment:3 by Tim Graham, 3 weeks ago

Support for ftp was added to URLField nearly 14 years ago in #15229. Given major browsers no longer support it, there could be an argument that URLField should drop support for it also. The main difficulty would be a clean solution for backward-compatibility for those already using FTP URLs, see #25594.

Note: See TracTickets for help on using tickets.
Back to Top