About Custom Form Attributes using Django Crispy Forms
You can add custom form attributes to the django-crispy-forms helper by accessing its attrs
attribute, like so:
form_helper = FormHelper()
form_helper.form_method = "POST"
form_helper.attrs["novalidate"] = "novalidate"
form_helper.attrs["data-hello"] = "Hello, World!"
Tips and Tricks Programming Django 4.2 Django 3.2 Django 2.2 django-crispy-forms
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.