From ac9d85c3ee33928b3c0f5e6776cf904e87e652e0 Mon Sep 17 00:00:00 2001 From: Santosh Kumar Date: Thu, 27 Aug 2020 09:51:53 +0530 Subject: [PATCH] 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.")