views.py
def stu_view(request): ug = department.objects.all().filter(mode=\'UG\') pg = department.objects.all().filter(mode=\'PG\')