summaryrefslogtreecommitdiffstats
path: root/core/views/survex.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2024-12-28 23:49:26 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2024-12-28 23:49:26 +0000
commitdac3e6e2889b1d194069c1b8d1eb98fea6d1f7eb (patch)
tree8a6f48048fdd5939b940e5d4d09b3051ae2fea07 /core/views/survex.py
parente7444d20a4759cc3b1a9232c5129499ba5e1abfc (diff)
downloadtroggle-dac3e6e2889b1d194069c1b8d1eb98fea6d1f7eb.tar.gz
troggle-dac3e6e2889b1d194069c1b8d1eb98fea6d1f7eb.tar.bz2
troggle-dac3e6e2889b1d194069c1b8d1eb98fea6d1f7eb.zip
Entrances now do cookie / git author thing. + tidyup.
Diffstat (limited to 'core/views/survex.py')
-rw-r--r--core/views/survex.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/views/survex.py b/core/views/survex.py
index afa6a69..5707720 100644
--- a/core/views/survex.py
+++ b/core/views/survex.py
@@ -324,8 +324,9 @@ def svx(request, survex_file):
if request.method == "POST": # If the form has been submitted...
rform = SvxForm(request.POST) #
- if rform.is_valid(): # All validation rules pass (how do we check it against the filename and users?)
+ if rform.is_valid(): # All Django syntax validation rules pass (how do we check it against a valid filename and users?)
editor = rform.cleaned_data["who_are_you"]
+ editor = git_string(editor)
rcode = rform.cleaned_data["code"]
outputtype = rform.cleaned_data["outputtype"] # used by CodeMirror ajax I think
difflist = form.DiffCode(rcode)
@@ -352,9 +353,8 @@ def svx(request, survex_file):
if "save" in rform.data:
if request.user.is_authenticated:
if difflist:
- editor = rform.cleaned_data["who_are_you"]
print(f"Saving code and editor id {editor=}")
- message = form.SaveCode(rcode, editor)
+ message = form.SaveCode(rcode, editor) # saves file and does git thing
else:
message = "NO DIFFERENCES - so not saving the file"
else: