Can Anybody help me out with my problem i am getting
Page not found (404)
Request Method:GETRequest URL:http://127.0.0.1:8000/admin/
Using the URLconf defined in app.urls
, Django tried these URL patterns, in this order:
[name=‘login’]
about [name=‘about’]
afterlogin [name=‘afterlogin’]
The current path, admin/
, didn’t match any of these.
You’re seeing this error because you have DEBUG = True
in your Django settings file. Change that to False
, and Django will display a standard 404 page.
while in my setting.py
- urlpatterns = [
- path(‘admin/’,admin.site.urls),
- path("", include(“btreapp.urls”)),
- ]
i even checked the following - all seems ok in setting files
The admin is enabled in the default project template used by [ startproject
]
If you’re not using the default project template, here are the requirements:
Add 'django.contrib.admin'
and its dependencies - [ django.contrib.auth
], [ django.contrib.messages
], and [ django.contrib.sessions
] - to your [ INSTALLED_APPS
]
Configure a [ DjangoTemplates
] backend in your [ TEMPLATES
] setting with django.contrib.auth.context_processors.auth
and django.contrib.messages.context_processors.messages
in the 'context_processors'
option of [ OPTIONS
]
If you’ve customized the [ MIDDLEWARE
] setting, [ django.contrib.auth.middleware.AuthenticationMiddleware
] and [ django.contrib.messages.middleware.MessageMiddleware
] must be included.
[Hook the admin’s URLs into your URLconf]