diff options
author | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-05-13 05:35:11 +0100 |
---|---|---|
committer | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-05-13 05:35:11 +0100 |
commit | cda0a7a5e1126a8965549ae4e2e4af4ffb7d01d3 (patch) | |
tree | ac29bcd0040fd4e19e144104c68a41da3ad65d66 /expo/views_other.py | |
parent | b66189bc9e506109766b7377a46b0321bcca71e5 (diff) | |
download | troggle-cda0a7a5e1126a8965549ae4e2e4af4ffb7d01d3.tar.gz troggle-cda0a7a5e1126a8965549ae4e2e4af4ffb7d01d3.tar.bz2 troggle-cda0a7a5e1126a8965549ae4e2e4af4ffb7d01d3.zip |
[svn] Beginnings of expo calendar
Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8174 by aaron @ 1/18/2009 1:15 AM
Diffstat (limited to 'expo/views_other.py')
-rw-r--r-- | expo/views_other.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/expo/views_other.py b/expo/views_other.py index 88a8559..771816a 100644 --- a/expo/views_other.py +++ b/expo/views_other.py @@ -1,5 +1,5 @@ from django.shortcuts import render_to_response
-from troggle.expo.models import Cave, Expedition, Person, LogbookEntry
+from troggle.expo.models import Cave, Expedition, Person, LogbookEntry, PersonExpedition
import troggle.settings as settings
from django import forms
from django.db.models import Q
@@ -16,4 +16,15 @@ def stats(request): def frontPage(request):
- return render_to_response('index.html', {'randSent':randSent.randomLogbookSentence(),'settings':settings})
\ No newline at end of file + return render_to_response('index.html', {'randSent':randSent.randomLogbookSentence(),'settings':settings})
+
+def calendar(request,year):
+ week=['S','S','M','T','W','T','F']
+ if year:
+ expedition=Expedition.objects.get(year=year)
+ PersonExpeditions=expedition.personexpedition_set.all()
+
+ dictToPass=locals()
+ dictToPass.update({'settings':settings})
+ return render_to_response('calendar.html', dictToPass)
+
\ No newline at end of file |