from django.shortcuts import render,redirect,reverse
from . import forms,models
from django.db.models import Sum
from django.contrib.auth.models import Group
from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required,user_passes_test

def home_view(request):
    if request.user.is_authenticated:
        return HttpResponseRedirect('afterlogin')
    return render(request,'school/index.html')



#for showing signup/login button for teacher(by sumit)
def adminclick_view(request):
    if request.user.is_authenticated:
        return HttpResponseRedirect('afterlogin')
    return render(request,'school/adminclick.html')


#for showing signup/login button for teacher(by sumit)
def teacherclick_view(request):
    if request.user.is_authenticated:
        return HttpResponseRedirect('afterlogin')
    return render(request,'school/teacherclick.html')


#for showing signup/login button for student(by sumit)
def studentclick_view(request):
    if request.user.is_authenticated:
        return HttpResponseRedirect('afterlogin')
    return render(request,'school/studentclick.html')





def admin_signup_view(request):
    form=forms.AdminSigupForm()
    if request.method=='POST':
        form=forms.AdminSigupForm(request.POST)
        if form.is_valid():
            user=form.save()
            user.set_password(user.password)
            user.save()


            my_admin_group = Group.objects.get_or_create(name='ADMIN')
            my_admin_group[0].user_set.add(user)

            return HttpResponseRedirect('adminlogin')
    return render(request,'school/adminsignup.html',{'form':form})




def student_signup_view(request):
    form1=forms.StudentUserForm()
    form2=forms.StudentExtraForm()
    mydict={'form1':form1,'form2':form2}
    if request.method=='POST':
        form1=forms.StudentUserForm(request.POST)
        form2=forms.StudentExtraForm(request.POST)
        if form1.is_valid() and form2.is_valid():
            user=form1.save()
            user.set_password(user.password)
            user.save()
            f2=form2.save(commit=False)
            f2.user=user
            user2=f2.save()

            my_student_group = Group.objects.get_or_create(name='STUDENT')
            my_student_group[0].user_set.add(user)

        return HttpResponseRedirect('studentlogin')
    return render(request,'school/studentsignup.html',context=mydict)


def teacher_signup_view(request):
    form1=forms.TeacherUserForm()
    form2=forms.TeacherExtraForm()
    mydict={'form1':form1,'form2':form2}
    if request.method=='POST':
        form1=forms.TeacherUserForm(request.POST)
        form2=forms.TeacherExtraForm(request.POST)
        if form1.is_valid() and form2.is_valid():
            user=form1.save()
            user.set_password(user.password)
            user.save()
            f2=form2.save(commit=False)
            f2.user=user
            user2=f2.save()

            my_teacher_group = Group.objects.get_or_create(name='TEACHER')
            my_teacher_group[0].user_set.add(user)

        return HttpResponseRedirect('teacherlogin')
    return render(request,'school/teachersignup.html',context=mydict)






#for checking user is techer , student or admin(by sumit)
def is_admin(user):
    return user.groups.filter(name='ADMIN').exists()
def is_teacher(user):
    return user.groups.filter(name='TEACHER').exists()
def is_student(user):
    return user.groups.filter(name='STUDENT').exists()


def afterlogin_view(request):
    if is_admin(request.user):
        return redirect('admin-dashboard')
    elif is_teacher(request.user):
        accountapproval=models.TeacherExtra.objects.all().filter(user_id=request.user.id,status=True)
        if accountapproval:
            return redirect('teacher-dashboard')
        else:
            return render(request,'school/teacher_wait_for_approval.html')
    elif is_student(request.user):
        accountapproval=models.StudentExtra.objects.all().filter(user_id=request.user.id,status=True)
        if accountapproval:
            return redirect('student-dashboard')
        else:
            return render(request,'school/student_wait_for_approval.html')




#for dashboard of adminnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn(by sumit)

@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_dashboard_view(request):
    teachercount=models.TeacherExtra.objects.all().filter(status=True).count()
    pendingteachercount=models.TeacherExtra.objects.all().filter(status=False).count()

    studentcount=models.StudentExtra.objects.all().filter(status=True).count()
    pendingstudentcount=models.StudentExtra.objects.all().filter(status=False).count()

    teachersalary=models.TeacherExtra.objects.filter(status=True).aggregate(Sum('salary'))
    pendingteachersalary=models.TeacherExtra.objects.filter(status=False).aggregate(Sum('salary'))

    studentfee=models.StudentExtra.objects.filter(status=True).aggregate(Sum('fee',default=0))
    pendingstudentfee=models.StudentExtra.objects.filter(status=False).aggregate(Sum('fee'))

    notice=models.Notice.objects.all()

    #aggregate function return dictionary so fetch data from dictionay(by sumit)
    mydict={
        'teachercount':teachercount,
        'pendingteachercount':pendingteachercount,

        'studentcount':studentcount,
        'pendingstudentcount':pendingstudentcount,

        'teachersalary':teachersalary['salary__sum'],
        'pendingteachersalary':pendingteachersalary['salary__sum'],

        'studentfee':studentfee['fee__sum'],
        'pendingstudentfee':pendingstudentfee['fee__sum'],

        'notice':notice

    }

    return render(request,'school/admin_dashboard.html',context=mydict)







