I have a class-based view (IndexView at views.py) that shows a table with all the data stored in the database. This view is rendered in index.html<
There are multiple ways of loading data into forms, as far as I know:
You are using FormView
CBV which has a func called get_intial
:
def get_initial(self):
initial = super().get_initial()
initial[''] =
return initial
You can override the init func:
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields[''].initial =