# -*- coding: utf-8 -*-
from django.shortcuts import render
from django.http import HttpResponse


from ..models import Student, Group, Ekzamyn

def ekzamyns(request):

    ekzamyns = Ekzamyn.objects.all()
    ekzamyns = ekzamyns.order_by('ekzamyn', 'ekzamyn_date', 'teacher', 'id', 'ekz_group')
  
    if request.GET.get ('reverse', '') == '1':
        ekzamyns = ekzamyns.reverse()
    return render(request, 'ekzamyns.html', {'ekzamyns':ekzamyns})
def ekzamyn_add(request):
    return HttpResponse('<h1>ekzamyn Add Form</h1>')
