-
Notifications
You must be signed in to change notification settings - Fork 1
/
views.py
29 lines (24 loc) · 992 Bytes
/
views.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from django.shortcuts import render_to_response
from ldap import *
from ecalendar.models import *
from django.template import RequestContext
from django.contrib.auth.models import User
def index(request):
if request.session.get('ldapU_is_auth'):
context=True
else:
context=False
return render_to_response('index.html',dict(request=request,context=context), context_instance=RequestContext(request))
def tour(request):
if request.session.get('ldapU_is_auth'):
context=True
else:
context=False
return render_to_response('tour.html',dict(request=request,context=context), context_instance=RequestContext(request))
def equip(request):
if request.session.get('ldapU_is_auth'):
context=True
else:
context=False
entries = Equipment.objects.filter(enabled=True).order_by('name')
return render_to_response('equip.html',{'entries':entries,'context':context },context_instance=RequestContext(request))