From ac9d85c3ee33928b3c0f5e6776cf904e87e652e0 Mon Sep 17 00:00:00 2001 From: Santosh Kumar Date: Thu, 27 Aug 2020 09:51:53 +0530 Subject: [PATCH 1/2] fix the afterlogin issue --- school/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/school/views.py b/school/views.py index 86a6e60..e47e374 100644 --- a/school/views.py +++ b/school/views.py @@ -127,6 +127,10 @@ def afterlogin_view(request): return redirect('student-dashboard') else: return render(request,'school/student_wait_for_approval.html') + if request.user.is_superuser: + return render(request,'school/admin_dashboard.html') + + return HttpResponse("Please Login with correct credentials.") From 9344c146f1bd927159e8ab6a820635ed31c85ee5 Mon Sep 17 00:00:00 2001 From: Santosh Kumar Date: Thu, 27 Aug 2020 10:35:43 +0530 Subject: [PATCH 2/2] edited admin panel title/header/index --- schoolmanagement/urls.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/schoolmanagement/urls.py b/schoolmanagement/urls.py index eeadd26..bf932c4 100644 --- a/schoolmanagement/urls.py +++ b/schoolmanagement/urls.py @@ -8,6 +8,11 @@ from school import views from django.contrib.auth.views import LoginView,LogoutView + +admin.site.site_header = "School Management System Administration" +admin.site.site_title = "School Management System Administration" +admin.site.index_title = "Welcome to School Management System Admin Panel" + urlpatterns = [ path('admin/', admin.site.urls), path('',views.home_view,name=''),