#for teacher sectionnnnnnnn by adminnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn(by sumit)

@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_teacher_view(request):
    return render(request,'school/admin_teacher.html')

@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_add_teacher_view(request):
    form1=forms.TeacherUserForm()
    form2=forms.TeacherExtraForm()
    mydict={'form1':form1,'form2':form2}
    if request.method=='POST':
        form1=forms.TeacherUserForm(request.POST)
        form2=forms.TeacherExtraForm(request.POST)
        if form1.is_valid() and form2.is_valid():
            user=form1.save()
            user.set_password(user.password)
            user.save()

            f2=form2.save(commit=False)
            f2.user=user
            f2.status=True
            f2.save()

            my_teacher_group = Group.objects.get_or_create(name='TEACHER')
            my_teacher_group[0].user_set.add(user)

        return HttpResponseRedirect('admin-teacher')
    return render(request,'school/admin_add_teacher.html',context=mydict)


@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_view_teacher_view(request):
    teachers=models.TeacherExtra.objects.all().filter(status=True)
    return render(request,'school/admin_view_teacher.html',{'teachers':teachers})


@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_approve_teacher_view(request):
    teachers=models.TeacherExtra.objects.all().filter(status=False)
    return render(request,'school/admin_approve_teacher.html',{'teachers':teachers})


@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def approve_teacher_view(request,pk):
    teacher=models.TeacherExtra.objects.get(id=pk)
    teacher.status=True
    teacher.save()
    return redirect(reverse('admin-approve-teacher'))


@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def delete_teacher_view(request,pk):
    teacher=models.TeacherExtra.objects.get(id=pk)
    user=models.User.objects.get(id=teacher.user_id)
    user.delete()
    teacher.delete()
    return redirect('admin-approve-teacher')


@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def delete_teacher_from_school_view(request,pk):
    teacher=models.TeacherExtra.objects.get(id=pk)
    user=models.User.objects.get(id=teacher.user_id)
    user.delete()
    teacher.delete()
    return redirect('admin-view-teacher')


@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def update_teacher_view(request,pk):
    teacher=models.TeacherExtra.objects.get(id=pk)
    user=models.User.objects.get(id=teacher.user_id)

    form1=forms.TeacherUserForm(instance=user)
    form2=forms.TeacherExtraForm(instance=teacher)
    mydict={'form1':form1,'form2':form2}

    if request.method=='POST':
        form1=forms.TeacherUserForm(request.POST,instance=user)
        form2=forms.TeacherExtraForm(request.POST,instance=teacher)
        print(form1)
        if form1.is_valid() and form2.is_valid():
            user=form1.save()
            user.set_password(user.password)
            user.save()
            f2=form2.save(commit=False)
            f2.status=True
            f2.save()
            return redirect('admin-view-teacher')
    return render(request,'school/admin_update_teacher.html',context=mydict)


@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_view_teacher_salary_view(request):
    teachers=models.TeacherExtra.objects.all()
    return render(request,'school/admin_view_teacher_salary.html',{'teachers':teachers})






#for student by adminnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn(by sumit)

@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_student_view(request):
    return render(request,'school/admin_student.html')


@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_add_student_view(request):
    form1=forms.StudentUserForm()
    form2=forms.StudentExtraForm()
    mydict={'form1':form1,'form2':form2}
    if request.method=='POST':
        form1=forms.StudentUserForm(request.POST)
        form2=forms.StudentExtraForm(request.POST)
        if form1.is_valid() and form2.is_valid():
            print("form is valid")
            user=form1.save()
            user.set_password(user.password)
            user.save()

            f2=form2.save(commit=False)
            f2.user=user
            f2.status=True
            f2.save()

            my_student_group = Group.objects.get_or_create(name='STUDENT')
            my_student_group[0].user_set.add(user)
        else:
            print("form is invalid")
        return HttpResponseRedirect('admin-student')
    return render(request,'school/admin_add_student.html',context=mydict)


@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_view_student_view(request):
    students=models.StudentExtra.objects.all().filter(status=True)
    return render(request,'school/admin_view_student.html',{'students':students})


@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def delete_student_from_school_view(request,pk):
    student=models.StudentExtra.objects.get(id=pk)
    user=models.User.objects.get(id=student.user_id)
    user.delete()
    student.delete()
    return redirect('admin-view-student')


@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def delete_student_view(request,pk):
    student=models.StudentExtra.objects.get(id=pk)
    user=models.User.objects.get(id=student.user_id)
    user.delete()
    student.delete()
    return redirect('admin-approve-student')


@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def update_student_view(request,pk):
    student=models.StudentExtra.objects.get(id=pk)
    user=models.User.objects.get(id=student.user_id)
    form1=forms.StudentUserForm(instance=user)
    form2=forms.StudentExtraForm(instance=student)
    mydict={'form1':form1,'form2':form2}
    if request.method=='POST':
        form1=forms.StudentUserForm(request.POST,instance=user)
        form2=forms.StudentExtraForm(request.POST,instance=student)
        print(form1)
        if form1.is_valid() and form2.is_valid():
            user=form1.save()
            user.set_password(user.password)
            user.save()
            f2=form2.save(commit=False)
            f2.status=True
            f2.save()
            return redirect('admin-view-student')
    return render(request,'school/admin_update_student.html',context=mydict)



