From ca47cbf8c797a22111dfdd269d62c6308c24dab8 Mon Sep 17 00:00:00 2001 From: papi Date: Mon, 25 Dec 2023 23:44:09 +0300 Subject: [PATCH] Admin customization --- config/settings.py | 2 ++ config/urls.py | 26 ++++++++++++++------------ requirements/base.txt | 3 +++ 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/config/settings.py b/config/settings.py index 2ae0da9..6cf2765 100644 --- a/config/settings.py +++ b/config/settings.py @@ -37,6 +37,8 @@ # Application definition DJANGO_APPS = [ + "jet.dashboard", + "jet", "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", diff --git a/config/urls.py b/config/urls.py index ef48e80..d31414a 100644 --- a/config/urls.py +++ b/config/urls.py @@ -4,20 +4,22 @@ from django.conf import settings from django.conf.urls.static import static +admin.site.site_header = "Django LMS Admin" urlpatterns = [ - path('', include('app.urls')), - path('accounts/', include('accounts.urls')), - path('programs/', include('course.urls')), - path('result/', include('result.urls')), - path('search/', include('search.urls')), - path('quiz/', include('quiz.urls')), - - path('payments/', include('payments.urls')), - - path('accounts/api/', include('accounts.api.urls', namespace='accounts-api')), - - path('admin/', admin.site.urls), + path("jet/", include("jet.urls", "jet")), # Django JET URLS + path( + "jet/dashboard/", include("jet.dashboard.urls", "jet-dashboard") + ), # Django JET dashboard URLS + path("", include("app.urls")), + path("accounts/", include("accounts.urls")), + path("programs/", include("course.urls")), + path("result/", include("result.urls")), + path("search/", include("search.urls")), + path("quiz/", include("quiz.urls")), + path("payments/", include("payments.urls")), + path("accounts/api/", include("accounts.api.urls", namespace="accounts-api")), + path("admin/", admin.site.urls), ] if settings.DEBUG: diff --git a/requirements/base.txt b/requirements/base.txt index 5331557..299a06e 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -25,3 +25,6 @@ drf-spectacular==0.25.1 # https://github.com/tfranzel/drf-spectacular reportlab==4.0.4 stripe==5.5.0 gopay==2.0.1 + +# Customize django admin +django-jet-reboot==1.3.5 \ No newline at end of file