[Django] #35917: add IrSlug converter

6 views
Skip to first unread message

Django

unread,
Nov 18, 2024, 3:27:53 PM11/18/24
to django-...@googlegroups.com
#35917: add IrSlug converter
---------------------------------+---------------------------------------
Reporter: ahmadrezanavaie | Type: New feature
Status: new | Component: Core (URLs)
Version: 5.1 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+---------------------------------------
As an amateur, I requested to add a slug specifically for Persian and
Arabic phrases that may also contain English to Django. These were the
changes I made in the converters.py file. Do you think there are any
issues?
{{{
class IrSlugConverter(StringConverter):
    regex = "[-a-zA-Z0-9_\u0600-\u06FF]+"


DEFAULT_CONVERTERS = {
    "int": IntConverter(),
    "path": PathConverter(),
    "slug": SlugConverter(),
    "irslug": IrSlugConverter(),
    "str": StringConverter(),
    "uuid": UUIDConverter(),
}
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35917>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 18, 2024, 3:34:16 PM11/18/24
to django-...@googlegroups.com
#35917: add IrSlug converter
---------------------------------+--------------------------------------
Reporter: ahmadrezanavaie | Owner: (none)
Type: New feature | Status: new
Component: Core (URLs) | Version: 5.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Description changed by ahmadrezanavaie:

Old description:

> As an amateur, I requested to add a slug specifically for Persian and
> Arabic phrases that may also contain English to Django. These were the
> changes I made in the converters.py file. Do you think there are any
> issues?
> {{{
> class IrSlugConverter(StringConverter):
>     regex = "[-a-zA-Z0-9_\u0600-\u06FF]+"
>

> DEFAULT_CONVERTERS = {
>     "int": IntConverter(),
>     "path": PathConverter(),
>     "slug": SlugConverter(),
>     "irslug": IrSlugConverter(),
>     "str": StringConverter(),
>     "uuid": UUIDConverter(),
> }
> }}}

New description:

As an amateur, I requested to add a slug specifically for Persian and
Arabic phrases that may also contain English to Django. These were the
changes I made in the converters.py file. Do you think there are any
issues?

The PR link : [https://github.com/django/django/pull/18826]
{{{
class IrSlugConverter(StringConverter):
    regex = "[-a-zA-Z0-9_\u0600-\u06FF]+"


DEFAULT_CONVERTERS = {
    "int": IntConverter(),
    "path": PathConverter(),
    "slug": SlugConverter(),
    "irslug": IrSlugConverter(),
    "str": StringConverter(),
    "uuid": UUIDConverter(),
}
}}}

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

Django

unread,
Nov 18, 2024, 3:45:58 PM11/18/24
to django-...@googlegroups.com
#35917: add IrSlug converter
---------------------------------+--------------------------------------
Reporter: ahmadrezanavaie | Owner: (none)
Type: New feature | Status: closed
Component: Core (URLs) | Version: 5.1
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

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

Comment:

Thanks for this ticket, however the current thread is to keep Django a
core framework, not providing every utility which might be useful.

Please ​follow
[https://docs.djangoproject.com/en/stable/internals/contributing/triaging-
tickets/#closing-tickets triaging guidelines with regards to wontfix
tickets] and take this to DevelopersMailingList, if you don't agree.
--
Ticket URL: <https://code.djangoproject.com/ticket/35917#comment:2>
Reply all
Reply to author
Forward
0 new messages