1
0
Fork 0

fix: omit id attr when rendering hidden input for CSRF token

since there can be more than one of these, if multiple forms
This commit is contained in:
Lance Edgar 2024-11-19 20:12:33 -06:00
parent c89da0ee41
commit fab27e8153

View file

@ -473,7 +473,7 @@ def render_csrf_token(request, name='_csrf'):
See also :func:`get_csrf_token()`. See also :func:`get_csrf_token()`.
""" """
token = get_csrf_token(request) token = get_csrf_token(request)
return HTML.tag('div', tags.hidden(name, value=token), style='display:none;') return HTML.tag('div', tags.hidden(name, value=token, id=None), style='display:none;')
def get_model_fields(config, model_class=None): def get_model_fields(config, model_class=None):