0
2 things for you to check.
- Conflict of routes.
- If you have the admin in the INSTALLED_APPS tuple in Settings.py.
0
0
2 things for you to check.
0
Solved. The problem was when I was logging out. When trying to open the login screen, there was a middleware trying to access the request.user that had already been deleted. Thank you Micael. Hugs
Browser other questions tagged django
You are not signed in. Login or sign up in order to post.
Hummm I checked the routes and they are all correct. And in Settings is the admin. INSTALLED_APPS = [ 'Django.contrib.admin'.
– raphael
It’s the second time I have this problem. The first time I had to create a new project and migrate all apps.
– raphael
You can put your urls.py as it is.?
– Micael Pereira
urlpatterns = path('admin/', admin.site.urls, name='admin'), path('login/', auth_views.login, name='login'), path('logout/', auth_views.logout, name='logout'), path('main/', include('main.urls'), ='main name'), path('courses/', include('courses.urls'), name='courses'), path('personal/', include('personal.urls'), name='personal'), path('Members/', include('Members.urls'), name='Members'), path('blog/', include('blog.urls'), name='blog'), path('shop/', include('shop.urls'), name='shop'), ]
– raphael
from Django.contrib import admin url(r' admin/', admin.site.urls),
– Micael Pereira
url(r' admin/', admin.site.urls), Nameerror: name 'url' is not defined
– raphael
And it’s not just the admin that I can’t access. Any page returns the image error.
– raphael
The user is in the database as admin?
– Micael Pereira
there are 3 registered users.
– raphael
The q vc is logged in exists in the database? Have you tried to enter the tab anonymously?
– Micael Pereira
I didn’t even log in! rs try to log in to Chrome’s anonymous mode? The same error already occurs!
– raphael