Exemple #1
0
    def get(self, request):
        s = Subjects.objects.all()

        return render(request, 'users/subjects/subjects.html', {
            'subjects': s,
            'is_subjects': True,
            'decan': is_decan(request)
        })
Exemple #2
0
    def get(self, request):
        g = Groups.objects.all()

        return render(request, 'users/groups/groups.html', {
            'groups': g,
            'is_groups': True,
            'decan': is_decan(request)
        })
Exemple #3
0
    def get(self, request, id):
        s = Subjects.objects.get(id=id)

        tid = request.session.get('tid')

        return render(request, 'users/subjects/subject.html', {
            'subject': s,
            'tid': tid,
            'decan': is_decan(request)
        })
Exemple #4
0
    def get(self, request):

        type = request.GET.get('type', '')

        ctx = {'is_people': True, 'decan': is_decan(request)}

        if type:
            p = People.objects.filter(type=type)
            ctx['people'] = p
            ctx['type'] = type
        else:
            return redirect(reverse('peopleAll') + '?type=S')

        if ctx['decan']:
            g = Groups.objects.all()
            ctx['groups'] = g

        return render(request, 'users/people/people.html', ctx)
Exemple #5
0
    def get(self, request, id):
        g = Groups.objects.get(id=id)

        ctx = {'group': g, 'decan': is_decan(request)}

        return render(request, "users/groups/group.html", ctx)