summaryrefslogtreecommitdiffstats
path: root/expo/views_other.py
diff options
context:
space:
mode:
authorsubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-13 05:22:14 +0100
committersubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-13 05:22:14 +0100
commit29984ff15aad9910200c924f7fddf668104bc7c2 (patch)
tree4fec811cdf0fb9329ea4eab95b256ac402202e79 /expo/views_other.py
parent47604b1db2505d971fed3c1de93a24951a33038c (diff)
downloadtroggle-29984ff15aad9910200c924f7fddf668104bc7c2.tar.gz
troggle-29984ff15aad9910200c924f7fddf668104bc7c2.tar.bz2
troggle-29984ff15aad9910200c924f7fddf668104bc7c2.zip
[svn] Added cave and logbook search, collapsible footer navbar, useless statistics page. Also fixed broken css. Toying with forms but not committing those yet.
Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8081 by aaron @ 12/8/2008 4:28 AM
Diffstat (limited to 'expo/views_other.py')
-rw-r--r--expo/views_other.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/expo/views_other.py b/expo/views_other.py
new file mode 100644
index 0000000..808238e
--- /dev/null
+++ b/expo/views_other.py
@@ -0,0 +1,13 @@
+from django.shortcuts import render_to_response
+from troggle.expo.models import Cave, Expedition, Person, LogbookEntry
+import troggle.settings as settings
+from django import forms
+from django.db.models import Q
+
+def stats(request):
+ statsDict={}
+ statsDict['expoCount'] = int(Expedition.objects.count())
+ statsDict['caveCount'] = int(Cave.objects.count())
+ statsDict['personCount'] = int(Person.objects.count())
+ statsDict['logbookEntryCount'] = int(LogbookEntry.objects.count())
+ return render_to_response('statistics.html', statsDict) \ No newline at end of file