From 544f05a5a80961af13b3d9d14ffce44e3854cd5e Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 28 Apr 2021 14:05:48 -0500 Subject: [PATCH] Add csrftoken to TailboneForm js ugh..for now at least --- tailbone/templates/forms/deform_buefy.mako | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tailbone/templates/forms/deform_buefy.mako b/tailbone/templates/forms/deform_buefy.mako index 71684f1d..0f1ae184 100644 --- a/tailbone/templates/forms/deform_buefy.mako +++ b/tailbone/templates/forms/deform_buefy.mako @@ -104,6 +104,9 @@ let ${form.component_studly}Data = { + ## TODO: should find a better way to handle CSRF token + csrftoken: ${json.dumps(request.session.get_csrf_token() or request.session.new_csrf_token())|n}, + ## TODO: ugh, this seems pretty hacky. need to declare some data models ## for various field components to bind to... % if not form.readonly: