Сайт не показывает панель администратора. Что мне делать?
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8001/admin/
Raised by: news.views.PageViews
С чем это может быть связано? Я не знаю, что делать.
class PageViews(ListView):
template_name = 'page.html'
paginate_by = 8
context_object_name = 'posts'
ordering = ['-datetime']
model = Page
paginate_orphans = 1
def dispatch(self, request, *args, **kwargs):
slug = kwargs.get('slug')
try:
self.category = Category.objects.get(slug=slug)
except Category.DoesNotExist:
raise Http404
return super().dispatch(request, *args, **kwargs)
def get_queryset(self):
return Page.objects.filter(category=self.category)
Мои URL ниже:
path("register/", views.register, name="register"),
path("logout/", views.logout_request, name="logout"),
path("login/", views.login_request, name="login"),
path("profile/", views.account, name="account"),
path('', HomeView.as_view(), name='home'),
path('<slug:slug>/', views.PageViews.as_view(), name='page'),
path('robots.txt', views.robots_view),
path('admin/', admin.site.urls),
path('accounts/', include('django.contrib.auth.urls')),
path('summernote/', include('django_summernote.urls')),