[Answered ]-Django form save or model save with a select field?

2👍

What you actually need, is a ModelForm. In your example you’re working with a standard forms.Form. This is not bound to a model instance. As a result, there’s also no need for a save method. The best examples are really given inside the Django docs:

https://docs.djangoproject.com/en/dev/topics/forms/modelforms/

Go step by step over the code examples and you’ll understand. It would be too much to explain it all in one Stackoverflow answer – and the Django docs are incredible thorough.

Leave a comment