Reputation: 2413
This doc explains how to gather form data for sending as mail. But, how can it be made to write the data to the database and made available in the admin interface?
Upvotes: 3
Views: 3480
Reputation: 86974
The simplest method would be to use ModelForm to create a form based on your model. Calling form.save()
on that form will automatically save your data to the database.
If you created your form manually, you will have to manually populate a model instance and then call .save()
on your model instance.
Upvotes: 7