@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_approve_student_view(request):
    students=models.StudentExtra.objects.all().filter(status=False)
    return render(request,'school/admin_approve_student.html',{'students':students})


@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def approve_student_view(request,pk):
    students=models.StudentExtra.objects.get(id=pk)
    students.status=True
    students.save()
    return redirect(reverse('admin-approve-student'))


@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_view_student_fee_view(request):
    students=models.StudentExtra.objects.all()
    return render(request,'school/admin_view_student_fee.html',{'students':students})






#attendance related viewwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww(by sumit)
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_attendance_view(request):
    return render(request,'school/admin_attendance.html')


@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_take_attendance_view(request,cl):
    students=models.StudentExtra.objects.all().filter(cl=cl)
    print(students)
    aform=forms.AttendanceForm()
    if request.method=='POST':
        form=forms.AttendanceForm(request.POST)
        if form.is_valid():
            Attendances=request.POST.getlist('present_status')
            date=form.cleaned_data['date']
            for i in range(len(Attendances)):
                AttendanceModel=models.Attendance()
                AttendanceModel.cl=cl
                AttendanceModel.date=date
                AttendanceModel.present_status=Attendances[i]
                AttendanceModel.roll=students[i].roll
                AttendanceModel.save()
            return redirect('admin-attendance')
        else:
            print('form invalid')
    return render(request,'school/admin_take_attendance.html',{'students':students,'aform':aform})



@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_view_attendance_view(request,cl):
    form=forms.AskDateForm()
    if request.method=='POST':
        form=forms.AskDateForm(request.POST)
        if form.is_valid():
            date=form.cleaned_data['date']
            attendancedata=models.Attendance.objects.all().filter(date=date,cl=cl)
            studentdata=models.StudentExtra.objects.all().filter(cl=cl)
            mylist=zip(attendancedata,studentdata)
            return render(request,'school/admin_view_attendance_page.html',{'cl':cl,'mylist':mylist,'date':date})
        else:
            print('form invalid')
    return render(request,'school/admin_view_attendance_ask_date.html',{'cl':cl,'form':form})









#fee related view by adminnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn(by sumit)
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_fee_view(request):
    return render(request,'school/admin_fee.html')


@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_view_fee_view(request,cl):
    feedetails=models.StudentExtra.objects.all().filter(cl=cl)
    return render(request,'school/admin_view_fee.html',{'feedetails':feedetails,'cl':cl})








#notice related viewsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss(by sumit)
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_notice_view(request):
    form=forms.NoticeForm()
    if request.method=='POST':
        form=forms.NoticeForm(request.POST)
        if form.is_valid():
            form=form.save(commit=False)
            form.by=request.user.first_name
            form.save()
            return redirect('admin-dashboard')
    return render(request,'school/admin_notice.html',{'form':form})








#for TEACHER  LOGIN    SECTIONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN(by sumit)
@login_required(login_url='teacherlogin')
@user_passes_test(is_teacher)
def teacher_dashboard_view(request):
    teacherdata=models.TeacherExtra.objects.all().filter(status=True,user_id=request.user.id)
    notice=models.Notice.objects.all()
    mydict={
        'salary':teacherdata[0].salary,
        'mobile':teacherdata[0].mobile,
        'date':teacherdata[0].joindate,
        'notice':notice
    }
    return render(request,'school/teacher_dashboard.html',context=mydict)



@login_required(login_url='teacherlogin')
@user_passes_test(is_teacher)
def teacher_attendance_view(request):
    return render(request,'school/teacher_attendance.html')


@login_required(login_url='teacherlogin')
@user_passes_test(is_teacher)
def teacher_take_attendance_view(request,cl):
    students=models.StudentExtra.objects.all().filter(cl=cl)
    aform=forms.AttendanceForm()
    if request.method=='POST':
        form=forms.AttendanceForm(request.POST)
        if form.is_valid():
            Attendances=request.POST.getlist('present_status')
            date=form.cleaned_data['date']
            for i in range(len(Attendances)):
                AttendanceModel=models.Attendance()
                AttendanceModel.cl=cl
                AttendanceModel.date=date
                AttendanceModel.present_status=Attendances[i]
                AttendanceModel.roll=students[i].roll
                AttendanceModel.save()
            return redirect('teacher-attendance')
        else:
            print('form invalid')
    return render(request,'school/teacher_take_attendance.html',{'students':students,'aform':aform})



@login_required(login_url='teacherlogin')
@user_passes_test(is_teacher)
def teacher_view_attendance_view(request,cl):
    form=forms.AskDateForm()
    if request.method=='POST':
        form=forms.AskDateForm(request.POST)
        if form.is_valid():
            date=form.cleaned_data['date']
            attendancedata=models.Attendance.objects.all().filter(date=date,cl=cl)
            studentdata=models.StudentExtra.objects.all().filter(cl=cl)
            mylist=zip(attendancedata,studentdata)
            return render(request,'school/teacher_view_attendance_page.html',{'cl':cl,'mylist':mylist,'date':date})
        else:
            print('form invalid')
    return render(request,'school/teacher_view_attendance_ask_date.html',{'cl':cl,'form':form})



