Not sure it's very pretty but I didn't find any simpler solution yet, so here is what I did:
As I'd like to avoid updating all my forms, I'm going to define a standalone helper.
my_helpers.py
from crispy_forms.helper import FormHelper
class MyColFormHelper(FormHelper):
label_class = 'col-sm-3'
field_class = 'col-sm-9'
form_tag = False
disable_csrf = True
As I'd neither like to have to update all my views, I'm defining a context processor injecting the helper(s)
my_context_processors.py
from my_app.my_helpers import *
def form_helpers(request):
return {
'col_form': MyColFormHelper()
}
Now I can simply specify the helper directly from the template
<form action="my_action" method="my_method">{% csrf_token %}
{% crispy my_form col_form %}
</form>
This also allows me to use the same form in different locations and layouts.
This doesn't exactly answer to the question "default classes" but eased me the deployment of helpers.
The thing that I don't like much is that helpers are injected even if we don't need them.
So feel free to suggest any improvement.