diff options
Diffstat (limited to 'expo/views_caves.py')
-rw-r--r-- | expo/views_caves.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/expo/views_caves.py b/expo/views_caves.py index 045dbcf..4e691e5 100644 --- a/expo/views_caves.py +++ b/expo/views_caves.py @@ -1,5 +1,6 @@ from django.shortcuts import render_to_response
from troggle.expo.models import Cave, CaveAndEntrance, Survey, Expedition
+import troggle.expo.models as models
import troggle.settings as settings
from troggle.expo.forms import CaveForm
import search
@@ -20,6 +21,11 @@ def ent(request, cave_id, ent_letter): 'entrance': cave_and_ent.entrance,
'letter': cave_and_ent.entrance_letter,
'settings': settings})
+def survexblock(request, survexpath):
+ survexblock = models.SurvexBlock.objects.get(survexpath=survexpath)
+ #ftext = survexblock.filecontents()
+ ftext = survexblock.text
+ return render_to_response('survexblock.html', {'survexblock':survexblock, 'ftext':ftext, 'settings':settings })
def caveSearch(request):
query_string = ''
@@ -54,4 +60,5 @@ def survey(request,year,wallet_number): dictToPass=locals()
dictToPass.update({'settings':settings})
- return render_to_response('survey.html',dictToPass)
\ No newline at end of file + return render_to_response('survey.html',dictToPass)
+
|