I'm using Model Form which have custom CharField added.My question is, what is actually the standard way to access custom fields after POST request? This is the way I doing it now:
#inside ModelForm
date = CharField(label='date', widget=Select(choices=[
('', '---------'),
('N', 'Never')
]))
def __init__(self, *args, **kwargs):
self.date = args[0]['date'] #custom date CharField
return super(MyForm, self).__init__(*args, **kwargs)
def save(self, *args, **kwargs):
# processing self.date...
Is there a better way to do that? Also, date field is using choices as a source of input data.My guess is that choices are the right thing in this particular instance, building a table and model and then using queryset to retrieve a few values wouldn't help much, I guess.