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 ensure_csrf_cookie just in case #564

Open
fjsj opened this issue Dec 2, 2021 · 0 comments
Open

Add ensure_csrf_cookie just in case #564

fjsj opened this issue Dec 2, 2021 · 0 comments

Comments

@fjsj
Copy link
Member

fjsj commented Dec 2, 2021

Add ensure_csrf_cookie just in case.

From Django docs:

If your view is not rendering a template containing the csrf_token template tag, Django might not set the CSRF token cookie. This is common in cases where forms are dynamically added to the page. To address this case, Django provides a view decorator which forces setting of the cookie: ensure_csrf_cookie().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant