For the following model:
class MyModel(models.Model): name = models.CharField(max_length=110, help_text="Some sample help text.") def __unicode__(self): return u'%s' % (self.name)
And the following model form:
class MyModelForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(MyModelForm, self).__init__(*args, **kwargs) self.helper = FormHelper() self.helper.form_id = 'id-myModelForm' self.helper.form_class = 'form-horizontal' self.helper.form_action = 'my_model_form_url' self.helper.form_error_title = 'Form Errors' self.helper.help_text_inline = True class Meta: model = MyModel
Using the following pattern:
{% extends "base.html" %} {% block content %} {% load crispy_forms_tags %} {% crispy form %} {% endblock %}
help_text defined in the model is not displayed at all. It will be displayed if I change to self.helper.help_text_inline = False instead of self.helper.help_text_inline = True , but this is not what I want.
How do I get help_text to display using self.helper.help_text_inline = True ?
In the base.html file, everything loads correctly with the boot files.
source share