[Django] #32490: Add base36 URL path converter

5 views
Skip to first unread message

Django

unread,
Feb 28, 2021, 9:42:56 AM2/28/21
to django-...@googlegroups.com
#32490: Add base36 URL path converter
--------------------------------------------+------------------------
Reporter: Tilman Koschnick | Owner: nobody
Type: New feature | Status: new
Component: Core (URLs) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------------+------------------------
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).

--
Ticket URL: <https://code.djangoproject.com/ticket/32490>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 28, 2021, 9:52:58 AM2/28/21
to django-...@googlegroups.com
#32490: Add base36 URL path converter
----------------------------------+--------------------------------------

Reporter: Tilman Koschnick | Owner: nobody
Type: New feature | Status: new
Component: Core (URLs) | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------

Comment (by Tilman Koschnick):

[https://github.com/django/django/pull/14060 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/32490#comment:1>

Django

unread,
Feb 28, 2021, 6:55:28 PM2/28/21
to django-...@googlegroups.com
#32490: Add base36 URL path converter
----------------------------------+--------------------------------------

Reporter: Tilman Koschnick | Owner: nobody
Type: New feature | Status: closed

Component: Core (URLs) | Version: master
Severity: Normal | Resolution: wontfix

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by Nick Pope):

* status: new => closed
* resolution: => wontfix


Comment:

I'm not sure why this needs to be defined in Django itself. The
[https://docs.djangoproject.com/en/stable/topics/http/urls/#path-
converters default set of path converters] doesn't even contain base64
which would seem to be more useful than base36 to me. Creating
[https://docs.djangoproject.com/en/3.1/topics/http/urls/#registering-
custom-path-converters 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/32490#comment:2>

Django

unread,
Mar 1, 2021, 4:13:47 AM3/1/21
to django-...@googlegroups.com
#32490: Add base36 URL path converter
----------------------------------+--------------------------------------

Reporter: Tilman Koschnick | Owner: nobody
Type: New feature | Status: closed

Component: Core (URLs) | Version: master
Severity: Normal | Resolution: wontfix

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------

Comment (by Tilman Koschnick):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/32490#comment:3>

Django

unread,
Mar 1, 2021, 4:28:10 AM3/1/21
to django-...@googlegroups.com
#32490: Add base36 URL path converter
----------------------------------+--------------------------------------

Reporter: Tilman Koschnick | Owner: nobody
Type: New feature | Status: closed

Component: Core (URLs) | Version: master
Severity: Normal | Resolution: wontfix

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------

Comment (by Mariusz Felisiak):

> 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"'').

--
Ticket URL: <https://code.djangoproject.com/ticket/32490#comment:4>

Django

unread,
Mar 1, 2021, 4:37:56 AM3/1/21
to django-...@googlegroups.com
#32490: Add base36 URL path converter
----------------------------------+--------------------------------------

Reporter: Tilman Koschnick | Owner: nobody
Type: New feature | Status: closed

Component: Core (URLs) | Version: master
Severity: Normal | Resolution: wontfix

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------

Comment (by Tilman Koschnick):

Okay, understood, thanks for clarifying!

--
Ticket URL: <https://code.djangoproject.com/ticket/32490#comment:5>

Reply all
Reply to author
Forward
0 new messages