css - There is any way to add classes to bootstrap_django form_fields? -
https://github.com/dyve/django-bootstrap3 much.
by way i'll need add classes customize ui , add behaviors class based. i'll template side.
i use that:
{% bootstrap_form form_field fixthis %}
but can't understand if: - project it's young, haven't feature - feature usable, i'm not able - general skill problem of mine on django: wrong approach problem
here docs: http://django-bootstrap3.readthedocs.org/en/latest/templatetags.html#bootstrap-field
edit: trick, still using django_bootstrap. way in form.py file. approach right or should keep trying move logic in template?
class authorform(forms.modelform): class meta: model = author fields = ['code','name','birthdate',] widgets = { 'birthdate': forms.textinput(attrs={'class': 'datepicker'}), }
use classes in form, following:
'email': textinput(attrs={'class': 'form-control', 'placeholder': ('type email here')}),
Comments
Post a Comment