Как правильно получить доступ к полю/полям родительской формы из метода очистки встроенной формы при обновлении
I am a little perplexed. Using CreateView, When I try to get the data of a field in the parent table's form from the (child table's) inline form's clean method I can do that:
def clean(self):
super(CreateMyItemsForm, self).clean()
cleaned_data = super(CreateMyItemsForm, self).clean()
var_date = self.data.get('valid_to_date') # NOTE: **valid_to_date** is a field in the parent table
Но при обновлении (с помощью UpdateView) тот же метод не работает.
Почему? Что я делаю не так?
Спасибо.