예제 #1
0
파일: views.py 프로젝트: schumannd/EvaP
def semester_grade_activation(request, semester_id, active):
    semester = get_object_or_404(Semester, id=semester_id)
    active = active == 'on'

    activation, created = SemesterGradeDownloadActivation.objects.update_or_create(
        semester=semester, defaults={'is_active': active})

    return staff_semester_view(request=request, semester_id=semester_id)
예제 #2
0
파일: views.py 프로젝트: JenniferStamm/EvaP
def semester_grade_activation(request, semester_id, active):
    semester = get_object_or_404(Semester, id=semester_id)
    active = active == 'on'

    SemesterGradeDownloadActivation.objects.update_or_create(
        semester=semester,
        defaults={'is_active': active})

    return staff_semester_view(request=request, semester_id=semester_id)