[Django]-Django's admin documentation generator not working

3👍

i know this question is for long time ago but :

Add path(‘admin/doc/’, include(‘django.contrib.admindocs.urls’)) to your urlpatterns.

1
Make sure it’s included before the ‘admin/’ entry, so that requests to /admin/doc/ don’t get handled by the latter entry.

if you code like this:

from django.contrib import admin
from django.urls import path, include

urlpatterns = [
    path('admin/', admin.site.urls),
    path('admin/doc/', include('django.contrib.admindocs.urls')),
]

change it to:

from django.contrib import admin
from django.urls import path, include

urlpatterns = [
    path('admin/doc/', include('django.contrib.admindocs.urls')),
    path('admin/', admin.site.urls),
]

The Django admin documentation generator

Leave a comment