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:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user