blob: 60f883788587f6ae99ab00e5fd4f82063a363cac (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from engagements.models import Engagement
@login_required
def index(request):
subs = Engagement.objects.sp().order_by("proposed_start_date")[:4]
subs_regulatory = Engagement.objects.sp_regulatory()[:4]
trans = Engagement.objects.tr()[:4]
context = dict(subs=subs, trans=trans, subs_regulatory=subs_regulatory)
return render(request, "core/index.html", context)
@login_required
def dashboard(request):
return render(request, "core/dashboard.html", {"section": "dashboard"})
@login_required
def profile(request):
context = {"user": request.user}
return render(request, "core/profile.html", context)
|