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

Django 1.8 support (aka "ImportError: cannot import name find_template") #81

Closed bittner closed 9 years ago

bittner commented 9 years ago

I'm trying to upgrade a project that uses cmsplugin-contact to Django 1.8.4 and django CMS 3.1.2 (using Python 2.7.5+ on Ubuntu).

Django 1.8 has introduced changes to the templates (multiple template engine support), and this seems to break backwards compatibility. I now get the following error with cmsplugin-contact==1.1.0 when I run python manage.py runserver:

  ...
  File "<site-packages>/cmsplugin_contact/cms_plugins.py", line 8, in <module>
    from django.template.loader import render_to_string, find_template, TemplateDoesNotExist
ImportError: cannot import name find_template

I've done a quick research, but no solution so far where find_template() has gone in 1.8 and what to use instead (if applicable). Here are some links I found:

bittner commented 9 years ago

PR #82 obviously fixes this issue.