marten icon indicating copy to clipboard operation
marten copied to clipboard

Add a `csrf_input` template tag

Open ellmetha opened this issue 1 year ago • 0 comments

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 avatar Mar 05 '24 14:03 ellmetha