#31652: Admin site URLS do not respect APPEND_SLASH conf
-------------------------------------+-------------------------------------
Reporter: Emmanuel Nosa E. | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.admin | Version: 3.0
Severity: Normal | Resolution:
Keywords: append, slash, | Triage Stage:
APPEND_SLASH, urls, admin | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Emmanuel Nosa E.:
Old description:
> If this is a design decision, then this ticket can be gracefully closed.
>
> == Description
> Using the `APPEND_SLASH` setting, one would expect and does receive the
> intended behaviour from the configured urls, but to my notice, the admin
> urls are not respecting this, **they append a slash to the end of the url
> regardless**.
>
> == Reason
> Over here in the django source code
> (https://github.com/django/django/blob/master/django/contrib/admin/sites.py)
> for `django.contrib.admin.sites`, every `url` within the `urlpatterns` of
> the `AdminSite.get_urls()` ends with a trailing slash. As seen here:
> -
> https://github.com/django/django/blob/master/django/contrib/admin/sites.py#L256
> -
> https://github.com/django/django/blob/master/django/contrib/admin/sites.py#L287
>
> I simply suggest that the APPEND_SLASH setting is respected and the
> intended urls are returned. In as much as this doesn't hurt, it's an
> issue within the system, unless like i said earlier;
>
> > **maybe it's a design decision**.
New description:
If this is a design decision, then this ticket can be gracefully closed.
== Description
Using the `APPEND_SLASH` setting, one would expect and does receive the
intended behaviour from the configured urls, but to my notice, the admin
urls are not respecting this, **they append a slash to the end of the url
regardless**.
== Reason
Over here in the django source code
(https://github.com/django/django/blob/master/django/contrib/admin/sites.py)
for `django.contrib.admin.sites`, every `url` within the `urlpatterns` of
the `AdminSite.get_urls()` ends with a trailing slash. As seen here:
-
https://github.com/django/django/blob/master/django/contrib/admin/sites.py#L256
-
https://github.com/django/django/blob/master/django/contrib/admin/sites.py#L287
I simply suggest that the `APPEND_SLASH` setting is respected and the
intended urls are returned. In as much as this doesn't hurt, it's an issue
within the system, unless like i said earlier;
> **maybe it's a design decision**.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31652#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.c47510e6867e62552d6cbfbc49aa6a86%40djangoproject.com.