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})

[((136, 1, 136, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((137, 1, 137, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(137, 18, 137, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((181, 1, 181, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((182, 1, 182, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(182, 18, 182, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((186, 1, 186, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((187, 1, 187, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(187, 18, 187, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((212, 1, 212, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((213, 1, 213, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(213, 18, 213, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((219, 1, 219, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((220, 1, 220, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(220, 18, 220, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((226, 1, 226, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((227, 1, 227, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(227, 18, 227, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((235, 1, 235, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((236, 1, 236, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(236, 18, 236, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((245, 1, 245, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((246, 1, 246, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(246, 18, 246, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((255, 1, 255, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((256, 1, 256, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(256, 18, 256, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((280, 1, 280, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((281, 1, 281, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(281, 18, 281, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((293, 1, 293, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((294, 1, 294, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(294, 18, 294, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((299, 1, 299, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((300, 1, 300, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(300, 18, 300, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((327, 1, 327, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((328, 1, 328, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(328, 18, 328, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((334, 1, 334, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((335, 1, 335, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(335, 18, 335, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((344, 1, 344, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((345, 1, 345, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(345, 18, 345, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((354, 1, 354, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((355, 1, 355, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(355, 18, 355, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((378, 1, 378, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((379, 1, 379, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(379, 18, 379, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((385, 1, 385, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((386, 1, 386, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(386, 18, 386, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((394, 1, 394, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((395, 1, 395, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(395, 18, 395, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((406, 1, 406, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((407, 1, 407, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(407, 18, 407, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((412, 1, 412, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((413, 1, 413, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(413, 18, 413, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((437, 1, 437, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((438, 1, 438, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(438, 18, 438, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((462, 1, 462, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((463, 1, 463, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(463, 18, 463, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((468, 1, 468, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((469, 1, 469, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(469, 18, 469, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((482, 1, 482, 39), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((483, 1, 483, 27), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(483, 18, 483, 26): 'is_admin'}, {}), '(is_admin)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((503, 1, 503, 41), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((504, 1, 504, 29), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(504, 18, 504, 28): 'is_teacher'}, {}), '(is_teacher)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((518, 1, 518, 41), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((519, 1, 519, 29), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(519, 18, 519, 28): 'is_teacher'}, {}), '(is_teacher)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((524, 1, 524, 41), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((525, 1, 525, 29), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(525, 18, 525, 28): 'is_teacher'}, {}), '(is_teacher)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((548, 1, 548, 41), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((549, 1, 549, 29), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(549, 18, 549, 28): 'is_teacher'}, {}), '(is_teacher)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((566, 1, 566, 41), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((567, 1, 567, 29), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(567, 18, 567, 28): 'is_teacher'}, {}), '(is_teacher)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((588, 1, 588, 41), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((589, 1, 589, 29), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(589, 18, 589, 28): 'is_student'}, {}), '(is_student)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((603, 1, 603, 41), 'django.contrib.auth.decorators.login_required', 'login_required', (), '', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((604, 1, 604, 29), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', ({(604, 18, 604, 28): 'is_student'}, {}), '(is_student)', False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((11, 11, 11, 46), 'django.shortcuts.render', 'render', ({(11, 18, 11, 25): 'request', (11, 26, 11, 45): '"""school/index.html"""'}, {}), "(request, 'school/index.html')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((19, 11, 19, 51), 'django.shortcuts.render', 'render', ({(19, 18, 19, 25): 'request', (19, 26, 19, 50): '"""school/adminclick.html"""'}, {}), "(request, 'school/adminclick.html')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((26, 11, 26, 53), 'django.shortcuts.render', 'render', ({(26, 18, 26, 25): 'request', (26, 26, 26, 52): '"""school/teacherclick.html"""'}, {}), "(request, 'school/teacherclick.html')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((33, 11, 33, 53), 'django.shortcuts.render', 'render', ({(33, 18, 33, 25): 'request', (33, 26, 33, 52): '"""school/studentclick.html"""'}, {}), "(request, 'school/studentclick.html')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((53, 11, 53, 66), 'django.shortcuts.render', 'render', ({(53, 18, 53, 25): 'request', (53, 26, 53, 51): '"""school/adminsignup.html"""', (53, 52, 53, 65): "{'form': form}"}, {}), "(request, 'school/adminsignup.html', {'form': form})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((77, 11, 77, 69), 'django.shortcuts.render', 'render', (), '', False, 'from django.shortcuts import render, redirect, reverse\n'), ((99, 11, 99, 69), 'django.shortcuts.render', 'render', (), '', False, 'from django.shortcuts import render, redirect, reverse\n'), ((171, 11, 171, 71), 'django.shortcuts.render', 'render', (), '', False, 'from django.shortcuts import render, redirect, reverse\n'), ((184, 11, 184, 54), 'django.shortcuts.render', 'render', ({(184, 18, 184, 25): 'request', (184, 26, 184, 53): '"""school/admin_teacher.html"""'}, {}), "(request, 'school/admin_teacher.html')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((209, 11, 209, 73), 'django.shortcuts.render', 'render', (), '', False, 'from django.shortcuts import render, redirect, reverse\n'), ((216, 11, 216, 81), 'django.shortcuts.render', 'render', ({(216, 18, 216, 25): 'request', (216, 26, 216, 58): '"""school/admin_view_teacher.html"""', (216, 59, 216, 80): "{'teachers': teachers}"}, {}), "(request, 'school/admin_view_teacher.html', {'teachers': teachers})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((223, 11, 223, 84), 'django.shortcuts.render', 'render', ({(223, 18, 223, 25): 'request', (223, 26, 223, 61): '"""school/admin_approve_teacher.html"""', (223, 62, 223, 83): "{'teachers': teachers}"}, {}), "(request, 'school/admin_approve_teacher.html', {'teachers': teachers})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((242, 11, 242, 44), 'django.shortcuts.redirect', 'redirect', ({(242, 20, 242, 43): '"""admin-approve-teacher"""'}, {}), "('admin-approve-teacher')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((252, 11, 252, 41), 'django.shortcuts.redirect', 'redirect', ({(252, 20, 252, 40): '"""admin-view-teacher"""'}, {}), "('admin-view-teacher')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((277, 11, 277, 76), 'django.shortcuts.render', 'render', (), '', False, 'from django.shortcuts import render, redirect, reverse\n'), ((284, 11, 284, 88), 'django.shortcuts.render', 'render', ({(284, 18, 284, 25): 'request', (284, 26, 284, 65): '"""school/admin_view_teacher_salary.html"""', (284, 66, 284, 87): "{'teachers': teachers}"}, {}), "(request, 'school/admin_view_teacher_salary.html', {'teachers': teachers}\n    )", False, 'from django.shortcuts import render, redirect, reverse\n'), ((296, 11, 296, 54), 'django.shortcuts.render', 'render', ({(296, 18, 296, 25): 'request', (296, 26, 296, 53): '"""school/admin_student.html"""'}, {}), "(request, 'school/admin_student.html')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((324, 11, 324, 73), 'django.shortcuts.render', 'render', (), '', False, 'from django.shortcuts import render, redirect, reverse\n'), ((331, 11, 331, 81), 'django.shortcuts.render', 'render', ({(331, 18, 331, 25): 'request', (331, 26, 331, 58): '"""school/admin_view_student.html"""', (331, 59, 331, 80): "{'students': students}"}, {}), "(request, 'school/admin_view_student.html', {'students': students})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((341, 11, 341, 41), 'django.shortcuts.redirect', 'redirect', ({(341, 20, 341, 40): '"""admin-view-student"""'}, {}), "('admin-view-student')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((351, 11, 351, 44), 'django.shortcuts.redirect', 'redirect', ({(351, 20, 351, 43): '"""admin-approve-student"""'}, {}), "('admin-approve-student')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((374, 11, 374, 76), 'django.shortcuts.render', 'render', (), '', False, 'from django.shortcuts import render, redirect, reverse\n'), ((382, 11, 382, 84), 'django.shortcuts.render', 'render', ({(382, 18, 382, 25): 'request', (382, 26, 382, 61): '"""school/admin_approve_student.html"""', (382, 62, 382, 83): "{'students': students}"}, {}), "(request, 'school/admin_approve_student.html', {'students': students})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((398, 11, 398, 85), 'django.shortcuts.render', 'render', ({(398, 18, 398, 25): 'request', (398, 26, 398, 62): '"""school/admin_view_student_fee.html"""', (398, 63, 398, 84): "{'students': students}"}, {}), "(request, 'school/admin_view_student_fee.html', {'students': students})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((409, 11, 409, 57), 'django.shortcuts.render', 'render', ({(409, 18, 409, 25): 'request', (409, 26, 409, 56): '"""school/admin_attendance.html"""'}, {}), "(request, 'school/admin_attendance.html')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((433, 11, 433, 98), 'django.shortcuts.render', 'render', ({(433, 18, 433, 25): 'request', (433, 26, 433, 61): '"""school/admin_take_attendance.html"""', (433, 62, 433, 97): "{'students': students, 'aform': aform}"}, {}), "(request, 'school/admin_take_attendance.html', {'students': students,\n    'aform': aform})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((451, 11, 451, 93), 'django.shortcuts.render', 'render', ({(451, 18, 451, 25): 'request', (451, 26, 451, 70): '"""school/admin_view_attendance_ask_date.html"""', (451, 71, 451, 92): "{'cl': cl, 'form': form}"}, {}), "(request, 'school/admin_view_attendance_ask_date.html', {'cl': cl,\n    'form': form})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((465, 11, 465, 50), 'django.shortcuts.render', 'render', ({(465, 18, 465, 25): 'request', (465, 26, 465, 49): '"""school/admin_fee.html"""'}, {}), "(request, 'school/admin_fee.html')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((472, 11, 472, 89), 'django.shortcuts.render', 'render', ({(472, 18, 472, 25): 'request', (472, 26, 472, 54): '"""school/admin_view_fee.html"""', (472, 55, 472, 88): "{'feedetails': feedetails, 'cl': cl}"}, {}), "(request, 'school/admin_view_fee.html', {'feedetails': feedetails,\n    'cl': cl})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((493, 11, 493, 67), 'django.shortcuts.render', 'render', ({(493, 18, 493, 25): 'request', (493, 26, 493, 52): '"""school/admin_notice.html"""', (493, 53, 493, 66): "{'form': form}"}, {}), "(request, 'school/admin_notice.html', {'form': form})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((514, 11, 514, 73), 'django.shortcuts.render', 'render', (), '', False, 'from django.shortcuts import render, redirect, reverse\n'), ((521, 11, 521, 59), 'django.shortcuts.render', 'render', ({(521, 18, 521, 25): 'request', (521, 26, 521, 58): '"""school/teacher_attendance.html"""'}, {}), "(request, 'school/teacher_attendance.html')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((544, 11, 544, 100), 'django.shortcuts.render', 'render', ({(544, 18, 544, 25): 'request', (544, 26, 544, 63): '"""school/teacher_take_attendance.html"""', (544, 64, 544, 99): "{'students': students, 'aform': aform}"}, {}), "(request, 'school/teacher_take_attendance.html', {'students':\n    students, 'aform': aform})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((562, 11, 562, 95), 'django.shortcuts.render', 'render', ({(562, 18, 562, 25): 'request', (562, 26, 562, 72): '"""school/teacher_view_attendance_ask_date.html"""', (562, 73, 562, 94): "{'cl': cl, 'form': form}"}, {}), "(request, 'school/teacher_view_attendance_ask_date.html', {'cl': cl,\n    'form': form})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((579, 11, 579, 69), 'django.shortcuts.render', 'render', ({(579, 18, 579, 25): 'request', (579, 26, 579, 54): '"""school/teacher_notice.html"""', (579, 55, 579, 68): "{'form': form}"}, {}), "(request, 'school/teacher_notice.html', {'form': form})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((599, 11, 599, 73), 'django.shortcuts.render', 'render', (), '', False, 'from django.shortcuts import render, redirect, reverse\n'), ((617, 11, 617, 87), 'django.shortcuts.render', 'render', ({(617, 18, 617, 25): 'request', (617, 26, 617, 72): '"""school/student_view_attendance_ask_date.html"""', (617, 73, 617, 86): "{'form': form}"}, {}), "(request, 'school/student_view_attendance_ask_date.html', {'form': form})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((629, 11, 629, 48), 'django.shortcuts.render', 'render', ({(629, 18, 629, 25): 'request', (629, 26, 629, 47): '"""school/aboutus.html"""'}, {}), "(request, 'school/aboutus.html')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((641, 11, 641, 65), 'django.shortcuts.render', 'render', ({(641, 18, 641, 25): 'request', (641, 27, 641, 50): '"""school/contactus.html"""', (641, 52, 641, 64): "{'form': sub}"}, {}), "(request, 'school/contactus.html', {'form': sub})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((10, 15, 10, 49), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', ({(10, 36, 10, 48): '"""afterlogin"""'}, {}), "('afterlogin')", False, 'from django.http import HttpResponseRedirect\n'), ((18, 15, 18, 49), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', ({(18, 36, 18, 48): '"""afterlogin"""'}, {}), "('afterlogin')", False, 'from django.http import HttpResponseRedirect\n'), ((25, 15, 25, 49), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', ({(25, 36, 25, 48): '"""afterlogin"""'}, {}), "('afterlogin')", False, 'from django.http import HttpResponseRedirect\n'), ((32, 15, 32, 49), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', ({(32, 36, 32, 48): '"""afterlogin"""'}, {}), "('afterlogin')", False, 'from django.http import HttpResponseRedirect\n'), ((76, 15, 76, 51), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', ({(76, 36, 76, 50): '"""studentlogin"""'}, {}), "('studentlogin')", False, 'from django.http import HttpResponseRedirect\n'), ((98, 15, 98, 51), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', ({(98, 36, 98, 50): '"""teacherlogin"""'}, {}), "('teacherlogin')", False, 'from django.http import HttpResponseRedirect\n'), ((117, 15, 117, 42), 'django.shortcuts.redirect', 'redirect', ({(117, 24, 117, 41): '"""admin-dashboard"""'}, {}), "('admin-dashboard')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((145, 76, 145, 89), 'django.db.models.Sum', 'Sum', ({(145, 80, 145, 88): '"""salary"""'}, {}), "('salary')", False, 'from django.db.models import Sum\n'), ((146, 84, 146, 97), 'django.db.models.Sum', 'Sum', ({(146, 88, 146, 96): '"""salary"""'}, {}), "('salary')", False, 'from django.db.models import Sum\n'), ((148, 73, 148, 93), 'django.db.models.Sum', 'Sum', (), '', False, 'from django.db.models import Sum\n'), ((149, 81, 149, 91), 'django.db.models.Sum', 'Sum', ({(149, 85, 149, 90): '"""fee"""'}, {}), "('fee')", False, 'from django.db.models import Sum\n'), ((208, 15, 208, 52), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', ({(208, 36, 208, 51): '"""admin-teacher"""'}, {}), "('admin-teacher')", False, 'from django.http import HttpResponseRedirect\n'), ((232, 20, 232, 52), 'django.shortcuts.reverse', 'reverse', ({(232, 28, 232, 51): '"""admin-approve-teacher"""'}, {}), "('admin-approve-teacher')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((323, 15, 323, 52), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', ({(323, 36, 323, 51): '"""admin-student"""'}, {}), "('admin-student')", False, 'from django.http import HttpResponseRedirect\n'), ((391, 20, 391, 52), 'django.shortcuts.reverse', 'reverse', ({(391, 28, 391, 51): '"""admin-approve-student"""'}, {}), "('admin-approve-student')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((49, 29, 49, 70), 'django.contrib.auth.models.Group.objects.get_or_create', 'Group.objects.get_or_create', (), '', False, 'from django.contrib.auth.models import Group\n'), ((52, 19, 52, 53), 'django.http.HttpResponseRedirect', 'HttpResponseRedirect', ({(52, 40, 52, 52): '"""adminlogin"""'}, {}), "('adminlogin')", False, 'from django.http import HttpResponseRedirect\n'), ((73, 31, 73, 74), 'django.contrib.auth.models.Group.objects.get_or_create', 'Group.objects.get_or_create', (), '', False, 'from django.contrib.auth.models import Group\n'), ((95, 31, 95, 74), 'django.contrib.auth.models.Group.objects.get_or_create', 'Group.objects.get_or_create', (), '', False, 'from django.contrib.auth.models import Group\n'), ((205, 31, 205, 74), 'django.contrib.auth.models.Group.objects.get_or_create', 'Group.objects.get_or_create', (), '', False, 'from django.contrib.auth.models import Group\n'), ((276, 19, 276, 49), 'django.shortcuts.redirect', 'redirect', ({(276, 28, 276, 48): '"""admin-view-teacher"""'}, {}), "('admin-view-teacher')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((319, 31, 319, 74), 'django.contrib.auth.models.Group.objects.get_or_create', 'Group.objects.get_or_create', (), '', False, 'from django.contrib.auth.models import Group\n'), ((373, 19, 373, 49), 'django.shortcuts.redirect', 'redirect', ({(373, 28, 373, 48): '"""admin-view-student"""'}, {}), "('admin-view-student')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((430, 19, 430, 47), 'django.shortcuts.redirect', 'redirect', ({(430, 28, 430, 46): '"""admin-attendance"""'}, {}), "('admin-attendance')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((448, 19, 448, 113), 'django.shortcuts.render', 'render', ({(448, 26, 448, 33): 'request', (448, 34, 448, 74): '"""school/admin_view_attendance_page.html"""', (448, 75, 448, 112): "{'cl': cl, 'mylist': mylist, 'date': date}"}, {}), "(request, 'school/admin_view_attendance_page.html', {'cl': cl,\n    'mylist': mylist, 'date': date})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((492, 19, 492, 46), 'django.shortcuts.redirect', 'redirect', ({(492, 28, 492, 45): '"""admin-dashboard"""'}, {}), "('admin-dashboard')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((541, 19, 541, 49), 'django.shortcuts.redirect', 'redirect', ({(541, 28, 541, 48): '"""teacher-attendance"""'}, {}), "('teacher-attendance')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((559, 19, 559, 115), 'django.shortcuts.render', 'render', ({(559, 26, 559, 33): 'request', (559, 34, 559, 76): '"""school/teacher_view_attendance_page.html"""', (559, 77, 559, 114): "{'cl': cl, 'mylist': mylist, 'date': date}"}, {}), "(request, 'school/teacher_view_attendance_page.html', {'cl': cl,\n    'mylist': mylist, 'date': date})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((576, 19, 576, 48), 'django.shortcuts.redirect', 'redirect', ({(576, 28, 576, 47): '"""teacher-dashboard"""'}, {}), "('teacher-dashboard')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((614, 19, 614, 107), 'django.shortcuts.render', 'render', ({(614, 26, 614, 33): 'request', (614, 34, 614, 76): '"""school/student_view_attendance_page.html"""', (614, 77, 614, 106): "{'mylist': mylist, 'date': date}"}, {}), "(request, 'school/student_view_attendance_page.html', {'mylist':\n    mylist, 'date': date})", False, 'from django.shortcuts import render, redirect, reverse\n'), ((640, 19, 640, 66), 'django.shortcuts.render', 'render', ({(640, 26, 640, 33): 'request', (640, 35, 640, 65): '"""school/contactussuccess.html"""'}, {}), "(request, 'school/contactussuccess.html')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((121, 19, 121, 48), 'django.shortcuts.redirect', 'redirect', ({(121, 28, 121, 47): '"""teacher-dashboard"""'}, {}), "('teacher-dashboard')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((123, 19, 123, 74), 'django.shortcuts.render', 'render', ({(123, 26, 123, 33): 'request', (123, 34, 123, 73): '"""school/teacher_wait_for_approval.html"""'}, {}), "(request, 'school/teacher_wait_for_approval.html')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((127, 19, 127, 48), 'django.shortcuts.redirect', 'redirect', ({(127, 28, 127, 47): '"""student-dashboard"""'}, {}), "('student-dashboard')", False, 'from django.shortcuts import render, redirect, reverse\n'), ((129, 19, 129, 74), 'django.shortcuts.render', 'render', ({(129, 26, 129, 33): 'request', (129, 34, 129, 73): '"""school/student_wait_for_approval.html"""'}, {}), "(request, 'school/student_wait_for_approval.html')", False, 'from django.shortcuts import render, redirect, reverse\n')]