Added editing of flat pages. Added slugfields to models to refer to them.

This commit is contained in:
Martin Green
2011-06-02 19:16:16 +01:00
parent ede9e4a9bd
commit 50545af223
17 changed files with 376 additions and 20 deletions

View File

@@ -78,4 +78,12 @@ def survey(request,year,wallet_number):
def cave_description(request, cavedescription_name):
cave_description = get_object_or_404(CaveDescription, short_name = cavedescription_name)
return render_with_context(request,'cave_description.html', locals())
return render_with_context(request,'cave_description.html', locals())
def get_entrances(request, caveslug):
cave = Cave.objects.get(slug = caveslug)
return render_with_context(request,'options.html', {"items": [(e.entrance.slug, e.entrance.slug) for e in cave.entrances()]})
def get_qms(request, caveslug):
cave = Cave.objects.get(slug = caveslug)
return render_with_context(request,'options.html', {"items": [(e.entrance.slug, e.entrance.slug) for e in cave.entrances()]})