[Django] #31848: Add app_name to django.contrib.admindocs.views to make the definition of namespaces possible

22 views
Skip to first unread message

Django

unread,
Aug 2, 2020, 2:06:27 PM8/2/20
to django-...@googlegroups.com
#31848: Add app_name to django.contrib.admindocs.views to make the definition of
namespaces possible
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
marcelovicentegc |
Type: New | Status: new
feature |
Component: | Version: master
contrib.admindocs | Keywords: admindocs,
Severity: Normal | namespaces
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
Currently, it is not possible to set a namespace to admindocs, as this
will throw an error:


{{{
re_path(r'admin/doc/',include('django.contrib.admindocs.urls'),
namespace='docs')
}}}

It requires an easy fix: to add an app_name to admindocs.

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

Django

unread,
Aug 3, 2020, 4:44:30 AM8/3/20
to django-...@googlegroups.com
#31848: Support namespaced django.contrib.admindocs views.
-------------------------------------+-------------------------------------
Reporter: Marcelo Cardoso | Owner: nobody
Type: New feature | Status: closed
Component: contrib.admindocs | Version: master
Severity: Normal | Resolution: needsinfo
Keywords: admindocs, | Triage Stage:
namespaces | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: new => closed
* resolution: => needsinfo
* easy: 1 => 0


Comment:

Is there any reason to use namespaced `django.contrib.admindocs.views`?
Paths contain the `django-admindocs-` prefix so you shouldn't have
conflicts. Moreover proposed change is backward incompatible.

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

Django

unread,
Aug 4, 2020, 8:42:28 AM8/4/20
to django-...@googlegroups.com
#31848: Support namespaced django.contrib.admindocs views.
-------------------------------------+-------------------------------------
Reporter: Marcelo Cardoso | Owner: nobody
Type: New feature | Status: closed
Component: contrib.admindocs | Version: master
Severity: Normal | Resolution: needsinfo
Keywords: admindocs, | Triage Stage:
namespaces | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Marcelo Cardoso):

Yes, there is. For instance, when using admindocs, everything under it
falls into the empty namespace category, which is annoying if one is
trying to keep that section organized to the end user. Of course, there
are workarounds, but that would save other devs some time working around
it.

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

Django

unread,
Aug 4, 2020, 2:40:53 PM8/4/20
to django-...@googlegroups.com
#31848: Support namespaced django.contrib.admindocs views.
-------------------------------------+-------------------------------------
Reporter: Marcelo Cardoso | Owner: nobody
Type: New feature | Status: closed
Component: contrib.admindocs | Version: master
Severity: Normal | Resolution: wontfix

Keywords: admindocs, | Triage Stage:
namespaces | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* resolution: needsinfo => wontfix


Comment:

Yes, so I don't think it's worth backward incompatible change that will
force other users (that use `admindocs` in custom pages) to update their
URLs. You can always force namespaced views with:
{{{
urlpatterns = [
...,
path('admin/doc/',include((django.contrib.admindocs.urls.urlpatterns,
'admindocs'), namespace='docs'))
...,
]
}}}
if it's really important to you.

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

Reply all
Reply to author
Forward
0 new messages