Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a csrf_input template tag #200

Open
ellmetha opened this issue Mar 5, 2024 · 0 comments
Open

Add a csrf_input template tag #200

ellmetha opened this issue Mar 5, 2024 · 0 comments

Comments

@ellmetha
Copy link
Member

ellmetha commented Mar 5, 2024

Description

Marten already provides a csrf_token template tag in order to generate the CSRF token value and access it in templates. Let's also introduce a csrf_input template tag that will make it easy to generate the following form input containing the CSRF token:

<input type="hidden" name="csrftoken" value="{{ csrf_token }}" />

This will make it easier to write forms containing a CSRF token input and not bother about possible typos regarding the input name.

@ellmetha ellmetha added this to the v0.5.0 milestone Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant