diff --git a/core/utils.py b/core/utils.py index d88f39f..d77c474 100644 --- a/core/utils.py +++ b/core/utils.py @@ -15,6 +15,8 @@ from pathlib import Path from django.contrib.auth.models import User from troggle.core.models.troggle import Expedition +from troggle.core.models.troggle import Person + getcontext().prec = 2 # use 2 significant figures for decimal calculations diff --git a/core/views/expo.py b/core/views/expo.py index 63f1d33..821decc 100644 --- a/core/views/expo.py +++ b/core/views/expo.py @@ -408,6 +408,9 @@ def getmimetype(path): def editexpopage(request, path): """Manages the 'Edit this Page' capability for expo handbook and other html pages. Relies on HTML5 or javascript to provide the in-browser editing environment. + + If the user is logged-on with a personal logon, then the Full Name and email + address for the git commit are taken from their stored details, not from any stored cookie. """ try: # if a cave not a webpage at all. @@ -466,8 +469,9 @@ def editexpopage(request, path): if request.method == "POST": # If the form has been submitted... 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) + if not identified_login: + editor = pageform.cleaned_data["who_are_you"] + editor = git_string(editor) if filefound: headmatch = re.match(r"(.*)