summaryrefslogtreecommitdiffstats
path: root/expo/views_caves.py
diff options
context:
space:
mode:
Diffstat (limited to 'expo/views_caves.py')
-rw-r--r--expo/views_caves.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/expo/views_caves.py b/expo/views_caves.py
index 1f108f8..8d0a4f4 100644
--- a/expo/views_caves.py
+++ b/expo/views_caves.py
@@ -1,5 +1,5 @@
from django.shortcuts import render_to_response
-from troggle.expo.models import Cave, CaveAndEntrance
+from troggle.expo.models import Cave, CaveAndEntrance, Survey
import troggle.settings as settings
from troggle.expo.forms import CaveForm
import search
@@ -33,5 +33,17 @@ def caveSearch(request):
{ 'query_string': query_string, 'found_entries': found_entries, 'settings': settings})
#context_instance=RequestContext(request))
-
-
+def surveyindex(request):
+ surveys=Survey.objects.all()
+ return render_to_response('survey.html',{'settings':settings,'surveys':surveys})
+
+def survey(request,survey_id):
+ surveys=Survey.objects.all()
+ current_survey=Survey.objects.get(pk=survey_id)
+ notes=current_survey.scannedimage_set.filter(contents='notes')
+ planSketches=current_survey.scannedimage_set.filter(contents='plan')
+ elevationSketches=current_survey.scannedimage_set.filter(contents='elevation')
+ dictToPass=locals()
+ dictToPass.update({'settings':settings})
+
+ return render_to_response('survey.html',dictToPass) \ No newline at end of file