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
This commit is contained in:
Sam Wenham
2019-04-14 22:45:31 +01:00
parent d1d0c24ed8
commit 23df89cf31
8 changed files with 37 additions and 15 deletions

View File

@@ -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)