Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#32490 closed New feature (wontfix)

Add base36 URL path converter

Reported by: Tilman Koschnick Owned by: nobody
Component: Core (URLs) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This adds base36 to the list of default URL path converters, based on django.utils.http.base36_to_int. It allows shorter URLs for integer values that are easier to type (easier to keep one's place than in a longer string of only numbers).

Change History (5)

comment:1 by Tilman Koschnick, 4 years ago

comment:2 by Nick Pope, 4 years ago

Resolution: wontfix
Status: newclosed

I'm not sure why this needs to be defined in Django itself. The default set of path converters doesn't even contain base64 which would seem to be more useful than base36 to me. Creating custom path converters is trivial, so I'm not sure that we need to expand the default set. If you disagree, please feel free to raise this on the DevelopersMailingList.

comment:3 by Tilman Koschnick, 4 years ago

Hi, is lack of complexity reason not to add something? The other converters are trivial as well, after all.
Just for the record: base64 is less suitable for my use case; while it is somewhat shorter than base36, it adds capital letters, "=" and (in the url safe variant) "-" and "_" into the mix, so doesn't fulfil my "easier to type" criterion.

comment:4 by Mariusz Felisiak, 4 years ago

Hi, is lack of complexity reason not to add something?

No, it's not. We cannot add hundreds of features just because they are not complex ("death by a thousand cuts").

comment:5 by Tilman Koschnick, 4 years ago

Okay, understood, thanks for clarifying!

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