#31652: Admin site URLS do not respect APPEND_SLASH conf
-------------------------------------+-------------------------------------
               Reporter:  Emmanuel   |          Owner:  nobody
  Nosa E.                            |
                   Type:             |         Status:  new
  Uncategorized                      |
              Component:             |        Version:  3.0
  contrib.admin                      |       Keywords:  append, slash,
               Severity:  Normal     |  APPEND_SLASH, urls, admin
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 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>
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/051.e551a09dfc56c4b6546cbca2898c28cb%40djangoproject.com.

Reply via email to