summaryrefslogtreecommitdiffstats
path: root/core/views_survex.py
diff options
context:
space:
mode:
authorSam Wenham <sam@wenhams.co.uk>2019-04-14 22:45:31 +0100
committerSam Wenham <sam@wenhams.co.uk>2019-04-14 22:45:31 +0100
commit23df89cf319f05cbad4cb769c05c5699fe9d3f4a (patch)
treeb2fdc953496cd2fd0b7c75fdf4e65a022b730581 /core/views_survex.py
parentd1d0c24ed8864e88f1f6e74c5ac5776fdeaf6f5a (diff)
downloadtroggle-23df89cf319f05cbad4cb769c05c5699fe9d3f4a.tar.gz
troggle-23df89cf319f05cbad4cb769c05c5699fe9d3f4a.tar.bz2
troggle-23df89cf319f05cbad4cb769c05c5699fe9d3f4a.zip
Fix CSRF issues in svx form
Set date formats Add DataIssue model and add errors to it to allow us to give people a list of stuff to fix
Diffstat (limited to 'core/views_survex.py')
-rw-r--r--core/views_survex.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/views_survex.py b/core/views_survex.py
index a0f4637..1e6c1bf 100644
--- a/core/views_survex.py
+++ b/core/views_survex.py
@@ -1,6 +1,7 @@
from django import forms
from django.http import HttpResponseRedirect, HttpResponse
-from django.shortcuts import render_to_response
+from django.shortcuts import render_to_response, render
+from django.core.context_processors import csrf
from django.http import HttpResponse, Http404
import re
import os
@@ -172,6 +173,7 @@ def svx(request, survex_file):
'difflist': difflist,
'logmessage':logmessage,
'form':form}
+ vmap.update(csrf(request))
if outputtype == "ajax":
return render_to_response('svxfiledifflistonly.html', vmap)
return render_to_response('svxfile.html', vmap)