summaryrefslogtreecommitdiffstats
path: root/core/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/views.py')
-rw-r--r--core/views.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/core/views.py b/core/views.py
new file mode 100644
index 0000000..4e7cd41
--- /dev/null
+++ b/core/views.py
@@ -0,0 +1,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):
+ args = {"user": request.user}
+ return render(request, "core/profile.html", args)