[Django]-AttributeError: module 'django.contrib.auth.admin' has no attribute 'site'

3👍

You are looking for the admin module within django.contrib, rather than django.contrib.auth, as per the documentation. The admin module in django.contrib.auth is for customizing authentication, rather than accessing the admin site details.

from django.contrib import admin
path('admin/', admin.site.urls)

Leave a comment