mkoistinen / cmsplugin-form-handler

This package provides a mechanism for handling form-submissions in django-CMS plugins.
MIT License
14 stars 10 forks source link

Unable to use ModelForm properly #10

Open milonline-eu opened 3 years ago

milonline-eu commented 3 years ago

FormPluginFormMixin is using 'instance' argument. https://github.com/mkoistinen/cmsplugin-form-handler/blob/05951cee0fa763e42960515d0471f46ef9b98cfd/cmsplugin_form_handler/forms.py#L9

At the same time ModelForm is using 'instance' argument too.

So there is no possibility for the form to be filled in by values from a Model.

Simple change of 'instance' argument to something like 'cms_instance' would clear up this issue.