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

Add get_form_kwargs to allow extra parameters to be passed to the form #6

Closed nickdjones closed 7 years ago

nickdjones commented 7 years ago

Useful if you want to pass the request object or the current user to the plugin form. Follows standard Django implementation like the rest of the functions.

mkoistinen commented 7 years ago

@hcNick Thank you for your contribution. I have pulled this into a newly created develop branch which contains the next release. I would like ask if you could test this branch in your project(s).

In particular, I've changed the signature to be: get_form_kwargs(self, request, instance) and modified code throughout to support this.

Please let me know if you face any issues with this updated code.