diff options
Diffstat (limited to 'core/views/survex.py')
-rw-r--r-- | core/views/survex.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/views/survex.py b/core/views/survex.py index c909a40..afa6a69 100644 --- a/core/views/survex.py +++ b/core/views/survex.py @@ -19,7 +19,7 @@ from troggle.core.models.caves import Cave, GetCaveLookup from troggle.core.models.logbooks import LogbookEntry from troggle.core.models.survex import SurvexBlock, SurvexFile #, SurvexDirectory from troggle.core.models.wallets import Wallet -from troggle.core.utils import COOKIE_MAX_AGE, current_expo, git_string, add_commit +from troggle.core.utils import COOKIE_MAX_AGE, current_expo, get_cookie, git_string, add_commit from troggle.parsers.survex import parse_one_file """Everything that views survexfiles @@ -313,10 +313,7 @@ def svx(request, survex_file): nowtime = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") outputtype = "normal" - print(f"Reading cookie...") - editor_id = request.COOKIES.get('editor_id', 'speleologist') # if no cookie, then default string - editor = git_string(editor_id) # belt and braces, should have been validity checked on saving already - print(f"Cookie read: {editor_id=} reformatted as: {editor=}") + editor = get_cookie(request) form = SvxForm({"filename": survex_file, "dirname": dirname, "datetime": nowtime, "outputtype": outputtype, "who_are_you":editor}) |