Commit 69899e24 by David Baumgold

Merge pull request #1823 from edx/db/mitxmako-edxmako

mitxmako => edxmako
parents e872c4f2 8eff4427
...@@ -7,7 +7,7 @@ from django.views.decorators.http import require_http_methods ...@@ -7,7 +7,7 @@ from django.views.decorators.http import require_http_methods
from django_future.csrf import ensure_csrf_cookie from django_future.csrf import ensure_csrf_cookie
from django.views.decorators.http import require_POST from django.views.decorators.http import require_POST
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from cache_toolbox.core import del_cached_content from cache_toolbox.core import del_cached_content
from xmodule.contentstore.django import contentstore from xmodule.contentstore.django import contentstore
......
...@@ -6,7 +6,7 @@ from django.http import HttpResponseBadRequest ...@@ -6,7 +6,7 @@ from django.http import HttpResponseBadRequest
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.views.decorators.http import require_http_methods from django.views.decorators.http import require_http_methods
from django_future.csrf import ensure_csrf_cookie from django_future.csrf import ensure_csrf_cookie
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from django.http import HttpResponseNotFound from django.http import HttpResponseNotFound
from django.core.exceptions import PermissionDenied from django.core.exceptions import PermissionDenied
from xmodule.modulestore.django import loc_mapper from xmodule.modulestore.django import loc_mapper
......
...@@ -9,7 +9,7 @@ from django.core.exceptions import PermissionDenied ...@@ -9,7 +9,7 @@ from django.core.exceptions import PermissionDenied
from django_future.csrf import ensure_csrf_cookie from django_future.csrf import ensure_csrf_cookie
from django.conf import settings from django.conf import settings
from xmodule.modulestore.exceptions import ItemNotFoundError from xmodule.modulestore.exceptions import ItemNotFoundError
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from xmodule.modulestore.django import modulestore from xmodule.modulestore.django import modulestore
from xmodule.util.date_utils import get_default_time_display from xmodule.util.date_utils import get_default_time_display
......
...@@ -16,7 +16,7 @@ from django.core.exceptions import PermissionDenied ...@@ -16,7 +16,7 @@ from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.http import HttpResponseBadRequest, HttpResponseNotFound from django.http import HttpResponseBadRequest, HttpResponseNotFound
from util.json_request import JsonResponse from util.json_request import JsonResponse
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from xmodule.error_module import ErrorDescriptor from xmodule.error_module import ErrorDescriptor
from xmodule.modulestore.django import modulestore, loc_mapper from xmodule.modulestore.django import modulestore, loc_mapper
......
...@@ -4,7 +4,7 @@ These views will NOT be shown on production: trying to access them will result ...@@ -4,7 +4,7 @@ These views will NOT be shown on production: trying to access them will result
in a 404 error. in a 404 error.
""" """
# pylint: disable=W0613 # pylint: disable=W0613
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
def dev_mode(request): def dev_mode(request):
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
from django.http import (HttpResponse, HttpResponseServerError, from django.http import (HttpResponse, HttpResponseServerError,
HttpResponseNotFound) HttpResponseNotFound)
from mitxmako.shortcuts import render_to_string, render_to_response from edxmako.shortcuts import render_to_string, render_to_response
import functools import functools
import json import json
......
from django.http import HttpResponse from django.http import HttpResponse
from django.shortcuts import redirect from django.shortcuts import redirect
from mitxmako.shortcuts import render_to_string, render_to_response from edxmako.shortcuts import render_to_string, render_to_response
__all__ = ['edge', 'event', 'landing'] __all__ = ['edge', 'event', 'landing']
......
...@@ -21,7 +21,7 @@ from django.http import HttpResponseNotFound ...@@ -21,7 +21,7 @@ from django.http import HttpResponseNotFound
from django.views.decorators.http import require_http_methods, require_GET from django.views.decorators.http import require_http_methods, require_GET
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from auth.authz import create_all_course_groups from auth.authz import create_all_course_groups
from xmodule.modulestore.xml_importer import import_from_xml from xmodule.modulestore.xml_importer import import_from_xml
......
...@@ -30,7 +30,7 @@ from student.models import CourseEnrollment ...@@ -30,7 +30,7 @@ from student.models import CourseEnrollment
from django.http import HttpResponseBadRequest from django.http import HttpResponseBadRequest
from xblock.fields import Scope from xblock.fields import Scope
from preview import handler_prefix, get_preview_html from preview import handler_prefix, get_preview_html
from mitxmako.shortcuts import render_to_response, render_to_string from edxmako.shortcuts import render_to_response, render_to_string
from models.settings.course_grading import CourseGradingModel from models.settings.course_grading import CourseGradingModel
__all__ = ['orphan_handler', 'xblock_handler'] __all__ = ['orphan_handler', 'xblock_handler']
......
...@@ -5,7 +5,7 @@ from django.conf import settings ...@@ -5,7 +5,7 @@ from django.conf import settings
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.http import Http404, HttpResponseBadRequest from django.http import Http404, HttpResponseBadRequest
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from mitxmako.shortcuts import render_to_response, render_to_string from edxmako.shortcuts import render_to_response, render_to_string
from xmodule_modifiers import replace_static_urls, wrap_xblock from xmodule_modifiers import replace_static_urls, wrap_xblock
from xmodule.error_module import ErrorDescriptor from xmodule.error_module import ErrorDescriptor
......
...@@ -6,7 +6,7 @@ from django.core.context_processors import csrf ...@@ -6,7 +6,7 @@ from django.core.context_processors import csrf
from django.shortcuts import redirect from django.shortcuts import redirect
from django.conf import settings from django.conf import settings
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from external_auth.views import ssl_login_shortcut from external_auth.views import ssl_login_shortcut
......
...@@ -9,7 +9,7 @@ from django.contrib.auth.decorators import login_required ...@@ -9,7 +9,7 @@ from django.contrib.auth.decorators import login_required
from django.core.exceptions import PermissionDenied from django.core.exceptions import PermissionDenied
from django_future.csrf import ensure_csrf_cookie from django_future.csrf import ensure_csrf_cookie
from django.views.decorators.http import require_http_methods from django.views.decorators.http import require_http_methods
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from xmodule.modulestore import Location from xmodule.modulestore import Location
from xmodule.modulestore.inheritance import own_metadata from xmodule.modulestore.inheritance import own_metadata
from xmodule.modulestore.django import modulestore from xmodule.modulestore.django import modulestore
......
...@@ -6,7 +6,7 @@ from django.views.decorators.http import require_http_methods ...@@ -6,7 +6,7 @@ from django.views.decorators.http import require_http_methods
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from django.views.decorators.http import require_POST from django.views.decorators.http import require_POST
from django_future.csrf import ensure_csrf_cookie from django_future.csrf import ensure_csrf_cookie
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from xmodule.modulestore.django import modulestore, loc_mapper from xmodule.modulestore.django import modulestore, loc_mapper
from util.json_request import JsonResponse, expect_json from util.json_request import JsonResponse, expect_json
......
...@@ -8,7 +8,7 @@ from course_creators.views import update_course_creator_group ...@@ -8,7 +8,7 @@ from course_creators.views import update_course_creator_group
from ratelimitbackend import admin from ratelimitbackend import admin
from django.conf import settings from django.conf import settings
from django.dispatch import receiver from django.dispatch import receiver
from mitxmako.shortcuts import render_to_string from edxmako.shortcuts import render_to_string
from django.core.mail import send_mail from django.core.mail import send_mail
from smtplib import SMTPException from smtplib import SMTPException
......
...@@ -34,7 +34,7 @@ DOC_STORE_CONFIG = { ...@@ -34,7 +34,7 @@ DOC_STORE_CONFIG = {
MODULESTORE_OPTIONS = { MODULESTORE_OPTIONS = {
'default_class': 'xmodule.raw_module.RawDescriptor', 'default_class': 'xmodule.raw_module.RawDescriptor',
'fs_root': TEST_ROOT / "data", 'fs_root': TEST_ROOT / "data",
'render_template': 'mitxmako.shortcuts.render_to_string', 'render_template': 'edxmako.shortcuts.render_to_string',
} }
MODULESTORE = { MODULESTORE = {
......
...@@ -161,7 +161,7 @@ MIDDLEWARE_CLASSES = ( ...@@ -161,7 +161,7 @@ MIDDLEWARE_CLASSES = (
'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.messages.middleware.MessageMiddleware',
'track.middleware.TrackMiddleware', 'track.middleware.TrackMiddleware',
'mitxmako.middleware.MakoMiddleware', 'edxmako.middleware.MakoMiddleware',
# Detects user-requested locale from 'accept-language' header in http request # Detects user-requested locale from 'accept-language' header in http request
'django.middleware.locale.LocaleMiddleware', 'django.middleware.locale.LocaleMiddleware',
...@@ -393,7 +393,7 @@ INSTALLED_APPS = ( ...@@ -393,7 +393,7 @@ INSTALLED_APPS = (
'datadog', 'datadog',
# For asset pipelining # For asset pipelining
'mitxmako', 'edxmako',
'pipeline', 'pipeline',
'staticfiles', 'staticfiles',
'static_replace', 'static_replace',
......
...@@ -30,7 +30,7 @@ DOC_STORE_CONFIG = { ...@@ -30,7 +30,7 @@ DOC_STORE_CONFIG = {
modulestore_options = { modulestore_options = {
'default_class': 'xmodule.raw_module.RawDescriptor', 'default_class': 'xmodule.raw_module.RawDescriptor',
'fs_root': GITHUB_REPO_ROOT, 'fs_root': GITHUB_REPO_ROOT,
'render_template': 'mitxmako.shortcuts.render_to_string', 'render_template': 'edxmako.shortcuts.render_to_string',
} }
MODULESTORE = { MODULESTORE = {
......
...@@ -60,7 +60,7 @@ DOC_STORE_CONFIG = { ...@@ -60,7 +60,7 @@ DOC_STORE_CONFIG = {
MODULESTORE_OPTIONS = { MODULESTORE_OPTIONS = {
'default_class': 'xmodule.raw_module.RawDescriptor', 'default_class': 'xmodule.raw_module.RawDescriptor',
'fs_root': TEST_ROOT / "data", 'fs_root': TEST_ROOT / "data",
'render_template': 'mitxmako.shortcuts.render_to_string', 'render_template': 'edxmako.shortcuts.render_to_string',
} }
MODULESTORE = { MODULESTORE = {
......
...@@ -9,7 +9,7 @@ import logging ...@@ -9,7 +9,7 @@ import logging
import re import re
from courseware.courses import get_course_with_access from courseware.courses import get_course_with_access
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from . import cohorts from . import cohorts
......
...@@ -13,7 +13,7 @@ from django.utils.translation import ugettext as _ ...@@ -13,7 +13,7 @@ from django.utils.translation import ugettext as _
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator from django.utils.decorators import method_decorator
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from course_modes.models import CourseMode from course_modes.models import CourseMode
from courseware.access import has_access from courseware.access import has_access
......
...@@ -6,7 +6,7 @@ from django.template.loader import make_origin, get_template_from_string ...@@ -6,7 +6,7 @@ from django.template.loader import make_origin, get_template_from_string
from django.template.loaders.filesystem import Loader as FilesystemLoader from django.template.loaders.filesystem import Loader as FilesystemLoader
from django.template.loaders.app_directories import Loader as AppDirectoriesLoader from django.template.loaders.app_directories import Loader as AppDirectoriesLoader
from mitxmako.template import Template from edxmako.template import Template
import tempdir import tempdir
......
...@@ -16,8 +16,8 @@ from django.template import Context ...@@ -16,8 +16,8 @@ from django.template import Context
from django.http import HttpResponse from django.http import HttpResponse
import logging import logging
import mitxmako import edxmako
import mitxmako.middleware import edxmako.middleware
from django.conf import settings from django.conf import settings
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
...@@ -81,15 +81,15 @@ def render_to_string(template_name, dictionary, context=None, namespace='main'): ...@@ -81,15 +81,15 @@ def render_to_string(template_name, dictionary, context=None, namespace='main'):
context_instance['marketing_link'] = marketing_link context_instance['marketing_link'] = marketing_link
# In various testing contexts, there might not be a current request context. # In various testing contexts, there might not be a current request context.
if mitxmako.middleware.requestcontext is not None: if edxmako.middleware.requestcontext is not None:
for d in mitxmako.middleware.requestcontext: for d in edxmako.middleware.requestcontext:
context_dictionary.update(d) context_dictionary.update(d)
for d in context_instance: for d in context_instance:
context_dictionary.update(d) context_dictionary.update(d)
if context: if context:
context_dictionary.update(context) context_dictionary.update(context)
# fetch and render template # fetch and render template
template = mitxmako.lookup[namespace].get_template(template_name) template = edxmako.lookup[namespace].get_template(template_name)
return template.render_unicode(**context_dictionary) return template.render_unicode(**context_dictionary)
......
...@@ -6,7 +6,7 @@ import tempdir ...@@ -6,7 +6,7 @@ import tempdir
from django.conf import settings from django.conf import settings
from mako.lookup import TemplateLookup from mako.lookup import TemplateLookup
import mitxmako import edxmako
def run(): def run():
...@@ -30,4 +30,4 @@ def run(): ...@@ -30,4 +30,4 @@ def run():
encoding_errors='replace', encoding_errors='replace',
) )
mitxmako.lookup = lookup edxmako.lookup = lookup
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
from django.conf import settings from django.conf import settings
from mako.template import Template as MakoTemplate from mako.template import Template as MakoTemplate
from mitxmako.shortcuts import marketing_link from edxmako.shortcuts import marketing_link
import mitxmako import edxmako
import mitxmako.middleware import edxmako.middleware
django_variables = ['lookup', 'output_encoding', 'encoding_errors'] django_variables = ['lookup', 'output_encoding', 'encoding_errors']
...@@ -34,7 +34,7 @@ class Template(MakoTemplate): ...@@ -34,7 +34,7 @@ class Template(MakoTemplate):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Overrides base __init__ to provide django variable overrides""" """Overrides base __init__ to provide django variable overrides"""
if not kwargs.get('no_django', False): if not kwargs.get('no_django', False):
overrides = dict([(k, getattr(mitxmako, k, None),) for k in django_variables]) overrides = dict([(k, getattr(edxmako, k, None),) for k in django_variables])
overrides['lookup'] = overrides['lookup']['main'] overrides['lookup'] = overrides['lookup']['main']
kwargs.update(overrides) kwargs.update(overrides)
super(Template, self).__init__(*args, **kwargs) super(Template, self).__init__(*args, **kwargs)
...@@ -48,8 +48,8 @@ class Template(MakoTemplate): ...@@ -48,8 +48,8 @@ class Template(MakoTemplate):
context_dictionary = {} context_dictionary = {}
# In various testing contexts, there might not be a current request context. # In various testing contexts, there might not be a current request context.
if mitxmako.middleware.requestcontext is not None: if edxmako.middleware.requestcontext is not None:
for d in mitxmako.middleware.requestcontext: for d in edxmako.middleware.requestcontext:
context_dictionary.update(d) context_dictionary.update(d)
for d in context_instance: for d in context_instance:
context_dictionary.update(d) context_dictionary.update(d)
......
from django.test import TestCase from django.test import TestCase
from django.test.utils import override_settings from django.test.utils import override_settings
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from mitxmako.shortcuts import marketing_link from edxmako.shortcuts import marketing_link
from mock import patch from mock import patch
from util.testing import UrlResetMixin from util.testing import UrlResetMixin
class ShortcutsTests(UrlResetMixin, TestCase): class ShortcutsTests(UrlResetMixin, TestCase):
""" """
Test the mitxmako shortcuts file Test the edxmako shortcuts file
""" """
@override_settings(MKTG_URLS={'ROOT': 'dummy-root', 'ABOUT': '/about-us'}) @override_settings(MKTG_URLS={'ROOT': 'dummy-root', 'ABOUT': '/about-us'})
@override_settings(MKTG_URL_LINK_MAP={'ABOUT': 'login'}) @override_settings(MKTG_URL_LINK_MAP={'ABOUT': 'login'})
......
...@@ -28,7 +28,7 @@ from django.utils.http import urlquote, is_safe_url ...@@ -28,7 +28,7 @@ from django.utils.http import urlquote, is_safe_url
from django.shortcuts import redirect from django.shortcuts import redirect
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from mitxmako.shortcuts import render_to_response, render_to_string from edxmako.shortcuts import render_to_response, render_to_string
try: try:
from django.views.decorators.csrf import csrf_exempt from django.views.decorators.csrf import csrf_exempt
except ImportError: except ImportError:
......
...@@ -5,7 +5,7 @@ import json ...@@ -5,7 +5,7 @@ import json
from django.conf import settings from django.conf import settings
from django.http import HttpResponse from django.http import HttpResponse
from staticfiles.storage import staticfiles_storage from staticfiles.storage import staticfiles_storage
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
def get_xmodule_urls(): def get_xmodule_urls():
......
from mitxmako.shortcuts import render_to_string from edxmako.shortcuts import render_to_string
from pipeline.conf import settings from pipeline.conf import settings
from pipeline.packager import Packager from pipeline.packager import Packager
......
from django.core.management.base import BaseCommand from django.core.management.base import BaseCommand
from django.contrib.auth.models import User from django.contrib.auth.models import User
import mitxmako import edxmako
class Command(BaseCommand): class Command(BaseCommand):
...@@ -15,8 +15,8 @@ body, and an _subject.txt for the subject. ''' ...@@ -15,8 +15,8 @@ body, and an _subject.txt for the subject. '''
#text = open(args[0]).read() #text = open(args[0]).read()
#subject = open(args[1]).read() #subject = open(args[1]).read()
users = User.objects.all() users = User.objects.all()
text = mitxmako.lookup['main'].get_template('email/' + args[0] + ".txt").render() text = edxmako.lookup['main'].get_template('email/' + args[0] + ".txt").render()
subject = mitxmako.lookup['main'].get_template('email/' + args[0] + "_subject.txt").render().strip() subject = edxmako.lookup['main'].get_template('email/' + args[0] + "_subject.txt").render().strip()
for user in users: for user in users:
if user.is_active: if user.is_active:
user.email_user(subject, text) user.email_user(subject, text)
...@@ -4,7 +4,7 @@ import time ...@@ -4,7 +4,7 @@ import time
from django.core.management.base import BaseCommand from django.core.management.base import BaseCommand
from django.conf import settings from django.conf import settings
import mitxmako import edxmako
from django.core.mail import send_mass_mail from django.core.mail import send_mass_mail
import sys import sys
...@@ -39,8 +39,8 @@ rate -- messages per second ...@@ -39,8 +39,8 @@ rate -- messages per second
users = [u.strip() for u in open(user_file).readlines()] users = [u.strip() for u in open(user_file).readlines()]
message = mitxmako.lookup['main'].get_template('emails/' + message_base + "_body.txt").render() message = edxmako.lookup['main'].get_template('emails/' + message_base + "_body.txt").render()
subject = mitxmako.lookup['main'].get_template('emails/' + message_base + "_subject.txt").render().strip() subject = edxmako.lookup['main'].get_template('emails/' + message_base + "_subject.txt").render().strip()
rate = int(ratestr) rate = int(ratestr)
self.log_file = open(logfilename, "a+", buffering=0) self.log_file = open(logfilename, "a+", buffering=0)
......
...@@ -35,7 +35,7 @@ from django.contrib.admin.views.decorators import staff_member_required ...@@ -35,7 +35,7 @@ from django.contrib.admin.views.decorators import staff_member_required
from ratelimitbackend.exceptions import RateLimitException from ratelimitbackend.exceptions import RateLimitException
from mitxmako.shortcuts import render_to_response, render_to_string from edxmako.shortcuts import render_to_response, render_to_string
from course_modes.models import CourseMode from course_modes.models import CourseMode
from student.models import ( from student.models import (
......
...@@ -9,7 +9,7 @@ from django.shortcuts import redirect ...@@ -9,7 +9,7 @@ from django.shortcuts import redirect
from django_future.csrf import ensure_csrf_cookie from django_future.csrf import ensure_csrf_cookie
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from track import tracker from track import tracker
from track import contexts from track import contexts
......
...@@ -9,7 +9,7 @@ from django.views.defaults import server_error ...@@ -9,7 +9,7 @@ from django.views.defaults import server_error
from django.http import (Http404, HttpResponse, HttpResponseNotAllowed, from django.http import (Http404, HttpResponse, HttpResponseNotAllowed,
HttpResponseServerError) HttpResponseServerError)
from dogapi import dog_stats_api from dogapi import dog_stats_api
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
import zendesk import zendesk
import calc import calc
......
...@@ -9,7 +9,7 @@ import static_replace ...@@ -9,7 +9,7 @@ import static_replace
from django.conf import settings from django.conf import settings
from django.utils.timezone import UTC from django.utils.timezone import UTC
from mitxmako.shortcuts import render_to_string from edxmako.shortcuts import render_to_string
from xblock.fragment import Fragment from xblock.fragment import Fragment
from xmodule.seq_module import SequenceModule from xmodule.seq_module import SequenceModule
......
...@@ -60,7 +60,7 @@ def mongo_store_config(data_dir): ...@@ -60,7 +60,7 @@ def mongo_store_config(data_dir):
'OPTIONS': { 'OPTIONS': {
'default_class': 'xmodule.raw_module.RawDescriptor', 'default_class': 'xmodule.raw_module.RawDescriptor',
'fs_root': data_dir, 'fs_root': data_dir,
'render_template': 'mitxmako.shortcuts.render_to_string' 'render_template': 'edxmako.shortcuts.render_to_string'
} }
} }
} }
...@@ -77,7 +77,7 @@ def draft_mongo_store_config(data_dir): ...@@ -77,7 +77,7 @@ def draft_mongo_store_config(data_dir):
modulestore_options = { modulestore_options = {
'default_class': 'xmodule.raw_module.RawDescriptor', 'default_class': 'xmodule.raw_module.RawDescriptor',
'fs_root': data_dir, 'fs_root': data_dir,
'render_template': 'mitxmako.shortcuts.render_to_string' 'render_template': 'edxmako.shortcuts.render_to_string'
} }
store = { store = {
...@@ -126,7 +126,7 @@ def studio_store_config(data_dir): ...@@ -126,7 +126,7 @@ def studio_store_config(data_dir):
options = { options = {
'default_class': 'xmodule.raw_module.RawDescriptor', 'default_class': 'xmodule.raw_module.RawDescriptor',
'fs_root': data_dir, 'fs_root': data_dir,
'render_template': 'mitxmako.shortcuts.render_to_string', 'render_template': 'edxmako.shortcuts.render_to_string',
} }
store = { store = {
......
...@@ -120,7 +120,7 @@ environments, defined in `cms/envs`. ...@@ -120,7 +120,7 @@ environments, defined in `cms/envs`.
- javascript -- we use coffeescript, which compiles to js, and is much nicer to work with. Look for `*.coffee` files. We use _jasmine_ for testing js. - javascript -- we use coffeescript, which compiles to js, and is much nicer to work with. Look for `*.coffee` files. We use _jasmine_ for testing js.
- _mako_ -- we use this for templates, and have wrapper called mitxmako that makes mako look like the django templating calls. - _mako_ -- we use this for templates, and have wrapper called edxmako that makes mako look like the django templating calls.
We use a fork of django-pipeline to make sure that the js and css always reflect the latest `*.coffee` and `*.sass` files (We're hoping to get our changes merged in the official version soon). This works differently in development and production. Test uses the production settings. We use a fork of django-pipeline to make sure that the js and css always reflect the latest `*.coffee` and `*.sass` files (We're hoping to get our changes merged in the official version soon). This works differently in development and production. Test uses the production settings.
......
...@@ -3,12 +3,12 @@ from django.core.urlresolvers import reverse ...@@ -3,12 +3,12 @@ from django.core.urlresolvers import reverse
from django.http import Http404 from django.http import Http404
from django.shortcuts import redirect from django.shortcuts import redirect
from django_future.csrf import ensure_csrf_cookie from django_future.csrf import ensure_csrf_cookie
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
import student.views import student.views
import branding import branding
import courseware.views import courseware.views
from mitxmako.shortcuts import marketing_link from edxmako.shortcuts import marketing_link
from util.cache import cache_if_anonymous from util.cache import cache_if_anonymous
......
...@@ -4,7 +4,7 @@ import xml.etree.ElementTree ...@@ -4,7 +4,7 @@ import xml.etree.ElementTree
from django.http import Http404 from django.http import Http404
from django.http import HttpResponse from django.http import HttpResponse
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from .models import ServerCircuit from .models import ServerCircuit
......
...@@ -22,7 +22,7 @@ from courseware.masquerade import setup_masquerade ...@@ -22,7 +22,7 @@ from courseware.masquerade import setup_masquerade
from courseware.model_data import FieldDataCache, DjangoKeyValueStore from courseware.model_data import FieldDataCache, DjangoKeyValueStore
from lms.lib.xblock.field_data import LmsFieldData from lms.lib.xblock.field_data import LmsFieldData
from lms.lib.xblock.runtime import LmsModuleSystem, handler_prefix, unquote_slashes from lms.lib.xblock.runtime import LmsModuleSystem, handler_prefix, unquote_slashes
from mitxmako.shortcuts import render_to_string from edxmako.shortcuts import render_to_string
from psychometrics.psychoanalyze import make_psychometrics_data_update_handler from psychometrics.psychoanalyze import make_psychometrics_data_update_handler
from student.models import anonymous_id_for_user, user_by_anonymous_id from student.models import anonymous_id_for_user, user_by_anonymous_id
from util.json_request import JsonResponse from util.json_request import JsonResponse
......
...@@ -11,7 +11,7 @@ from django.test.utils import override_settings ...@@ -11,7 +11,7 @@ from django.test.utils import override_settings
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.test.client import Client from django.test.client import Client
from mitxmako.shortcuts import render_to_string from edxmako.shortcuts import render_to_string
from student.tests.factories import UserFactory, CourseEnrollmentFactory from student.tests.factories import UserFactory, CourseEnrollmentFactory
from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE
from xblock.field_data import DictFieldData from xblock.field_data import DictFieldData
......
...@@ -17,7 +17,7 @@ from django.core.urlresolvers import reverse ...@@ -17,7 +17,7 @@ from django.core.urlresolvers import reverse
from student.models import CourseEnrollment from student.models import CourseEnrollment
from student.tests.factories import AdminFactory from student.tests.factories import AdminFactory
from mitxmako.middleware import MakoMiddleware from edxmako.middleware import MakoMiddleware
from xmodule.modulestore import Location from xmodule.modulestore import Location
from xmodule.modulestore.django import modulestore from xmodule.modulestore.django import modulestore
......
...@@ -11,7 +11,7 @@ from django.contrib.auth.models import User ...@@ -11,7 +11,7 @@ from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.http import Http404, HttpResponse, HttpResponseRedirect from django.http import Http404, HttpResponse, HttpResponseRedirect
from django.shortcuts import redirect from django.shortcuts import redirect
from mitxmako.shortcuts import render_to_response, render_to_string from edxmako.shortcuts import render_to_response, render_to_string
from django_future.csrf import ensure_csrf_cookie from django_future.csrf import ensure_csrf_cookie
from django.views.decorators.cache import cache_control from django.views.decorators.cache import cache_control
from django.db import transaction from django.db import transaction
......
from django.http import Http404 from django.http import Http404
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from django.db import connection from django.db import connection
from student.models import CourseEnrollment from student.models import CourseEnrollment
......
...@@ -6,7 +6,7 @@ import traceback ...@@ -6,7 +6,7 @@ import traceback
from django.http import Http404 from django.http import Http404
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django_future.csrf import ensure_csrf_cookie from django_future.csrf import ensure_csrf_cookie
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from codejail.safe_exec import safe_exec from codejail.safe_exec import safe_exec
......
...@@ -19,7 +19,7 @@ from django.core.files.storage import get_storage_class ...@@ -19,7 +19,7 @@ from django.core.files.storage import get_storage_class
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from django.contrib.auth.models import User from django.contrib.auth.models import User
from mitxmako.shortcuts import render_to_string from edxmako.shortcuts import render_to_string
from courseware.courses import get_course_with_access, get_course_by_id from courseware.courses import get_course_with_access, get_course_by_id
from course_groups.cohorts import get_cohort_id, is_commentable_cohorted from course_groups.cohorts import get_cohort_id, is_commentable_cohorted
......
...@@ -8,7 +8,7 @@ from django.core.context_processors import csrf ...@@ -8,7 +8,7 @@ from django.core.context_processors import csrf
from django.contrib.auth.models import User from django.contrib.auth.models import User
import newrelic.agent import newrelic.agent
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from courseware.courses import get_course_with_access from courseware.courses import get_course_with_access
from course_groups.cohorts import (is_course_cohorted, get_cohort_id, is_commentable_cohorted, from course_groups.cohorts import (is_course_cohorted, get_cohort_id, is_commentable_cohorted,
get_cohorted_commentables, get_course_cohorts, get_cohort_by_id) get_cohorted_commentables, get_course_cohorts, get_cohort_by_id)
......
...@@ -12,7 +12,7 @@ from django.utils import simplejson ...@@ -12,7 +12,7 @@ from django.utils import simplejson
from django_comment_common.models import Role, FORUM_ROLE_STUDENT from django_comment_common.models import Role, FORUM_ROLE_STUDENT
from django_comment_client.permissions import check_permissions_by_view from django_comment_client.permissions import check_permissions_by_view
import mitxmako import edxmako
import pystache_custom as pystache import pystache_custom as pystache
from xmodule.modulestore.django import modulestore from xmodule.modulestore.django import modulestore
...@@ -310,7 +310,7 @@ def url_for_tags(course_id, tags): ...@@ -310,7 +310,7 @@ def url_for_tags(course_id, tags):
def render_mustache(template_name, dictionary, *args, **kwargs): def render_mustache(template_name, dictionary, *args, **kwargs):
template = mitxmako.lookup['main'].get_template(template_name).source template = edxmako.lookup['main'].get_template(template_name).source
return pystache.render(template, dictionary) return pystache.render(template, dictionary)
......
...@@ -12,7 +12,7 @@ from django.core.mail import send_mail ...@@ -12,7 +12,7 @@ from django.core.mail import send_mail
from student.models import CourseEnrollment, CourseEnrollmentAllowed from student.models import CourseEnrollment, CourseEnrollmentAllowed
from courseware.models import StudentModule from courseware.models import StudentModule
from mitxmako.shortcuts import render_to_string from edxmako.shortcuts import render_to_string
# For determining if a shibboleth course # For determining if a shibboleth course
SHIBBOLETH_DOMAIN_PREFIX = 'shib:' SHIBBOLETH_DOMAIN_PREFIX = 'shib:'
......
...@@ -13,7 +13,7 @@ import re ...@@ -13,7 +13,7 @@ import re
from django.http import HttpResponse, Http404 from django.http import HttpResponse, Http404
from django_future.csrf import ensure_csrf_cookie from django_future.csrf import ensure_csrf_cookie
from mitxmako.shortcuts import render_to_response, render_to_string from edxmako.shortcuts import render_to_response, render_to_string
from courseware.courses import get_course_with_access from courseware.courses import get_course_with_access
from courseware.models import XModuleUserStateSummaryField from courseware.models import XModuleUserStateSummaryField
......
...@@ -6,7 +6,7 @@ from functools import partial ...@@ -6,7 +6,7 @@ from functools import partial
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from django_future.csrf import ensure_csrf_cookie from django_future.csrf import ensure_csrf_cookie
from django.views.decorators.cache import cache_control from django.views.decorators.cache import cache_control
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.utils.html import escape from django.utils.html import escape
from django.http import Http404 from django.http import Http404
......
...@@ -50,7 +50,7 @@ from instructor_task.api import (get_running_instructor_tasks, ...@@ -50,7 +50,7 @@ from instructor_task.api import (get_running_instructor_tasks,
submit_reset_problem_attempts_for_all_students, submit_reset_problem_attempts_for_all_students,
submit_bulk_course_email) submit_bulk_course_email)
from instructor_task.views import get_task_completion_info from instructor_task.views import get_task_completion_info
from mitxmako.shortcuts import render_to_response, render_to_string from edxmako.shortcuts import render_to_response, render_to_string
from psychometrics import psychoanalyze from psychometrics import psychoanalyze
from student.models import CourseEnrollment, CourseEnrollmentAllowed, unique_id_for_user from student.models import CourseEnrollment, CourseEnrollmentAllowed, unique_id_for_user
from student.views import course_from_id from student.views import course_from_id
......
...@@ -5,7 +5,7 @@ from urlparse import urlparse ...@@ -5,7 +5,7 @@ from urlparse import urlparse
from collections import namedtuple, defaultdict from collections import namedtuple, defaultdict
from mitxmako.shortcuts import render_to_string from edxmako.shortcuts import render_to_string
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User from django.contrib.auth.models import User
......
from django.conf import settings from django.conf import settings
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from multicourse import multicourse_settings from multicourse import multicourse_settings
......
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.http import Http404 from django.http import Http404
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from courseware.courses import get_course_with_access from courseware.courses import get_course_with_access
from notes.models import Note from notes.models import Note
from notes.utils import notes_enabled_for_course from notes.utils import notes_enabled_for_course
......
...@@ -10,7 +10,7 @@ from django.core.exceptions import PermissionDenied ...@@ -10,7 +10,7 @@ from django.core.exceptions import PermissionDenied
from django.http import Http404, HttpResponse from django.http import Http404, HttpResponse
from django.views.decorators.http import require_GET, require_POST from django.views.decorators.http import require_GET, require_POST
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from notification_prefs import NOTIFICATION_PREF_KEY from notification_prefs import NOTIFICATION_PREF_KEY
from user_api.models import UserPreference from user_api.models import UserPreference
......
...@@ -9,7 +9,7 @@ from xmodule.open_ended_grading_classes.controller_query_service import Controll ...@@ -9,7 +9,7 @@ from xmodule.open_ended_grading_classes.controller_query_service import Controll
from courseware.access import has_access from courseware.access import has_access
from lms.lib.xblock.runtime import LmsModuleSystem from lms.lib.xblock.runtime import LmsModuleSystem
from mitxmako.shortcuts import render_to_string from edxmako.shortcuts import render_to_string
from student.models import unique_id_for_user from student.models import unique_id_for_user
from util.cache import cache from util.cache import cache
......
...@@ -13,7 +13,7 @@ from xmodule.open_ended_grading_classes.grading_service_module import GradingSer ...@@ -13,7 +13,7 @@ from xmodule.open_ended_grading_classes.grading_service_module import GradingSer
from courseware.access import has_access from courseware.access import has_access
from lms.lib.xblock.runtime import LmsModuleSystem from lms.lib.xblock.runtime import LmsModuleSystem
from mitxmako.shortcuts import render_to_string from edxmako.shortcuts import render_to_string
from student.models import unique_id_for_user from student.models import unique_id_for_user
from util.json_request import expect_json from util.json_request import expect_json
......
...@@ -27,7 +27,7 @@ from courseware.tests.helpers import LoginEnrollmentTestCase, check_for_get_code ...@@ -27,7 +27,7 @@ from courseware.tests.helpers import LoginEnrollmentTestCase, check_for_get_code
from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE
from lms.lib.xblock.runtime import LmsModuleSystem from lms.lib.xblock.runtime import LmsModuleSystem
from courseware.roles import CourseStaffRole from courseware.roles import CourseStaffRole
from mitxmako.shortcuts import render_to_string from edxmako.shortcuts import render_to_string
from student.models import unique_id_for_user from student.models import unique_id_for_user
from open_ended_grading import staff_grading_service, views, utils from open_ended_grading import staff_grading_service, views, utils
......
...@@ -11,7 +11,7 @@ from django.utils.translation import ugettext as _ ...@@ -11,7 +11,7 @@ from django.utils.translation import ugettext as _
from django.conf import settings from django.conf import settings
from lms.lib.xblock.runtime import LmsModuleSystem from lms.lib.xblock.runtime import LmsModuleSystem
from mitxmako.shortcuts import render_to_string from edxmako.shortcuts import render_to_string
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
......
...@@ -2,7 +2,7 @@ import logging ...@@ -2,7 +2,7 @@ import logging
from django.conf import settings from django.conf import settings
from django.views.decorators.cache import cache_control from django.views.decorators.cache import cache_control
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from student.models import unique_id_for_user from student.models import unique_id_for_user
...@@ -19,7 +19,7 @@ from xmodule.modulestore import search ...@@ -19,7 +19,7 @@ from xmodule.modulestore import search
from xmodule.modulestore.exceptions import ItemNotFoundError, NoPathToItem from xmodule.modulestore.exceptions import ItemNotFoundError, NoPathToItem
from django.http import HttpResponse, Http404, HttpResponseRedirect from django.http import HttpResponse, Http404, HttpResponseRedirect
from mitxmako.shortcuts import render_to_string from edxmako.shortcuts import render_to_string
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from open_ended_grading.utils import (STAFF_ERROR_MESSAGE, STUDENT_ERROR_MESSAGE, from open_ended_grading.utils import (STAFF_ERROR_MESSAGE, STUDENT_ERROR_MESSAGE,
......
...@@ -23,7 +23,7 @@ from xmodule.course_module import CourseDescriptor ...@@ -23,7 +23,7 @@ from xmodule.course_module import CourseDescriptor
from xmodule.modulestore.exceptions import ItemNotFoundError from xmodule.modulestore.exceptions import ItemNotFoundError
from course_modes.models import CourseMode from course_modes.models import CourseMode
from mitxmako.shortcuts import render_to_string from edxmako.shortcuts import render_to_string
from student.views import course_from_id from student.views import course_from_id
from student.models import CourseEnrollment, unenroll_done from student.models import CourseEnrollment, unenroll_done
......
...@@ -13,7 +13,7 @@ from hashlib import sha1 ...@@ -13,7 +13,7 @@ from hashlib import sha1
from textwrap import dedent from textwrap import dedent
from django.conf import settings from django.conf import settings
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from mitxmako.shortcuts import render_to_string from edxmako.shortcuts import render_to_string
from shoppingcart.models import Order from shoppingcart.models import Order
from shoppingcart.processors.exceptions import * from shoppingcart.processors.exceptions import *
......
...@@ -15,7 +15,7 @@ set to "success" or "failure". The view defaults to payment success. ...@@ -15,7 +15,7 @@ set to "success" or "failure". The view defaults to payment success.
from django.views.generic.base import View from django.views.generic.base import View
from django.views.decorators.csrf import csrf_exempt from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse, HttpResponseBadRequest from django.http import HttpResponse, HttpResponseBadRequest
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
# We use the same hashing function as the software under test, # We use the same hashing function as the software under test,
......
...@@ -18,7 +18,7 @@ from shoppingcart.models import Order, CertificateItem, PaidCourseRegistration, ...@@ -18,7 +18,7 @@ from shoppingcart.models import Order, CertificateItem, PaidCourseRegistration,
from student.tests.factories import UserFactory from student.tests.factories import UserFactory
from student.models import CourseEnrollment from student.models import CourseEnrollment
from course_modes.models import CourseMode from course_modes.models import CourseMode
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from shoppingcart.processors import render_purchase_form_html from shoppingcart.processors import render_purchase_form_html
from mock import patch, Mock from mock import patch, Mock
......
...@@ -10,7 +10,7 @@ from django.views.decorators.http import require_POST ...@@ -10,7 +10,7 @@ from django.views.decorators.http import require_POST
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.views.decorators.csrf import csrf_exempt from django.views.decorators.csrf import csrf_exempt
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from .models import Order, PaidCourseRegistration, OrderItem from .models import Order, PaidCourseRegistration, OrderItem
from .processors import process_postpay_callback, render_purchase_form_html from .processors import process_postpay_callback, render_purchase_form_html
from .exceptions import ItemAlreadyInCartException, AlreadyEnrolledInCourseException, CourseDoesNotExistException from .exceptions import ItemAlreadyInCartException, AlreadyEnrolledInCourseException, CourseDoesNotExistException
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# List of valid templates is explicitly managed for (short-term) # List of valid templates is explicitly managed for (short-term)
# security reasons. # security reasons.
from mitxmako.shortcuts import render_to_response, render_to_string from edxmako.shortcuts import render_to_response, render_to_string
from mako.exceptions import TopLevelLookupException from mako.exceptions import TopLevelLookupException
from django.shortcuts import redirect from django.shortcuts import redirect
from django.conf import settings from django.conf import settings
......
...@@ -4,7 +4,7 @@ Views for serving static textbooks. ...@@ -4,7 +4,7 @@ Views for serving static textbooks.
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.http import Http404 from django.http import Http404
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from courseware.access import has_access from courseware.access import has_access
from courseware.courses import get_course_with_access from courseware.courses import get_course_with_access
......
...@@ -6,7 +6,7 @@ import json ...@@ -6,7 +6,7 @@ import json
import logging import logging
import decimal import decimal
from mitxmako.shortcuts import render_to_response from edxmako.shortcuts import render_to_response
from django.conf import settings from django.conf import settings
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
......
...@@ -36,7 +36,7 @@ DOC_STORE_CONFIG = { ...@@ -36,7 +36,7 @@ DOC_STORE_CONFIG = {
modulestore_options = { modulestore_options = {
'default_class': 'xmodule.raw_module.RawDescriptor', 'default_class': 'xmodule.raw_module.RawDescriptor',
'fs_root': TEST_ROOT / "data", 'fs_root': TEST_ROOT / "data",
'render_template': 'mitxmako.shortcuts.render_to_string', 'render_template': 'edxmako.shortcuts.render_to_string',
} }
MODULESTORE = { MODULESTORE = {
......
...@@ -31,7 +31,7 @@ DOC_STORE_CONFIG = { ...@@ -31,7 +31,7 @@ DOC_STORE_CONFIG = {
modulestore_options = { modulestore_options = {
'default_class': 'xmodule.raw_module.RawDescriptor', 'default_class': 'xmodule.raw_module.RawDescriptor',
'fs_root': DATA_DIR, 'fs_root': DATA_DIR,
'render_template': 'mitxmako.shortcuts.render_to_string', 'render_template': 'edxmako.shortcuts.render_to_string',
} }
MODULESTORE = { MODULESTORE = {
......
...@@ -33,7 +33,7 @@ MODULESTORE = { ...@@ -33,7 +33,7 @@ MODULESTORE = {
'OPTIONS': { 'OPTIONS': {
'default_class': 'xmodule.raw_module.RawDescriptor', 'default_class': 'xmodule.raw_module.RawDescriptor',
'fs_root': DATA_DIR, 'fs_root': DATA_DIR,
'render_template': 'mitxmako.shortcuts.render_to_string', 'render_template': 'edxmako.shortcuts.render_to_string',
} }
} }
}, },
......
...@@ -281,7 +281,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( ...@@ -281,7 +281,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'course_wiki.course_nav.context_processor', 'course_wiki.course_nav.context_processor',
# Hack to get required link URLs to password reset templates # Hack to get required link URLs to password reset templates
'mitxmako.shortcuts.marketing_link_context_processor', 'edxmako.shortcuts.marketing_link_context_processor',
# Shoppingcart processor (detects if request.user has a cart) # Shoppingcart processor (detects if request.user has a cart)
'shoppingcart.context_processor.user_has_cart_context_processor', 'shoppingcart.context_processor.user_has_cart_context_processor',
...@@ -592,8 +592,8 @@ STATICFILES_FINDERS = ( ...@@ -592,8 +592,8 @@ STATICFILES_FINDERS = (
# List of callables that know how to import templates from various sources. # List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = ( TEMPLATE_LOADERS = (
'mitxmako.makoloader.MakoFilesystemLoader', 'edxmako.makoloader.MakoFilesystemLoader',
'mitxmako.makoloader.MakoAppDirectoriesLoader', 'edxmako.makoloader.MakoAppDirectoriesLoader',
# 'django.template.loaders.filesystem.Loader', # 'django.template.loaders.filesystem.Loader',
# 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.app_directories.Loader',
...@@ -615,7 +615,7 @@ MIDDLEWARE_CLASSES = ( ...@@ -615,7 +615,7 @@ MIDDLEWARE_CLASSES = (
'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.messages.middleware.MessageMiddleware',
'track.middleware.TrackMiddleware', 'track.middleware.TrackMiddleware',
'mitxmako.middleware.MakoMiddleware', 'edxmako.middleware.MakoMiddleware',
'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware',
'course_wiki.course_nav.Middleware', 'course_wiki.course_nav.Middleware',
...@@ -928,7 +928,7 @@ INSTALLED_APPS = ( ...@@ -928,7 +928,7 @@ INSTALLED_APPS = (
'service_status', 'service_status',
# For asset pipelining # For asset pipelining
'mitxmako', 'edxmako',
'pipeline', 'pipeline',
'staticfiles', 'staticfiles',
'static_replace', 'static_replace',
......
...@@ -47,7 +47,7 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https') # django 1.4 ...@@ -47,7 +47,7 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https') # django 1.4
INSTALLED_APPS = tuple([app for app in INSTALLED_APPS if not app.startswith('debug_toolbar')]) INSTALLED_APPS = tuple([app for app in INSTALLED_APPS if not app.startswith('debug_toolbar')])
MIDDLEWARE_CLASSES = tuple([mcl for mcl in MIDDLEWARE_CLASSES if not mcl.startswith('debug_toolbar')]) MIDDLEWARE_CLASSES = tuple([mcl for mcl in MIDDLEWARE_CLASSES if not mcl.startswith('debug_toolbar')])
#TEMPLATE_LOADERS = tuple([ app for app in TEMPLATE_LOADERS if not app.startswith('mitxmako') ]) #TEMPLATE_LOADERS = tuple([ app for app in TEMPLATE_LOADERS if not app.startswith('edxmako') ])
TEMPLATE_LOADERS = ( TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader', 'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader', 'django.template.loaders.app_directories.Loader',
......
...@@ -21,7 +21,7 @@ MODULESTORE = { ...@@ -21,7 +21,7 @@ MODULESTORE = {
'OPTIONS': { 'OPTIONS': {
'default_class': 'xmodule.raw_module.RawDescriptor', 'default_class': 'xmodule.raw_module.RawDescriptor',
'fs_root': GITHUB_REPO_ROOT, 'fs_root': GITHUB_REPO_ROOT,
'render_template': 'mitxmako.shortcuts.render_to_string', 'render_template': 'edxmako.shortcuts.render_to_string',
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment