Я думал, что в темплейтах доступны все атрибуты объекта, а оказалось, что нет.
Возьмем объект forms:
Из контриба берем:
class UserCreationForm(forms.ModelForm):
"""
A form that creates a user, with no privileges, from the given username and password.
"""
username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^\w+$',
help_text = _("Required. 30 characters or fewer. Alphanumeric characters only (letters, digits and underscores)."),
error_message = _("This value must contain only letters, numbers and underscores."))
password1 = forms.CharField(label=_("Password"), widget=forms.PasswordInput)
password2 = forms.CharField(label=_("Password confirmation"), widget=forms.PasswordInput,
help_text = _("Enter the same password as above, for verification."))
....................
Вывожу как-то так:
<p>
{{ form.username.errors }}
<label for="id_username">{% trans "Имя пользователя" %}<span class="blue">*</span> :</label><br />
{{ form.username }}
<span>{{ form.username.help_text }}</span>
</p>
Вместо этого form.username.errors.
Ну, почему, как и что с доступом в темлейте к атрибутам объекта?