Django 1.6
I have a working block of code in a Django form class as shown below. The data set from which I\'m building the form field list can include an initial val
I had that exact same problem and I solved it doing this:
def __init__(self, *args, **kwargs): instance = kwargs.get('instance', None) kwargs.update(initial={ # 'field': 'value' 'km_partida': '1020' }) super(ViagemForm, self).__init__(*args, **kwargs) # all other stuff