3 ms·
Indeed, you can also create a Jinja macro to auto-insert the token into all of your forms too, here's a code example[0]. It's a 100% solved problem both on the
by nickjj 5y ago
Indeed, you can also create a Jinja macro to auto-insert the token into all of your forms too, here's a code example[0]. It's a 100% solved problem both on the Flask back-end and template side with an ability to opt out of it when you need to on the back-end such as when accepting webhooks from another service.
[0]: https://github.com/nickjj/build-a-saas-app-with-flask/blob/1c135c22c0724d50f6b506e8426dc7f58632fdf3/snakeeyes/templates/macros/form.html#L52 https://github.com/nickjj/build-a-saas-app-with-flask/blob/1...