2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-17 08:37:26 +00:00

Entrances now do cookie / git author thing. + tidyup.

This commit is contained in:
2024-12-28 23:49:26 +00:00
parent e7444d20a4
commit dac3e6e288
7 changed files with 43 additions and 24 deletions

View File

@@ -457,6 +457,7 @@ def editexpopage(request, path):
pageform = ExpoPageForm(request.POST) # A form bound to the POST data
if pageform.is_valid(): # Form valid therefore write file
editor = pageform.cleaned_data["who_are_you"]
editor = git_string(editor)
# print("### \n", str(pageform)[0:300])
# print("### \n csrfmiddlewaretoken: ",request.POST['csrfmiddlewaretoken'])
if filefound:
@@ -489,6 +490,7 @@ def editexpopage(request, path):
try:
change_message = pageform.cleaned_data["change_message"]
editor = pageform.cleaned_data["who_are_you"]
editor = git_string(editor)
write_and_commit([(filepath, result, "utf-8")], f"{change_message} - online edit of {path}", editor)
except WriteAndCommitError as e:
return render(request, "errors/generic.html", {"message": e.message})