@login_required(login_url='teacherlogin')
@user_passes_test(is_teacher)
def teacher_notice_view(request):
    form=forms.NoticeForm()
    if request.method=='POST':
        form=forms.NoticeForm(request.POST)
        if form.is_valid():
            form=form.save(commit=False)
            form.by=request.user.first_name
            form.save()
            return redirect('teacher-dashboard')
        else:
            print('form invalid')
    return render(request,'school/teacher_notice.html',{'form':form})







#FOR STUDENT AFTER THEIR Loginnnnnnnnnnnnnnnnnnnnn(by sumit)
@login_required(login_url='studentlogin')
@user_passes_test(is_student)
def student_dashboard_view(request):
    studentdata=models.StudentExtra.objects.all().filter(status=True,user_id=request.user.id)
    notice=models.Notice.objects.all()
    mydict={
        'roll':studentdata[0].roll,
        'mobile':studentdata[0].mobile,
        'fee':studentdata[0].fee,
        'notice':notice
    }
    return render(request,'school/student_dashboard.html',context=mydict)



@login_required(login_url='studentlogin')
@user_passes_test(is_student)
def student_attendance_view(request):
    form=forms.AskDateForm()
    if request.method=='POST':
        form=forms.AskDateForm(request.POST)
        if form.is_valid():
            date=form.cleaned_data['date']
            studentdata=models.StudentExtra.objects.all().filter(user_id=request.user.id,status=True)
            attendancedata=models.Attendance.objects.all().filter(date=date,cl=studentdata[0].cl,roll=studentdata[0].roll)
            mylist=zip(attendancedata,studentdata)
            return render(request,'school/student_view_attendance_page.html',{'mylist':mylist,'date':date})
        else:
            print('form invalid')
    return render(request,'school/student_view_attendance_ask_date.html',{'form':form})









# for aboutus and contact ussssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss (by sumit)
def aboutus_view(request):
    return render(request,'school/aboutus.html')

def contactus_view(request):
    sub = forms.ContactusForm()
    if request.method == 'POST':
        sub = forms.ContactusForm(request.POST)
        if sub.is_valid():
            email = sub.cleaned_data['Email']
            name=sub.cleaned_data['Name']
            message = sub.cleaned_data['Message']
            send_mail(str(name)+' || '+str(email),message, EMAIL_HOST_USER, ['wapka1503@gmail.com'], fail_silently = False)
            return render(request, 'school/contactussuccess.html')
    return render(request, 'school/contactus.html', {'form':sub})

