Allowed user to select/upload images when editing. When uploaded thumbnails and description pages are automatically created. Git commiting can now handle multiple files at once.

This commit is contained in:
Martin Green
2022-06-25 23:17:19 +01:00
parent b3d9e81499
commit 20583b04c0
9 changed files with 313 additions and 19 deletions

View File

@@ -359,7 +359,7 @@ def editexpopage(request, path):
if result != html: # Check if content changed
try:
change_message = pageform.cleaned_data["change_message"]
version_control.write_and_commit(filepath, result, f'{change_message} - online edit of {path}')
version_control.write_and_commit([(filepath, result, "utf-8")], f'{change_message} - online edit of {path}')
except version_control.WriteAndCommitError as e:
return render(request,'errors/generic.html', {'message': e.message})