maccesch / cmsplugin-contact

Extendable contact plugin for django-cms with spam protection and i18n
BSD 2-Clause "Simplified" License
71 stars 62 forks source link

Custom contact form template not loaded #90

Closed fsbraun closed 6 years ago

fsbraun commented 7 years ago

I have an issue and cannot load a form from a custom template.

I use a subclass for ContactForm to overwrite the template class variable to something like "bootstrap/contactform.html" and register the alternative form in the project's settings file as described in the docs. However, no matter what I do, only the standard template "cmsplugin_contact/contact.html" is loaded.

If I look into cms_plugins.py it seems to me that the render method of the ContactPlugin class does not change its own render_template variable but only the plugin instance's variable. (Actually I am not sure why this is not the same.) With a quick and dirty check I get the desired result if I add the line self.render_template = instance.render_template after line 167 if file cms_plugins.py. Can you check this?

Thanks very much! Fabian