Always store CSRF token for each page in Vue.js theme

so child components don't have to "redefine" it.  at least, those that know
about the page already having it...
This commit is contained in:
Lance Edgar 2019-10-30 20:38:33 -05:00
parent 8ff69e8eda
commit 4a35c231f8

View file

@ -35,7 +35,10 @@
methods: {} methods: {}
} }
let ThisPageData = {} let ThisPageData = {
## 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},
}
</script> </script>
</%def> </%def>