summaryrefslogtreecommitdiffstats
path: root/core/views_other.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/views_other.py')
-rw-r--r--core/views_other.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/core/views_other.py b/core/views_other.py
index 07a4a75..4a10a53 100644
--- a/core/views_other.py
+++ b/core/views_other.py
@@ -23,15 +23,9 @@ def stats(request):
return render_with_context(request,'statistics.html', statsDict)
def frontpage(request):
- message = "no test message" #reverse('personn', kwargs={"name":"hkjhjh"})
- if "reloadexpos" in request.GET:
- message = LoadPersonsExpos()
- message = "Reloaded personexpos"
- if "reloadsurvex" in request.POST:
- message = LoadAllSurvexBlocks()
- message = "Reloaded survexblocks"
+ if request.user.is_authenticated:
+ return render_with_context(request,'tasks.html')
- #'randSent':randSent.randomLogbookSentence(),
expeditions = Expedition.objects.order_by("-year")
logbookentry = LogbookEntry
cave = Cave
@@ -153,3 +147,13 @@ def ajax_test(request):
def eyecandy(request):
return render_with_context(request,'eyecandy.html', {})
+
+def ajax_QM_number(request):
+ if request.method=='POST':
+ cave=Cave.objects.get(id=request.POST['cave'])
+ print cave
+ exp=Expedition.objects.get(pk=request.POST['year'])
+ print exp
+ res=cave.new_QM_number(exp.year)
+
+ return HttpResponse(res) \ No newline at end of file