def index(request): context = {} context.update(get_additional_context(request.session)) if request.user.is_authenticated(): return HttpResponseRedirect(reverse("timetrack:current_activities")) return render(request, "main/index.html", context)
def current_activities(request): user = get_object_or_404(User, id=request.user.id) activity_list = TimeEntry.objects.filter(user=user, done=False) context = { 'activity_list': activity_list, } context.update(get_additional_context(request.session)) return render(request, 'timetrack/currently_active.html', context)
def login_view(request): context = {} context.update(get_additional_context(request.session)) return render(request, "main/login.html", context)