21 lines
750 B
Python
21 lines
750 B
Python
from django.shortcuts import render
|
|
|
|
from django.contrib.auth.decorators import login_required
|
|
from eventplanner.snippets import addEventCountdownForNextEventToContext, addEventRouteForNextEventToContext
|
|
from eventplanner.models import EventParticipation
|
|
|
|
|
|
@login_required
|
|
def home_view(request):
|
|
context = dict()
|
|
|
|
# Event participation for slider text
|
|
if EventParticipation.isMember( request.user ):
|
|
context['hasParticipationSetForAllEvents'] = EventParticipation.hasUserSetParticipationForAllEvents( request.user)
|
|
|
|
addEventCountdownForNextEventToContext( context, request.user );
|
|
addEventRouteForNextEventToContext(context, request.user, 'Conc' )
|
|
|
|
return render( request, 'website/mainpage.html', context )
|
|
|