#31848 closed New feature (wontfix)
Support namespaced django.contrib.admindocs views.
Reported by: | Marcelo Cardoso | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admindocs | Version: | dev |
Severity: | Normal | Keywords: | admindocs, namespaces |
Cc: | marcelovicentegc@… | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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.
Change History (3)
comment:1 by , 4 years ago
Easy pickings: | unset |
---|---|
Resolution: | → needsinfo |
Status: | new → closed |
Summary: | Add app_name to django.contrib.admindocs.views to make the definition of namespaces possible → Support namespaced django.contrib.admindocs views. |
comment:2 by , 4 years ago
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.
comment:3 by , 4 years ago
Resolution: | needsinfo → wontfix |
---|
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.
Is there any reason to use namespaced
django.contrib.admindocs.views
? Paths contain thedjango-admindocs-
prefix so you shouldn't have conflicts. Moreover proposed change is backward incompatible.