1👍
In your question you’re missing the template tag {{ csrf_token }}
in your template.
From the 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().
- [Answer]-Python django – user object not found
- [Answer]-Search criteria language parser in Python?
- [Answer]-Implement synchronization logic in django application?
- [Answer]-Update only from's visible fields if parent model doesn't exist
Source:stackexchange.com