Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
This is detailed in the documentation :
class SomeForm(forms.ModelForm):
class Meta:
mode = SomeModel
fields = ('one_field', 'another_field')
labels = {
'one_field': 'Метка отличающаяся от названия поля в модели',
}
widgets = {
'another_field': forms.TextInput(attrs={'class': 'some-class', 'placeholder': 'Lorem ipsum'}),
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question