django-mailviews icon indicating copy to clipboard operation
django-mailviews copied to clipboard

Problem when upgrading to django 1.11: context must be a dict rather than Context.

Open coolmaksat opened this issue 6 years ago • 0 comments

template render function requires context to be dict in django 1.11 Traceback:

File "/venv/local/lib/python2.7/site-packages/mailviews/messages.py" in send 82. message = self.render_to_message(extra_context=extra_context, **kwargs)

File "/venv/local/lib/python2.7/site-packages/mailviews/messages.py" in render_to_message 60. subject=self.render_subject(context),

File "//venv/local/lib/python2.7/site-packages/mailviews/messages.py" in render_subject 161. rendered = self.subject_template.render(unescape(context))

File "/venv/local/lib/python2.7/site-packages/django/template/backends/django.py" in render 64. context = make_context(context, request, autoescape=self.backend.engine.autoescape)

File "/venv/local/lib/python2.7/site-packages/django/template/context.py" in make_context 287. raise TypeError('context must be a dict rather than %s.' % context.class.name)

Exception Type: TypeError at /accounts/request/demo/ Exception Value: context must be a dict rather than Context.

coolmaksat avatar Aug 28 '18 13:08 coolmaksat