Closed faulander closed 4 years ago
Maybe the form has errors and you’re not seeing them because you’re not rendering errors in the template
And to answer your first problem, that blank row at the end is how you'd define new rows in your settings table. It's there because extra=1
is the default value for django.forms.formsets.formset_factory()
. If you don't want an extra form, set
class UpdateSettings:
...
factory_kwargs = {'extra': 0}
this is in the docs.
I have two problems, i have a flat table with settings in my db, structure is: setting: char value: char
First Problem: It shows an empty field combination at the end:
Second problem: It doesn't save the data, no error, no redirect to the success page, nothing.
my views.py:
my settings.html: