When creating a form, I want to use one field in the model as a label for navigating with another updated field.
I overridden BaseModelFormSet with the new ___init____ method, for example:
class BaseMyFormSet(BaseModelFormSet):
def __init__(self, *args, **kwargs):
super(BaseMyFormSet, self).__init__(*args, **kwargs)
for form in self.forms:
form.fields['value'].label = ???
How can I refer to another field in the model so that I can use it as a label value?
(Alternatively, if there is a better way to redefine the shortcut as I need, this is also very useful.)
Thanks.
source
share