From 1255ab751452e9d215827d6176e3d241f4f63d0c Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 9 Sep 2013 11:13:50 -0400 Subject: [PATCH] Add mitxmako.middleware to fix workers If mitxmako.middleware has ever been imported, then render_to_string works correctly (which is why we didn't see this in the rest of edx-platform). However, if it hasn't (like in a celery worker), then using mitxmako.middleware errors out. [LMS-1085] --- common/djangoapps/mitxmako/shortcuts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/common/djangoapps/mitxmako/shortcuts.py b/common/djangoapps/mitxmako/shortcuts.py index 974eaefdd3..356c80ced3 100644 --- a/common/djangoapps/mitxmako/shortcuts.py +++ b/common/djangoapps/mitxmako/shortcuts.py @@ -17,6 +17,7 @@ from django.http import HttpResponse import logging import mitxmako +import mitxmako.middleware from django.conf import settings from django.core.urlresolvers import reverse log = logging.getLogger(__name__)