mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-17 05:37:14 +00:00
Entrances now do cookie / git author thing. + tidyup.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user