[((4290, 4328), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (4304, 4328), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((4330, 4356), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (4346, 4356), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((5865, 5903), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (5879, 5903), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((5905, 5931), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (5921, 5931), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((6022, 6060), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (6036, 6060), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((6062, 6088), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (6078, 6088), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((6890, 6928), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (6904, 6928), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((6930, 6956), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (6946, 6956), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((7147, 7185), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (7161, 7185), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((7187, 7213), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (7203, 7213), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((7411, 7449), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (7425, 7449), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((7451, 7477), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (7467, 7477), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((7667, 7705), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (7681, 7705), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((7707, 7733), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (7723, 7733), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((7962, 8000), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (7976, 8000), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((8002, 8028), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (8018, 8028), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((8266, 8304), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (8280, 8304), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((8306, 8332), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (8322, 8332), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((9167, 9205), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (9181, 9205), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((9207, 9233), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (9223, 9233), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((9514, 9552), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (9528, 9552), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((9554, 9580), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (9570, 9580), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((9672, 9710), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (9686, 9710), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((9712, 9738), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (9728, 9738), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((10625, 10663), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (10639, 10663), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((10665, 10691), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (10681, 10691), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((10882, 10920), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (10896, 10920), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((10922, 10948), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (10938, 10948), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((11186, 11224), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (11200, 11224), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((11226, 11252), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (11242, 11252), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((11481, 11519), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (11495, 11519), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((11521, 11547), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (11537, 11547), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((12381, 12419), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (12395, 12419), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((12421, 12447), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (12437, 12447), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((12645, 12683), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (12659, 12683), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((12685, 12711), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (12701, 12711), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((12904, 12942), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (12918, 12942), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((12944, 12970), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (12960, 12970), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((13241, 13279), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (13255, 13279), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((13281, 13307), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (13297, 13307), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((13405, 13443), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (13419, 13443), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((13445, 13471), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (13461, 13471), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((14375, 14413), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (14389, 14413), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((14415, 14441), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (14431, 14441), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((15253, 15291), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (15267, 15291), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((15293, 15319), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (15309, 15319), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((15403, 15441), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (15417, 15441), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((15443, 15469), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (15459, 15469), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((15789, 15827), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""adminlogin"""'}), "(login_url='adminlogin')\n", (15803, 15827), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((15829, 15855), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_admin'], {}), '(is_admin)\n', (15845, 15855), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((16330, 16370), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""teacherlogin"""'}), "(login_url='teacherlogin')\n", (16344, 16370), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((16372, 16400), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_teacher'], {}), '(is_teacher)\n', (16388, 16400), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((16812, 16852), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""teacherlogin"""'}), "(login_url='teacherlogin')\n", (16826, 16852), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((16854, 16882), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_teacher'], {}), '(is_teacher)\n', (16870, 16882), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((16984, 17024), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""teacherlogin"""'}), "(login_url='teacherlogin')\n", (16998, 17024), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((17026, 17054), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_teacher'], {}), '(is_teacher)\n', (17042, 17054), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((17944, 17984), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""teacherlogin"""'}), "(login_url='teacherlogin')\n", (17958, 17984), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((17986, 18014), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_teacher'], {}), '(is_teacher)\n', (18002, 18014), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((18707, 18747), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""teacherlogin"""'}), "(login_url='teacherlogin')\n", (18721, 18747), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((18749, 18777), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_teacher'], {}), '(is_teacher)\n', (18765, 18777), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((19288, 19328), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""studentlogin"""'}), "(login_url='studentlogin')\n", (19302, 19328), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((19330, 19358), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_student'], {}), '(is_student)\n', (19346, 19358), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((19760, 19800), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""studentlogin"""'}), "(login_url='studentlogin')\n", (19774, 19800), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((19802, 19830), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['is_student'], {}), '(is_student)\n', (19818, 19830), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((402, 438), 'django.shortcuts.render', 'render', (['request', '"""school/index.html"""'], {}), "(request, 'school/index.html')\n", (408, 438), False, 'from django.shortcuts import render, redirect, reverse\n'), ((625, 666), 'django.shortcuts.render', 'render', (['request', '"""school/adminclick.html"""'], {}), "(request, 'school/adminclick.html')\n", (631, 666), False, 'from django.shortcuts import render, redirect, reverse\n'), ((854, 897), 'django.shortcuts.render', 'render', (['request', '"""school/teacherclick.html"""'], {}), "(request, 'school/teacherclick.html')\n", (860, 897), False, 'from django.shortcuts import render, redirect, reverse\n'), ((1085, 1128), 'django.shortcuts.render', 'render', (['request', '"""school/studentclick.html"""'], {}), "(request, 'school/studentclick.html')\n", (1091, 1128), False, 'from django.shortcuts import render, redirect, reverse\n'), ((1590, 1648), 'django.shortcuts.render', 'render', (['request', '"""school/adminsignup.html"""', "{'form': form}"], {}), "(request, 'school/adminsignup.html', {'form': form})\n", (1596, 1648), False, 'from django.shortcuts import render, redirect, reverse\n'), ((2359, 2419), 'django.shortcuts.render', 'render', (['request', '"""school/studentsignup.html"""'], {'context': 'mydict'}), "(request, 'school/studentsignup.html', context=mydict)\n", (2365, 2419), False, 'from django.shortcuts import render, redirect, reverse\n'), ((3129, 3189), 'django.shortcuts.render', 'render', (['request', '"""school/teachersignup.html"""'], {'context': 'mydict'}), "(request, 'school/teachersignup.html', context=mydict)\n", (3135, 3189), False, 'from django.shortcuts import render, redirect, reverse\n'), ((5689, 5751), 'django.shortcuts.render', 'render', (['request', '"""school/admin_dashboard.html"""'], {'context': 'mydict'}), "(request, 'school/admin_dashboard.html', context=mydict)\n", (5695, 5751), False, 'from django.shortcuts import render, redirect, reverse\n'), ((5976, 6020), 'django.shortcuts.render', 'render', (['request', '"""school/admin_teacher.html"""'], {}), "(request, 'school/admin_teacher.html')\n", (5982, 6020), False, 'from django.shortcuts import render, redirect, reverse\n'), ((6824, 6888), 'django.shortcuts.render', 'render', (['request', '"""school/admin_add_teacher.html"""'], {'context': 'mydict'}), "(request, 'school/admin_add_teacher.html', context=mydict)\n", (6830, 6888), False, 'from django.shortcuts import render, redirect, reverse\n'), ((7073, 7146), 'django.shortcuts.render', 'render', (['request', '"""school/admin_view_teacher.html"""', "{'teachers': teachers}"], {}), "(request, 'school/admin_view_teacher.html', {'teachers': teachers})\n", (7079, 7146), False, 'from django.shortcuts import render, redirect, reverse\n'), ((7334, 7410), 'django.shortcuts.render', 'render', (['request', '"""school/admin_approve_teacher.html"""', "{'teachers': teachers}"], {}), "(request, 'school/admin_approve_teacher.html', {'teachers': teachers})\n", (7340, 7410), False, 'from django.shortcuts import render, redirect, reverse\n'), ((7925, 7958), 'django.shortcuts.redirect', 'redirect', (['"""admin-approve-teacher"""'], {}), "('admin-approve-teacher')\n", (7933, 7958), False, 'from django.shortcuts import render, redirect, reverse\n'), ((8232, 8262), 'django.shortcuts.redirect', 'redirect', (['"""admin-view-teacher"""'], {}), "('admin-view-teacher')\n", (8240, 8262), False, 'from django.shortcuts import render, redirect, reverse\n'), ((9098, 9165), 'django.shortcuts.render', 'render', (['request', '"""school/admin_update_teacher.html"""'], {'context': 'mydict'}), "(request, 'school/admin_update_teacher.html', context=mydict)\n", (9104, 9165), False, 'from django.shortcuts import render, redirect, reverse\n'), ((9337, 9422), 'django.shortcuts.render', 'render', (['request', '"""school/admin_view_teacher_salary.html"""', "{'teachers': teachers}"], {}), "(request, 'school/admin_view_teacher_salary.html', {'teachers': teachers}\n    )\n", (9343, 9422), False, 'from django.shortcuts import render, redirect, reverse\n'), ((9625, 9669), 'django.shortcuts.render', 'render', (['request', '"""school/admin_student.html"""'], {}), "(request, 'school/admin_student.html')\n", (9631, 9669), False, 'from django.shortcuts import render, redirect, reverse\n'), ((10559, 10623), 'django.shortcuts.render', 'render', (['request', '"""school/admin_add_student.html"""'], {'context': 'mydict'}), "(request, 'school/admin_add_student.html', context=mydict)\n", (10565, 10623), False, 'from django.shortcuts import render, redirect, reverse\n'), ((10808, 10881), 'django.shortcuts.render', 'render', (['request', '"""school/admin_view_student.html"""', "{'students': students}"], {}), "(request, 'school/admin_view_student.html', {'students': students})\n", (10814, 10881), False, 'from django.shortcuts import render, redirect, reverse\n'), ((11152, 11182), 'django.shortcuts.redirect', 'redirect', (['"""admin-view-student"""'], {}), "('admin-view-student')\n", (11160, 11182), False, 'from django.shortcuts import render, redirect, reverse\n'), ((11444, 11477), 'django.shortcuts.redirect', 'redirect', (['"""admin-approve-student"""'], {}), "('admin-approve-student')\n", (11452, 11477), False, 'from django.shortcuts import render, redirect, reverse\n'), ((12311, 12378), 'django.shortcuts.render', 'render', (['request', '"""school/admin_update_student.html"""'], {'context': 'mydict'}), "(request, 'school/admin_update_student.html', context=mydict)\n", (12317, 12378), False, 'from django.shortcuts import render, redirect, reverse\n'), ((12568, 12644), 'django.shortcuts.render', 'render', (['request', '"""school/admin_approve_student.html"""', "{'students': students}"], {}), "(request, 'school/admin_approve_student.html', {'students': students})\n", (12574, 12644), False, 'from django.shortcuts import render, redirect, reverse\n'), ((13071, 13148), 'django.shortcuts.render', 'render', (['request', '"""school/admin_view_student_fee.html"""', "{'students': students}"], {}), "(request, 'school/admin_view_student_fee.html', {'students': students})\n", (13077, 13148), False, 'from django.shortcuts import render, redirect, reverse\n'), ((13355, 13402), 'django.shortcuts.render', 'render', (['request', '"""school/admin_attendance.html"""'], {}), "(request, 'school/admin_attendance.html')\n", (13361, 13402), False, 'from django.shortcuts import render, redirect, reverse\n'), ((14283, 14379), 'django.shortcuts.render', 'render', (['request', '"""school/admin_take_attendance.html"""', "{'students': students, 'aform': aform}"], {}), "(request, 'school/admin_take_attendance.html', {'students': students,\n    'aform': aform})\n", (14289, 14379), False, 'from django.shortcuts import render, redirect, reverse\n'), ((15041, 15132), 'django.shortcuts.render', 'render', (['request', '"""school/admin_view_attendance_ask_date.html"""', "{'cl': cl, 'form': form}"], {}), "(request, 'school/admin_view_attendance_ask_date.html', {'cl': cl,\n    'form': form})\n", (15047, 15132), False, 'from django.shortcuts import render, redirect, reverse\n'), ((15360, 15400), 'django.shortcuts.render', 'render', (['request', '"""school/admin_fee.html"""'], {}), "(request, 'school/admin_fee.html')\n", (15366, 15400), False, 'from django.shortcuts import render, redirect, reverse\n'), ((15581, 15668), 'django.shortcuts.render', 'render', (['request', '"""school/admin_view_fee.html"""', "{'feedetails': feedetails, 'cl': cl}"], {}), "(request, 'school/admin_view_fee.html', {'feedetails': feedetails,\n    'cl': cl})\n", (15587, 15668), False, 'from django.shortcuts import render, redirect, reverse\n'), ((16186, 16245), 'django.shortcuts.render', 'render', (['request', '"""school/admin_notice.html"""', "{'form': form}"], {}), "(request, 'school/admin_notice.html', {'form': form})\n", (16192, 16245), False, 'from django.shortcuts import render, redirect, reverse\n'), ((16745, 16809), 'django.shortcuts.render', 'render', (['request', '"""school/teacher_dashboard.html"""'], {'context': 'mydict'}), "(request, 'school/teacher_dashboard.html', context=mydict)\n", (16751, 16809), False, 'from django.shortcuts import render, redirect, reverse\n'), ((16932, 16981), 'django.shortcuts.render', 'render', (['request', '"""school/teacher_attendance.html"""'], {}), "(request, 'school/teacher_attendance.html')\n", (16938, 16981), False, 'from django.shortcuts import render, redirect, reverse\n'), ((17850, 17948), 'django.shortcuts.render', 'render', (['request', '"""school/teacher_take_attendance.html"""', "{'students': students, 'aform': aform}"], {}), "(request, 'school/teacher_take_attendance.html', {'students':\n    students, 'aform': aform})\n", (17856, 17948), False, 'from django.shortcuts import render, redirect, reverse\n'), ((18618, 18711), 'django.shortcuts.render', 'render', (['request', '"""school/teacher_view_attendance_ask_date.html"""', "{'cl': cl, 'form': form}"], {}), "(request, 'school/teacher_view_attendance_ask_date.html', {'cl': cl,\n    'form': form})\n", (18624, 18711), False, 'from django.shortcuts import render, redirect, reverse\n'), ((19160, 19221), 'django.shortcuts.render', 'render', (['request', '"""school/teacher_notice.html"""', "{'form': form}"], {}), "(request, 'school/teacher_notice.html', {'form': form})\n", (19166, 19221), False, 'from django.shortcuts import render, redirect, reverse\n'), ((19693, 19757), 'django.shortcuts.render', 'render', (['request', '"""school/student_dashboard.html"""'], {'context': 'mydict'}), "(request, 'school/student_dashboard.html', context=mydict)\n", (19699, 19757), False, 'from django.shortcuts import render, redirect, reverse\n'), ((20488, 20567), 'django.shortcuts.render', 'render', (['request', '"""school/student_view_attendance_ask_date.html"""', "{'form': form}"], {}), "(request, 'school/student_view_attendance_ask_date.html', {'form': form})\n", (20494, 20567), False, 'from django.shortcuts import render, redirect, reverse\n'), ((20719, 20757), 'django.shortcuts.render', 'render', (['request', '"""school/aboutus.html"""'], {}), "(request, 'school/aboutus.html')\n", (20725, 20757), False, 'from django.shortcuts import render, redirect, reverse\n'), ((21267, 21322), 'django.shortcuts.render', 'render', (['request', '"""school/contactus.html"""', "{'form': sub}"], {}), "(request, 'school/contactus.html', {'form': sub})\n", (21273, 21322), False, 'from django.shortcuts import render, redirect, reverse\n'), ((356, 390), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', (['"""afterlogin"""'], {}), "('afterlogin')\n", (376, 390), False, 'from django.http import HttpResponseRedirect\n'), ((579, 613), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', (['"""afterlogin"""'], {}), "('afterlogin')\n", (599, 613), False, 'from django.http import HttpResponseRedirect\n'), ((808, 842), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', (['"""afterlogin"""'], {}), "('afterlogin')\n", (828, 842), False, 'from django.http import HttpResponseRedirect\n'), ((1039, 1073), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', (['"""afterlogin"""'], {}), "('afterlogin')\n", (1059, 1073), False, 'from django.http import HttpResponseRedirect\n'), ((2311, 2347), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', (['"""studentlogin"""'], {}), "('studentlogin')\n", (2331, 2347), False, 'from django.http import HttpResponseRedirect\n'), ((3081, 3117), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', (['"""teacherlogin"""'], {}), "('teacherlogin')\n", (3101, 3117), False, 'from django.http import HttpResponseRedirect\n'), ((3557, 3584), 'django.shortcuts.redirect', 'redirect', (['"""admin-dashboard"""'], {}), "('admin-dashboard')\n", (3565, 3584), False, 'from django.shortcuts import render, redirect, reverse\n'), ((4802, 4815), 'django.db.models.Sum', 'Sum', (['"""salary"""'], {}), "('salary')\n", (4805, 4815), False, 'from django.db.models import Sum\n'), ((4901, 4914), 'django.db.models.Sum', 'Sum', (['"""salary"""'], {}), "('salary')\n", (4904, 4914), False, 'from django.db.models import Sum\n'), ((4990, 5011), 'django.db.models.Sum', 'Sum', (['"""fee"""'], {'default': '(0)'}), "('fee', default=0)\n", (4993, 5011), False, 'from django.db.models import Sum\n'), ((5093, 5103), 'django.db.models.Sum', 'Sum', (['"""fee"""'], {}), "('fee')\n", (5096, 5103), False, 'from django.db.models import Sum\n'), ((6775, 6812), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', (['"""admin-teacher"""'], {}), "('admin-teacher')\n", (6795, 6812), False, 'from django.http import HttpResponseRedirect\n'), ((7630, 7662), 'django.shortcuts.reverse', 'reverse', (['"""admin-approve-teacher"""'], {}), "('admin-approve-teacher')\n", (7637, 7662), False, 'from django.shortcuts import render, redirect, reverse\n'), ((10510, 10547), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', (['"""admin-student"""'], {}), "('admin-student')\n", (10530, 10547), False, 'from django.http import HttpResponseRedirect\n'), ((12867, 12899), 'django.shortcuts.reverse', 'reverse', (['"""admin-approve-student"""'], {}), "('admin-approve-student')\n", (12874, 12899), False, 'from django.shortcuts import render, redirect, reverse\n'), ((1433, 1474), 'django.contrib.auth.models.Group.objects.get_or_create', 'Group.objects.get_or_create', ([], {'name': '"""ADMIN"""'}), "(name='ADMIN')\n", (1460, 1474), False, 'from django.contrib.auth.models import Group\n'), ((1544, 1578), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', (['"""adminlogin"""'], {}), "('adminlogin')\n", (1564, 1578), False, 'from django.http import HttpResponseRedirect\n'), ((2200, 2243), 'django.contrib.auth.models.Group.objects.get_or_create', 'Group.objects.get_or_create', ([], {'name': '"""STUDENT"""'}), "(name='STUDENT')\n", (2227, 2243), False, 'from django.contrib.auth.models import Group\n'), ((2970, 3013), 'django.contrib.auth.models.Group.objects.get_or_create', 'Group.objects.get_or_create', ([], {'name': '"""TEACHER"""'}), "(name='TEACHER')\n", (2997, 3013), False, 'from django.contrib.auth.models import Group\n'), ((6664, 6707), 'django.contrib.auth.models.Group.objects.get_or_create', 'Group.objects.get_or_create', ([], {'name': '"""TEACHER"""'}), "(name='TEACHER')\n", (6691, 6707), False, 'from django.contrib.auth.models import Group\n'), ((9056, 9086), 'django.shortcuts.redirect', 'redirect', (['"""admin-view-teacher"""'], {}), "('admin-view-teacher')\n", (9064, 9086), False, 'from django.shortcuts import render, redirect, reverse\n'), ((10349, 10392), 'django.contrib.auth.models.Group.objects.get_or_create', 'Group.objects.get_or_create', ([], {'name': '"""STUDENT"""'}), "(name='STUDENT')\n", (10376, 10392), False, 'from django.contrib.auth.models import Group\n'), ((12269, 12299), 'django.shortcuts.redirect', 'redirect', (['"""admin-view-student"""'], {}), "('admin-view-student')\n", (12277, 12299), False, 'from django.shortcuts import render, redirect, reverse\n'), ((14195, 14223), 'django.shortcuts.redirect', 'redirect', (['"""admin-attendance"""'], {}), "('admin-attendance')\n", (14203, 14223), False, 'from django.shortcuts import render, redirect, reverse\n'), ((14887, 14992), 'django.shortcuts.render', 'render', (['request', '"""school/admin_view_attendance_page.html"""', "{'cl': cl, 'mylist': mylist, 'date': date}"], {}), "(request, 'school/admin_view_attendance_page.html', {'cl': cl,\n    'mylist': mylist, 'date': date})\n", (14893, 14992), False, 'from django.shortcuts import render, redirect, reverse\n'), ((16147, 16174), 'django.shortcuts.redirect', 'redirect', (['"""admin-dashboard"""'], {}), "('admin-dashboard')\n", (16155, 16174), False, 'from django.shortcuts import render, redirect, reverse\n'), ((17760, 17790), 'django.shortcuts.redirect', 'redirect', (['"""teacher-attendance"""'], {}), "('teacher-attendance')\n", (17768, 17790), False, 'from django.shortcuts import render, redirect, reverse\n'), ((18462, 18569), 'django.shortcuts.render', 'render', (['request', '"""school/teacher_view_attendance_page.html"""', "{'cl': cl, 'mylist': mylist, 'date': date}"], {}), "(request, 'school/teacher_view_attendance_page.html', {'cl': cl,\n    'mylist': mylist, 'date': date})\n", (18468, 18569), False, 'from django.shortcuts import render, redirect, reverse\n'), ((19071, 19100), 'django.shortcuts.redirect', 'redirect', (['"""teacher-dashboard"""'], {}), "('teacher-dashboard')\n", (19079, 19100), False, 'from django.shortcuts import render, redirect, reverse\n'), ((20340, 20437), 'django.shortcuts.render', 'render', (['request', '"""school/student_view_attendance_page.html"""', "{'mylist': mylist, 'date': date}"], {}), "(request, 'school/student_view_attendance_page.html', {'mylist':\n    mylist, 'date': date})\n", (20346, 20437), False, 'from django.shortcuts import render, redirect, reverse\n'), ((21208, 21255), 'django.shortcuts.render', 'render', (['request', '"""school/contactussuccess.html"""'], {}), "(request, 'school/contactussuccess.html')\n", (21214, 21255), False, 'from django.shortcuts import render, redirect, reverse\n'), ((3769, 3798), 'django.shortcuts.redirect', 'redirect', (['"""teacher-dashboard"""'], {}), "('teacher-dashboard')\n", (3777, 3798), False, 'from django.shortcuts import render, redirect, reverse\n'), ((3832, 3888), 'django.shortcuts.render', 'render', (['request', '"""school/teacher_wait_for_approval.html"""'], {}), "(request, 'school/teacher_wait_for_approval.html')\n", (3838, 3888), False, 'from django.shortcuts import render, redirect, reverse\n'), ((4072, 4101), 'django.shortcuts.redirect', 'redirect', (['"""student-dashboard"""'], {}), "('student-dashboard')\n", (4080, 4101), False, 'from django.shortcuts import render, redirect, reverse\n'), ((4135, 4191), 'django.shortcuts.render', 'render', (['request', '"""school/student_wait_for_approval.html"""'], {}), "(request, 'school/student_wait_for_approval.html')\n", (4141, 4191), False, 'from django.shortcuts import render, redirect, reverse\n')]