Opened 12 days ago

Closed 12 days ago

Last modified 11 days 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 12 days ago.

Download all attachments as: .zip

Change History (4)

comment:1 by Tim Graham, 12 days 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, 11 days 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.

Version 0, edited 11 days ago by Nikolay Fedorov (next)

comment:3 by Tim Graham, 11 days 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