1 2 3 | find . -type f -name "*.html" -exec sed -i \
's|\(<form[^>]*method="post"[^>]*>\)\({% csrf_token %}\)\?|\1{% csrf_token %}|g' \
{} \;
|
More like this
- Django csrf_token Template Tag Fix by Reustle 2 years, 9 months ago
- csrf_token for mako by damd 2 years, 12 months ago
- jinja2 csrf_token extension by jasongreen 3 years, 4 months ago
- SignedForm: CSRF-protect forms with a hidden token field by exogen 4 years, 8 months ago
- Ignore Csrf Middleware by coleifer 2 years, 11 months ago
Comments
That's very cool! I've been trying to do this for a while, without good results.
#