From 8eff442752b6ca6720b8d97373102140427f3486 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Mon, 2 Dec 2013 11:37:07 -0500 Subject: [PATCH] mitxmako => edxmako --- cms/djangoapps/contentstore/views/assets.py | 2 +- cms/djangoapps/contentstore/views/checklist.py | 2 +- cms/djangoapps/contentstore/views/component.py | 2 +- cms/djangoapps/contentstore/views/course.py | 2 +- cms/djangoapps/contentstore/views/dev.py | 2 +- cms/djangoapps/contentstore/views/error.py | 2 +- cms/djangoapps/contentstore/views/helpers.py | 2 +- cms/djangoapps/contentstore/views/import_export.py | 2 +- cms/djangoapps/contentstore/views/item.py | 2 +- cms/djangoapps/contentstore/views/preview.py | 2 +- cms/djangoapps/contentstore/views/public.py | 2 +- cms/djangoapps/contentstore/views/tabs.py | 2 +- cms/djangoapps/contentstore/views/user.py | 2 +- cms/djangoapps/course_creators/admin.py | 2 +- cms/envs/acceptance.py | 2 +- cms/envs/common.py | 4 ++-- cms/envs/dev.py | 2 +- cms/envs/test.py | 2 +- common/djangoapps/course_groups/views.py | 2 +- common/djangoapps/course_modes/views.py | 2 +- common/djangoapps/{mitxmako => edxmako}/README | 0 common/djangoapps/{mitxmako => edxmako}/__init__.py | 0 .../djangoapps/{mitxmako => edxmako}/makoloader.py | 2 +- .../{mitxmako => edxmako}/management/__init__.py | 0 .../management/commands/__init__.py | 0 .../management/commands/preprocess_assets.py | 0 .../djangoapps/{mitxmako => edxmako}/middleware.py | 0 common/djangoapps/{mitxmako => edxmako}/shortcuts.py | 10 +++++----- common/djangoapps/{mitxmako => edxmako}/startup.py | 4 ++-- common/djangoapps/{mitxmako => edxmako}/template.py | 12 ++++++------ .../{mitxmako => edxmako}/templatetag_helpers.py | 0 common/djangoapps/{mitxmako => edxmako}/tests.py | 4 ++-- common/djangoapps/external_auth/views.py | 2 +- common/djangoapps/pipeline_js/views.py | 2 +- common/djangoapps/pipeline_mako/__init__.py | 2 +- .../student/management/commands/massemail.py | 6 +++--- .../student/management/commands/massemailtxt.py | 6 +++--- common/djangoapps/student/views.py | 2 +- common/djangoapps/track/views.py | 2 +- common/djangoapps/util/views.py | 2 +- common/djangoapps/xmodule_modifiers.py | 2 +- .../xmodule/modulestore/tests/django_utils.py | 6 +++--- docs/internal/overview.md | 2 +- lms/djangoapps/branding/views.py | 4 ++-- lms/djangoapps/circuit/views.py | 2 +- lms/djangoapps/courseware/module_render.py | 2 +- lms/djangoapps/courseware/tests/__init__.py | 2 +- lms/djangoapps/courseware/tests/test_views.py | 2 +- lms/djangoapps/courseware/views.py | 2 +- lms/djangoapps/dashboard/views.py | 2 +- lms/djangoapps/debug/views.py | 2 +- lms/djangoapps/django_comment_client/base/views.py | 2 +- lms/djangoapps/django_comment_client/forum/views.py | 2 +- lms/djangoapps/django_comment_client/utils.py | 4 ++-- lms/djangoapps/instructor/enrollment.py | 2 +- lms/djangoapps/instructor/hint_manager.py | 2 +- .../instructor/views/instructor_dashboard.py | 2 +- lms/djangoapps/instructor/views/legacy.py | 2 +- lms/djangoapps/licenses/views.py | 2 +- lms/djangoapps/multicourse/views.py | 2 +- lms/djangoapps/notes/views.py | 2 +- lms/djangoapps/notification_prefs/views.py | 2 +- .../open_ended_grading/open_ended_notifications.py | 2 +- .../open_ended_grading/staff_grading_service.py | 2 +- lms/djangoapps/open_ended_grading/tests.py | 2 +- lms/djangoapps/open_ended_grading/utils.py | 2 +- lms/djangoapps/open_ended_grading/views.py | 4 ++-- lms/djangoapps/shoppingcart/models.py | 2 +- .../shoppingcart/processors/CyberSource.py | 2 +- lms/djangoapps/shoppingcart/tests/payment_fake.py | 2 +- lms/djangoapps/shoppingcart/tests/test_views.py | 2 +- lms/djangoapps/shoppingcart/views.py | 2 +- lms/djangoapps/static_template_view/views.py | 2 +- lms/djangoapps/staticbook/views.py | 2 +- lms/djangoapps/verify_student/views.py | 2 +- lms/envs/acceptance.py | 2 +- lms/envs/cms/dev.py | 2 +- lms/envs/cms/mixed_dev.py | 2 +- lms/envs/common.py | 10 +++++----- lms/envs/dev_ike.py | 2 +- lms/envs/dev_mongo.py | 2 +- 81 files changed, 99 insertions(+), 99 deletions(-) rename common/djangoapps/{mitxmako => edxmako}/README (100%) rename common/djangoapps/{mitxmako => edxmako}/__init__.py (100%) rename common/djangoapps/{mitxmako => edxmako}/makoloader.py (98%) rename common/djangoapps/{mitxmako => edxmako}/management/__init__.py (100%) rename common/djangoapps/{mitxmako => edxmako}/management/commands/__init__.py (100%) rename common/djangoapps/{mitxmako => edxmako}/management/commands/preprocess_assets.py (100%) rename common/djangoapps/{mitxmako => edxmako}/middleware.py (100%) rename common/djangoapps/{mitxmako => edxmako}/shortcuts.py (94%) rename common/djangoapps/{mitxmako => edxmako}/startup.py (94%) rename common/djangoapps/{mitxmako => edxmako}/template.py (88%) rename common/djangoapps/{mitxmako => edxmako}/templatetag_helpers.py (100%) rename common/djangoapps/{mitxmako => edxmako}/tests.py (92%) diff --git a/cms/djangoapps/contentstore/views/assets.py b/cms/djangoapps/contentstore/views/assets.py index 7f2fab96f3..ed3588d895 100644 --- a/cms/djangoapps/contentstore/views/assets.py +++ b/cms/djangoapps/contentstore/views/assets.py @@ -7,7 +7,7 @@ from django.views.decorators.http import require_http_methods from django_future.csrf import ensure_csrf_cookie 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 xmodule.contentstore.django import contentstore diff --git a/cms/djangoapps/contentstore/views/checklist.py b/cms/djangoapps/contentstore/views/checklist.py index 61c6c672a7..7326c3d16b 100644 --- a/cms/djangoapps/contentstore/views/checklist.py +++ b/cms/djangoapps/contentstore/views/checklist.py @@ -6,7 +6,7 @@ from django.http import HttpResponseBadRequest from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_http_methods 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.core.exceptions import PermissionDenied from xmodule.modulestore.django import loc_mapper diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index 3742c7af20..269b603eff 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -9,7 +9,7 @@ from django.core.exceptions import PermissionDenied from django_future.csrf import ensure_csrf_cookie from django.conf import settings 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.util.date_utils import get_default_time_display diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py index 044ef79473..a92708bd69 100644 --- a/cms/djangoapps/contentstore/views/course.py +++ b/cms/djangoapps/contentstore/views/course.py @@ -16,7 +16,7 @@ from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse from django.http import HttpResponseBadRequest, HttpResponseNotFound 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.modulestore.django import modulestore, loc_mapper diff --git a/cms/djangoapps/contentstore/views/dev.py b/cms/djangoapps/contentstore/views/dev.py index 0fcc355c11..6bda59abdd 100644 --- a/cms/djangoapps/contentstore/views/dev.py +++ b/cms/djangoapps/contentstore/views/dev.py @@ -4,7 +4,7 @@ These views will NOT be shown on production: trying to access them will result in a 404 error. """ # pylint: disable=W0613 -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response def dev_mode(request): diff --git a/cms/djangoapps/contentstore/views/error.py b/cms/djangoapps/contentstore/views/error.py index 56499a69ac..9983987d29 100644 --- a/cms/djangoapps/contentstore/views/error.py +++ b/cms/djangoapps/contentstore/views/error.py @@ -2,7 +2,7 @@ from django.http import (HttpResponse, HttpResponseServerError, HttpResponseNotFound) -from mitxmako.shortcuts import render_to_string, render_to_response +from edxmako.shortcuts import render_to_string, render_to_response import functools import json diff --git a/cms/djangoapps/contentstore/views/helpers.py b/cms/djangoapps/contentstore/views/helpers.py index abbf84755e..a10a489c9a 100644 --- a/cms/djangoapps/contentstore/views/helpers.py +++ b/cms/djangoapps/contentstore/views/helpers.py @@ -1,6 +1,6 @@ from django.http import HttpResponse 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'] diff --git a/cms/djangoapps/contentstore/views/import_export.py b/cms/djangoapps/contentstore/views/import_export.py index f740d10707..c36d30a34d 100644 --- a/cms/djangoapps/contentstore/views/import_export.py +++ b/cms/djangoapps/contentstore/views/import_export.py @@ -21,7 +21,7 @@ from django.http import HttpResponseNotFound from django.views.decorators.http import require_http_methods, require_GET 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 xmodule.modulestore.xml_importer import import_from_xml diff --git a/cms/djangoapps/contentstore/views/item.py b/cms/djangoapps/contentstore/views/item.py index 220da038a7..0a85eb7765 100644 --- a/cms/djangoapps/contentstore/views/item.py +++ b/cms/djangoapps/contentstore/views/item.py @@ -30,7 +30,7 @@ from student.models import CourseEnrollment from django.http import HttpResponseBadRequest from xblock.fields import Scope 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 __all__ = ['orphan_handler', 'xblock_handler'] diff --git a/cms/djangoapps/contentstore/views/preview.py b/cms/djangoapps/contentstore/views/preview.py index 123d7fbadb..3f5bfbfa60 100644 --- a/cms/djangoapps/contentstore/views/preview.py +++ b/cms/djangoapps/contentstore/views/preview.py @@ -5,7 +5,7 @@ from django.conf import settings from django.core.urlresolvers import reverse from django.http import Http404, HttpResponseBadRequest 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.error_module import ErrorDescriptor diff --git a/cms/djangoapps/contentstore/views/public.py b/cms/djangoapps/contentstore/views/public.py index 9ab03a4093..c7857af0c0 100644 --- a/cms/djangoapps/contentstore/views/public.py +++ b/cms/djangoapps/contentstore/views/public.py @@ -6,7 +6,7 @@ from django.core.context_processors import csrf from django.shortcuts import redirect 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 diff --git a/cms/djangoapps/contentstore/views/tabs.py b/cms/djangoapps/contentstore/views/tabs.py index 46791ddc26..cf0ab42ffb 100644 --- a/cms/djangoapps/contentstore/views/tabs.py +++ b/cms/djangoapps/contentstore/views/tabs.py @@ -9,7 +9,7 @@ from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django_future.csrf import ensure_csrf_cookie 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.inheritance import own_metadata from xmodule.modulestore.django import modulestore diff --git a/cms/djangoapps/contentstore/views/user.py b/cms/djangoapps/contentstore/views/user.py index 6f2a2fbdec..50120bad38 100644 --- a/cms/djangoapps/contentstore/views/user.py +++ b/cms/djangoapps/contentstore/views/user.py @@ -7,7 +7,7 @@ from django.views.decorators.http import require_http_methods from django.utils.translation import ugettext as _ from django.views.decorators.http import require_POST 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 util.json_request import JsonResponse diff --git a/cms/djangoapps/course_creators/admin.py b/cms/djangoapps/course_creators/admin.py index df2baa1aa2..87e17fabfa 100644 --- a/cms/djangoapps/course_creators/admin.py +++ b/cms/djangoapps/course_creators/admin.py @@ -8,7 +8,7 @@ from course_creators.views import update_course_creator_group from ratelimitbackend import admin from django.conf import settings 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 smtplib import SMTPException diff --git a/cms/envs/acceptance.py b/cms/envs/acceptance.py index 1a9621a221..afbdff7d3f 100644 --- a/cms/envs/acceptance.py +++ b/cms/envs/acceptance.py @@ -34,7 +34,7 @@ DOC_STORE_CONFIG = { MODULESTORE_OPTIONS = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': TEST_ROOT / "data", - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } MODULESTORE = { diff --git a/cms/envs/common.py b/cms/envs/common.py index 8e2788a86a..961a089a14 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -161,7 +161,7 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.messages.middleware.MessageMiddleware', 'track.middleware.TrackMiddleware', - 'mitxmako.middleware.MakoMiddleware', + 'edxmako.middleware.MakoMiddleware', # Detects user-requested locale from 'accept-language' header in http request 'django.middleware.locale.LocaleMiddleware', @@ -393,7 +393,7 @@ INSTALLED_APPS = ( 'datadog', # For asset pipelining - 'mitxmako', + 'edxmako', 'pipeline', 'staticfiles', 'static_replace', diff --git a/cms/envs/dev.py b/cms/envs/dev.py index ea66688a8a..ddf1708c87 100644 --- a/cms/envs/dev.py +++ b/cms/envs/dev.py @@ -30,7 +30,7 @@ DOC_STORE_CONFIG = { modulestore_options = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': GITHUB_REPO_ROOT, - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } MODULESTORE = { diff --git a/cms/envs/test.py b/cms/envs/test.py index c64e0ef1e8..ef7133e0bd 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -60,7 +60,7 @@ DOC_STORE_CONFIG = { MODULESTORE_OPTIONS = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': TEST_ROOT / "data", - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } MODULESTORE = { diff --git a/common/djangoapps/course_groups/views.py b/common/djangoapps/course_groups/views.py index 764f6c301d..fb1a99a6aa 100644 --- a/common/djangoapps/course_groups/views.py +++ b/common/djangoapps/course_groups/views.py @@ -9,7 +9,7 @@ import logging import re 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 diff --git a/common/djangoapps/course_modes/views.py b/common/djangoapps/course_modes/views.py index 7c4bb3a1f7..f3dca5d08f 100644 --- a/common/djangoapps/course_modes/views.py +++ b/common/djangoapps/course_modes/views.py @@ -13,7 +13,7 @@ from django.utils.translation import ugettext as _ from django.contrib.auth.decorators import login_required 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 courseware.access import has_access diff --git a/common/djangoapps/mitxmako/README b/common/djangoapps/edxmako/README similarity index 100% rename from common/djangoapps/mitxmako/README rename to common/djangoapps/edxmako/README diff --git a/common/djangoapps/mitxmako/__init__.py b/common/djangoapps/edxmako/__init__.py similarity index 100% rename from common/djangoapps/mitxmako/__init__.py rename to common/djangoapps/edxmako/__init__.py diff --git a/common/djangoapps/mitxmako/makoloader.py b/common/djangoapps/edxmako/makoloader.py similarity index 98% rename from common/djangoapps/mitxmako/makoloader.py rename to common/djangoapps/edxmako/makoloader.py index 06ae2219e6..8e741f9946 100644 --- a/common/djangoapps/mitxmako/makoloader.py +++ b/common/djangoapps/edxmako/makoloader.py @@ -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.app_directories import Loader as AppDirectoriesLoader -from mitxmako.template import Template +from edxmako.template import Template import tempdir diff --git a/common/djangoapps/mitxmako/management/__init__.py b/common/djangoapps/edxmako/management/__init__.py similarity index 100% rename from common/djangoapps/mitxmako/management/__init__.py rename to common/djangoapps/edxmako/management/__init__.py diff --git a/common/djangoapps/mitxmako/management/commands/__init__.py b/common/djangoapps/edxmako/management/commands/__init__.py similarity index 100% rename from common/djangoapps/mitxmako/management/commands/__init__.py rename to common/djangoapps/edxmako/management/commands/__init__.py diff --git a/common/djangoapps/mitxmako/management/commands/preprocess_assets.py b/common/djangoapps/edxmako/management/commands/preprocess_assets.py similarity index 100% rename from common/djangoapps/mitxmako/management/commands/preprocess_assets.py rename to common/djangoapps/edxmako/management/commands/preprocess_assets.py diff --git a/common/djangoapps/mitxmako/middleware.py b/common/djangoapps/edxmako/middleware.py similarity index 100% rename from common/djangoapps/mitxmako/middleware.py rename to common/djangoapps/edxmako/middleware.py diff --git a/common/djangoapps/mitxmako/shortcuts.py b/common/djangoapps/edxmako/shortcuts.py similarity index 94% rename from common/djangoapps/mitxmako/shortcuts.py rename to common/djangoapps/edxmako/shortcuts.py index 356c80ced3..e83f1b028f 100644 --- a/common/djangoapps/mitxmako/shortcuts.py +++ b/common/djangoapps/edxmako/shortcuts.py @@ -16,8 +16,8 @@ from django.template import Context from django.http import HttpResponse import logging -import mitxmako -import mitxmako.middleware +import edxmako +import edxmako.middleware from django.conf import settings from django.core.urlresolvers import reverse log = logging.getLogger(__name__) @@ -81,15 +81,15 @@ def render_to_string(template_name, dictionary, context=None, namespace='main'): context_instance['marketing_link'] = marketing_link # In various testing contexts, there might not be a current request context. - if mitxmako.middleware.requestcontext is not None: - for d in mitxmako.middleware.requestcontext: + if edxmako.middleware.requestcontext is not None: + for d in edxmako.middleware.requestcontext: context_dictionary.update(d) for d in context_instance: context_dictionary.update(d) if context: context_dictionary.update(context) # 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) diff --git a/common/djangoapps/mitxmako/startup.py b/common/djangoapps/edxmako/startup.py similarity index 94% rename from common/djangoapps/mitxmako/startup.py rename to common/djangoapps/edxmako/startup.py index db9483b366..2b58deac2e 100644 --- a/common/djangoapps/mitxmako/startup.py +++ b/common/djangoapps/edxmako/startup.py @@ -6,7 +6,7 @@ import tempdir from django.conf import settings from mako.lookup import TemplateLookup -import mitxmako +import edxmako def run(): @@ -30,4 +30,4 @@ def run(): encoding_errors='replace', ) - mitxmako.lookup = lookup + edxmako.lookup = lookup diff --git a/common/djangoapps/mitxmako/template.py b/common/djangoapps/edxmako/template.py similarity index 88% rename from common/djangoapps/mitxmako/template.py rename to common/djangoapps/edxmako/template.py index 7dfc6de026..d515425b16 100644 --- a/common/djangoapps/mitxmako/template.py +++ b/common/djangoapps/edxmako/template.py @@ -14,10 +14,10 @@ from django.conf import settings from mako.template import Template as MakoTemplate -from mitxmako.shortcuts import marketing_link +from edxmako.shortcuts import marketing_link -import mitxmako -import mitxmako.middleware +import edxmako +import edxmako.middleware django_variables = ['lookup', 'output_encoding', 'encoding_errors'] @@ -34,7 +34,7 @@ class Template(MakoTemplate): def __init__(self, *args, **kwargs): """Overrides base __init__ to provide django variable overrides""" 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'] kwargs.update(overrides) super(Template, self).__init__(*args, **kwargs) @@ -48,8 +48,8 @@ class Template(MakoTemplate): context_dictionary = {} # In various testing contexts, there might not be a current request context. - if mitxmako.middleware.requestcontext is not None: - for d in mitxmako.middleware.requestcontext: + if edxmako.middleware.requestcontext is not None: + for d in edxmako.middleware.requestcontext: context_dictionary.update(d) for d in context_instance: context_dictionary.update(d) diff --git a/common/djangoapps/mitxmako/templatetag_helpers.py b/common/djangoapps/edxmako/templatetag_helpers.py similarity index 100% rename from common/djangoapps/mitxmako/templatetag_helpers.py rename to common/djangoapps/edxmako/templatetag_helpers.py diff --git a/common/djangoapps/mitxmako/tests.py b/common/djangoapps/edxmako/tests.py similarity index 92% rename from common/djangoapps/mitxmako/tests.py rename to common/djangoapps/edxmako/tests.py index e7e56a9472..a4eb84eda8 100644 --- a/common/djangoapps/mitxmako/tests.py +++ b/common/djangoapps/edxmako/tests.py @@ -1,14 +1,14 @@ from django.test import TestCase from django.test.utils import override_settings from django.core.urlresolvers import reverse -from mitxmako.shortcuts import marketing_link +from edxmako.shortcuts import marketing_link from mock import patch from util.testing import UrlResetMixin 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_URL_LINK_MAP={'ABOUT': 'login'}) diff --git a/common/djangoapps/external_auth/views.py b/common/djangoapps/external_auth/views.py index a995dff22b..aa7536c460 100644 --- a/common/djangoapps/external_auth/views.py +++ b/common/djangoapps/external_auth/views.py @@ -28,7 +28,7 @@ from django.utils.http import urlquote, is_safe_url from django.shortcuts import redirect 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: from django.views.decorators.csrf import csrf_exempt except ImportError: diff --git a/common/djangoapps/pipeline_js/views.py b/common/djangoapps/pipeline_js/views.py index 06b76900cf..6cd97159d4 100644 --- a/common/djangoapps/pipeline_js/views.py +++ b/common/djangoapps/pipeline_js/views.py @@ -5,7 +5,7 @@ import json from django.conf import settings from django.http import HttpResponse from staticfiles.storage import staticfiles_storage -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response def get_xmodule_urls(): diff --git a/common/djangoapps/pipeline_mako/__init__.py b/common/djangoapps/pipeline_mako/__init__.py index 1cdc287e2e..ed343588da 100644 --- a/common/djangoapps/pipeline_mako/__init__.py +++ b/common/djangoapps/pipeline_mako/__init__.py @@ -1,4 +1,4 @@ -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string from pipeline.conf import settings from pipeline.packager import Packager diff --git a/common/djangoapps/student/management/commands/massemail.py b/common/djangoapps/student/management/commands/massemail.py index a1864f048e..5ce8afb41f 100644 --- a/common/djangoapps/student/management/commands/massemail.py +++ b/common/djangoapps/student/management/commands/massemail.py @@ -1,7 +1,7 @@ from django.core.management.base import BaseCommand from django.contrib.auth.models import User -import mitxmako +import edxmako class Command(BaseCommand): @@ -15,8 +15,8 @@ body, and an _subject.txt for the subject. ''' #text = open(args[0]).read() #subject = open(args[1]).read() users = User.objects.all() - text = mitxmako.lookup['main'].get_template('email/' + args[0] + ".txt").render() - subject = mitxmako.lookup['main'].get_template('email/' + args[0] + "_subject.txt").render().strip() + text = edxmako.lookup['main'].get_template('email/' + args[0] + ".txt").render() + subject = edxmako.lookup['main'].get_template('email/' + args[0] + "_subject.txt").render().strip() for user in users: if user.is_active: user.email_user(subject, text) diff --git a/common/djangoapps/student/management/commands/massemailtxt.py b/common/djangoapps/student/management/commands/massemailtxt.py index 0228acf923..1ff8557a25 100644 --- a/common/djangoapps/student/management/commands/massemailtxt.py +++ b/common/djangoapps/student/management/commands/massemailtxt.py @@ -4,7 +4,7 @@ import time from django.core.management.base import BaseCommand from django.conf import settings -import mitxmako +import edxmako from django.core.mail import send_mass_mail import sys @@ -39,8 +39,8 @@ rate -- messages per second users = [u.strip() for u in open(user_file).readlines()] - message = mitxmako.lookup['main'].get_template('emails/' + message_base + "_body.txt").render() - subject = mitxmako.lookup['main'].get_template('emails/' + message_base + "_subject.txt").render().strip() + message = edxmako.lookup['main'].get_template('emails/' + message_base + "_body.txt").render() + subject = edxmako.lookup['main'].get_template('emails/' + message_base + "_subject.txt").render().strip() rate = int(ratestr) self.log_file = open(logfilename, "a+", buffering=0) diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 2c3099a672..28c4e4f5fd 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -35,7 +35,7 @@ from django.contrib.admin.views.decorators import staff_member_required 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 student.models import ( diff --git a/common/djangoapps/track/views.py b/common/djangoapps/track/views.py index e493babe5d..ec05232395 100644 --- a/common/djangoapps/track/views.py +++ b/common/djangoapps/track/views.py @@ -9,7 +9,7 @@ from django.shortcuts import redirect 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 contexts diff --git a/common/djangoapps/util/views.py b/common/djangoapps/util/views.py index 10492e383d..b08c719baa 100644 --- a/common/djangoapps/util/views.py +++ b/common/djangoapps/util/views.py @@ -9,7 +9,7 @@ from django.views.defaults import server_error from django.http import (Http404, HttpResponse, HttpResponseNotAllowed, HttpResponseServerError) from dogapi import dog_stats_api -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response import zendesk import calc diff --git a/common/djangoapps/xmodule_modifiers.py b/common/djangoapps/xmodule_modifiers.py index 6e6d01c28f..d46065d5a7 100644 --- a/common/djangoapps/xmodule_modifiers.py +++ b/common/djangoapps/xmodule_modifiers.py @@ -9,7 +9,7 @@ import static_replace from django.conf import settings 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 xmodule.seq_module import SequenceModule diff --git a/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py b/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py index 776543ec4e..16f756b233 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py @@ -60,7 +60,7 @@ def mongo_store_config(data_dir): 'OPTIONS': { 'default_class': 'xmodule.raw_module.RawDescriptor', '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): modulestore_options = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': data_dir, - 'render_template': 'mitxmako.shortcuts.render_to_string' + 'render_template': 'edxmako.shortcuts.render_to_string' } store = { @@ -126,7 +126,7 @@ def studio_store_config(data_dir): options = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': data_dir, - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } store = { diff --git a/docs/internal/overview.md b/docs/internal/overview.md index a74c512fbf..911c93ab24 100644 --- a/docs/internal/overview.md +++ b/docs/internal/overview.md @@ -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. -- _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. diff --git a/lms/djangoapps/branding/views.py b/lms/djangoapps/branding/views.py index 3ce8dbd401..215d442de5 100644 --- a/lms/djangoapps/branding/views.py +++ b/lms/djangoapps/branding/views.py @@ -3,12 +3,12 @@ from django.core.urlresolvers import reverse from django.http import Http404 from django.shortcuts import redirect 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 branding import courseware.views -from mitxmako.shortcuts import marketing_link +from edxmako.shortcuts import marketing_link from util.cache import cache_if_anonymous diff --git a/lms/djangoapps/circuit/views.py b/lms/djangoapps/circuit/views.py index cc85c2a452..5af9ce1b44 100644 --- a/lms/djangoapps/circuit/views.py +++ b/lms/djangoapps/circuit/views.py @@ -4,7 +4,7 @@ import xml.etree.ElementTree from django.http import Http404 from django.http import HttpResponse -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from .models import ServerCircuit diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index 3b804c4ba9..436e9ee54a 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -22,7 +22,7 @@ from courseware.masquerade import setup_masquerade from courseware.model_data import FieldDataCache, DjangoKeyValueStore from lms.lib.xblock.field_data import LmsFieldData 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 student.models import anonymous_id_for_user, user_by_anonymous_id from util.json_request import JsonResponse diff --git a/lms/djangoapps/courseware/tests/__init__.py b/lms/djangoapps/courseware/tests/__init__.py index 9a17073a37..fcca925f35 100644 --- a/lms/djangoapps/courseware/tests/__init__.py +++ b/lms/djangoapps/courseware/tests/__init__.py @@ -11,7 +11,7 @@ from django.test.utils import override_settings from django.core.urlresolvers import reverse 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 courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE from xblock.field_data import DictFieldData diff --git a/lms/djangoapps/courseware/tests/test_views.py b/lms/djangoapps/courseware/tests/test_views.py index 17198c372d..b1634a72ac 100644 --- a/lms/djangoapps/courseware/tests/test_views.py +++ b/lms/djangoapps/courseware/tests/test_views.py @@ -17,7 +17,7 @@ from django.core.urlresolvers import reverse from student.models import CourseEnrollment from student.tests.factories import AdminFactory -from mitxmako.middleware import MakoMiddleware +from edxmako.middleware import MakoMiddleware from xmodule.modulestore import Location from xmodule.modulestore.django import modulestore diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index 69fd33f417..2ce1f54571 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -11,7 +11,7 @@ from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.http import Http404, HttpResponse, HttpResponseRedirect 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.views.decorators.cache import cache_control from django.db import transaction diff --git a/lms/djangoapps/dashboard/views.py b/lms/djangoapps/dashboard/views.py index 630222d7bf..8d1f63b410 100644 --- a/lms/djangoapps/dashboard/views.py +++ b/lms/djangoapps/dashboard/views.py @@ -1,5 +1,5 @@ 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 student.models import CourseEnrollment diff --git a/lms/djangoapps/debug/views.py b/lms/djangoapps/debug/views.py index 317ebcada9..5a5927e350 100644 --- a/lms/djangoapps/debug/views.py +++ b/lms/djangoapps/debug/views.py @@ -6,7 +6,7 @@ import traceback from django.http import Http404 from django.contrib.auth.decorators import login_required 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 diff --git a/lms/djangoapps/django_comment_client/base/views.py b/lms/djangoapps/django_comment_client/base/views.py index 4600f121f7..0e0bedc141 100644 --- a/lms/djangoapps/django_comment_client/base/views.py +++ b/lms/djangoapps/django_comment_client/base/views.py @@ -19,7 +19,7 @@ from django.core.files.storage import get_storage_class from django.utils.translation import ugettext as _ 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 course_groups.cohorts import get_cohort_id, is_commentable_cohorted diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index dac91512d6..83516fc3ac 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -8,7 +8,7 @@ from django.core.context_processors import csrf from django.contrib.auth.models import User 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 course_groups.cohorts import (is_course_cohorted, get_cohort_id, is_commentable_cohorted, get_cohorted_commentables, get_course_cohorts, get_cohort_by_id) diff --git a/lms/djangoapps/django_comment_client/utils.py b/lms/djangoapps/django_comment_client/utils.py index 527a7d0860..a92797f7e6 100644 --- a/lms/djangoapps/django_comment_client/utils.py +++ b/lms/djangoapps/django_comment_client/utils.py @@ -12,7 +12,7 @@ from django.utils import simplejson from django_comment_common.models import Role, FORUM_ROLE_STUDENT from django_comment_client.permissions import check_permissions_by_view -import mitxmako +import edxmako import pystache_custom as pystache from xmodule.modulestore.django import modulestore @@ -310,7 +310,7 @@ def url_for_tags(course_id, tags): 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) diff --git a/lms/djangoapps/instructor/enrollment.py b/lms/djangoapps/instructor/enrollment.py index 508271fa8b..a7c4fe0b65 100644 --- a/lms/djangoapps/instructor/enrollment.py +++ b/lms/djangoapps/instructor/enrollment.py @@ -12,7 +12,7 @@ from django.core.mail import send_mail from student.models import CourseEnrollment, CourseEnrollmentAllowed 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 SHIBBOLETH_DOMAIN_PREFIX = 'shib:' diff --git a/lms/djangoapps/instructor/hint_manager.py b/lms/djangoapps/instructor/hint_manager.py index 9f555b9c56..a8b97fbe32 100644 --- a/lms/djangoapps/instructor/hint_manager.py +++ b/lms/djangoapps/instructor/hint_manager.py @@ -13,7 +13,7 @@ import re from django.http import HttpResponse, Http404 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.models import XModuleUserStateSummaryField diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index de14df2940..9c1cc43a61 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -6,7 +6,7 @@ from functools import partial from django.utils.translation import ugettext as _ from django_future.csrf import ensure_csrf_cookie 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.utils.html import escape from django.http import Http404 diff --git a/lms/djangoapps/instructor/views/legacy.py b/lms/djangoapps/instructor/views/legacy.py index 98c18dc68b..09046f7593 100644 --- a/lms/djangoapps/instructor/views/legacy.py +++ b/lms/djangoapps/instructor/views/legacy.py @@ -50,7 +50,7 @@ from instructor_task.api import (get_running_instructor_tasks, submit_reset_problem_attempts_for_all_students, submit_bulk_course_email) 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 student.models import CourseEnrollment, CourseEnrollmentAllowed, unique_id_for_user from student.views import course_from_id diff --git a/lms/djangoapps/licenses/views.py b/lms/djangoapps/licenses/views.py index 1c1a80ed31..42ecb9ecf1 100644 --- a/lms/djangoapps/licenses/views.py +++ b/lms/djangoapps/licenses/views.py @@ -5,7 +5,7 @@ from urlparse import urlparse 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.models import User diff --git a/lms/djangoapps/multicourse/views.py b/lms/djangoapps/multicourse/views.py index da9ccb77a6..c48c4477e4 100644 --- a/lms/djangoapps/multicourse/views.py +++ b/lms/djangoapps/multicourse/views.py @@ -1,5 +1,5 @@ from django.conf import settings -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from multicourse import multicourse_settings diff --git a/lms/djangoapps/notes/views.py b/lms/djangoapps/notes/views.py index 01671b7ccd..bf57f80c3d 100644 --- a/lms/djangoapps/notes/views.py +++ b/lms/djangoapps/notes/views.py @@ -1,6 +1,6 @@ from django.contrib.auth.decorators import login_required 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 notes.models import Note from notes.utils import notes_enabled_for_course diff --git a/lms/djangoapps/notification_prefs/views.py b/lms/djangoapps/notification_prefs/views.py index 6be5b8f766..68e8c875da 100644 --- a/lms/djangoapps/notification_prefs/views.py +++ b/lms/djangoapps/notification_prefs/views.py @@ -10,7 +10,7 @@ from django.core.exceptions import PermissionDenied from django.http import Http404, HttpResponse 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 user_api.models import UserPreference diff --git a/lms/djangoapps/open_ended_grading/open_ended_notifications.py b/lms/djangoapps/open_ended_grading/open_ended_notifications.py index c4580dd304..e99f51283c 100644 --- a/lms/djangoapps/open_ended_grading/open_ended_notifications.py +++ b/lms/djangoapps/open_ended_grading/open_ended_notifications.py @@ -9,7 +9,7 @@ from xmodule.open_ended_grading_classes.controller_query_service import Controll from courseware.access import has_access 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 util.cache import cache diff --git a/lms/djangoapps/open_ended_grading/staff_grading_service.py b/lms/djangoapps/open_ended_grading/staff_grading_service.py index 1322f3f069..ba8009ece3 100644 --- a/lms/djangoapps/open_ended_grading/staff_grading_service.py +++ b/lms/djangoapps/open_ended_grading/staff_grading_service.py @@ -13,7 +13,7 @@ from xmodule.open_ended_grading_classes.grading_service_module import GradingSer from courseware.access import has_access 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 util.json_request import expect_json diff --git a/lms/djangoapps/open_ended_grading/tests.py b/lms/djangoapps/open_ended_grading/tests.py index ad6298d71a..7e4a805fc9 100644 --- a/lms/djangoapps/open_ended_grading/tests.py +++ b/lms/djangoapps/open_ended_grading/tests.py @@ -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 lms.lib.xblock.runtime import LmsModuleSystem 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 open_ended_grading import staff_grading_service, views, utils diff --git a/lms/djangoapps/open_ended_grading/utils.py b/lms/djangoapps/open_ended_grading/utils.py index bfde229e9c..01d58fb479 100644 --- a/lms/djangoapps/open_ended_grading/utils.py +++ b/lms/djangoapps/open_ended_grading/utils.py @@ -11,7 +11,7 @@ from django.utils.translation import ugettext as _ from django.conf import settings 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__) diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index e8002e0883..383187bbb9 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -2,7 +2,7 @@ import logging from django.conf import settings 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 student.models import unique_id_for_user @@ -19,7 +19,7 @@ from xmodule.modulestore import search from xmodule.modulestore.exceptions import ItemNotFoundError, NoPathToItem 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 open_ended_grading.utils import (STAFF_ERROR_MESSAGE, STUDENT_ERROR_MESSAGE, diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index fa77efb50f..7de62343c7 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -23,7 +23,7 @@ from xmodule.course_module import CourseDescriptor from xmodule.modulestore.exceptions import ItemNotFoundError 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.models import CourseEnrollment, unenroll_done diff --git a/lms/djangoapps/shoppingcart/processors/CyberSource.py b/lms/djangoapps/shoppingcart/processors/CyberSource.py index 5d43482bd4..d6811303a1 100644 --- a/lms/djangoapps/shoppingcart/processors/CyberSource.py +++ b/lms/djangoapps/shoppingcart/processors/CyberSource.py @@ -13,7 +13,7 @@ from hashlib import sha1 from textwrap import dedent from django.conf import settings 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.processors.exceptions import * diff --git a/lms/djangoapps/shoppingcart/tests/payment_fake.py b/lms/djangoapps/shoppingcart/tests/payment_fake.py index fa6f401904..0de87410ef 100644 --- a/lms/djangoapps/shoppingcart/tests/payment_fake.py +++ b/lms/djangoapps/shoppingcart/tests/payment_fake.py @@ -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.decorators.csrf import csrf_exempt 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, diff --git a/lms/djangoapps/shoppingcart/tests/test_views.py b/lms/djangoapps/shoppingcart/tests/test_views.py index 0451277ce2..0d23dc0419 100644 --- a/lms/djangoapps/shoppingcart/tests/test_views.py +++ b/lms/djangoapps/shoppingcart/tests/test_views.py @@ -18,7 +18,7 @@ from shoppingcart.models import Order, CertificateItem, PaidCourseRegistration, from student.tests.factories import UserFactory from student.models import CourseEnrollment 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 mock import patch, Mock diff --git a/lms/djangoapps/shoppingcart/views.py b/lms/djangoapps/shoppingcart/views.py index ad7ef6b080..26cf3e5a51 100644 --- a/lms/djangoapps/shoppingcart/views.py +++ b/lms/djangoapps/shoppingcart/views.py @@ -10,7 +10,7 @@ from django.views.decorators.http import require_POST from django.core.urlresolvers import reverse from django.views.decorators.csrf import csrf_exempt 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 .processors import process_postpay_callback, render_purchase_form_html from .exceptions import ItemAlreadyInCartException, AlreadyEnrolledInCourseException, CourseDoesNotExistException diff --git a/lms/djangoapps/static_template_view/views.py b/lms/djangoapps/static_template_view/views.py index e5a8c43ca8..4cff3c77ac 100644 --- a/lms/djangoapps/static_template_view/views.py +++ b/lms/djangoapps/static_template_view/views.py @@ -3,7 +3,7 @@ # List of valid templates is explicitly managed for (short-term) # 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 django.shortcuts import redirect from django.conf import settings diff --git a/lms/djangoapps/staticbook/views.py b/lms/djangoapps/staticbook/views.py index f73cfb6e5b..db9dce87dd 100644 --- a/lms/djangoapps/staticbook/views.py +++ b/lms/djangoapps/staticbook/views.py @@ -4,7 +4,7 @@ Views for serving static textbooks. from django.contrib.auth.decorators import login_required 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.courses import get_course_with_access diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py index 673564e72c..2ac798bbf2 100644 --- a/lms/djangoapps/verify_student/views.py +++ b/lms/djangoapps/verify_student/views.py @@ -6,7 +6,7 @@ import json import logging import decimal -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from django.conf import settings from django.core.urlresolvers import reverse diff --git a/lms/envs/acceptance.py b/lms/envs/acceptance.py index 8236303161..76db5b005b 100644 --- a/lms/envs/acceptance.py +++ b/lms/envs/acceptance.py @@ -36,7 +36,7 @@ DOC_STORE_CONFIG = { modulestore_options = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': TEST_ROOT / "data", - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } MODULESTORE = { diff --git a/lms/envs/cms/dev.py b/lms/envs/cms/dev.py index 0978d88d17..f70d05653f 100644 --- a/lms/envs/cms/dev.py +++ b/lms/envs/cms/dev.py @@ -31,7 +31,7 @@ DOC_STORE_CONFIG = { modulestore_options = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': DATA_DIR, - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } MODULESTORE = { diff --git a/lms/envs/cms/mixed_dev.py b/lms/envs/cms/mixed_dev.py index ba45d7e747..f636566558 100644 --- a/lms/envs/cms/mixed_dev.py +++ b/lms/envs/cms/mixed_dev.py @@ -33,7 +33,7 @@ MODULESTORE = { 'OPTIONS': { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': DATA_DIR, - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } } }, diff --git a/lms/envs/common.py b/lms/envs/common.py index 46c9df1a6e..2341e30cb1 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -281,7 +281,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'course_wiki.course_nav.context_processor', # 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.context_processor.user_has_cart_context_processor', @@ -592,8 +592,8 @@ STATICFILES_FINDERS = ( # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( - 'mitxmako.makoloader.MakoFilesystemLoader', - 'mitxmako.makoloader.MakoAppDirectoriesLoader', + 'edxmako.makoloader.MakoFilesystemLoader', + 'edxmako.makoloader.MakoAppDirectoriesLoader', # 'django.template.loaders.filesystem.Loader', # 'django.template.loaders.app_directories.Loader', @@ -615,7 +615,7 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.messages.middleware.MessageMiddleware', 'track.middleware.TrackMiddleware', - 'mitxmako.middleware.MakoMiddleware', + 'edxmako.middleware.MakoMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'course_wiki.course_nav.Middleware', @@ -928,7 +928,7 @@ INSTALLED_APPS = ( 'service_status', # For asset pipelining - 'mitxmako', + 'edxmako', 'pipeline', 'staticfiles', 'static_replace', diff --git a/lms/envs/dev_ike.py b/lms/envs/dev_ike.py index 50bbfff096..0123c5c1e0 100644 --- a/lms/envs/dev_ike.py +++ b/lms/envs/dev_ike.py @@ -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')]) 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 = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', diff --git a/lms/envs/dev_mongo.py b/lms/envs/dev_mongo.py index bd7a8b20aa..3a99f44655 100644 --- a/lms/envs/dev_mongo.py +++ b/lms/envs/dev_mongo.py @@ -21,7 +21,7 @@ MODULESTORE = { 'OPTIONS': { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': GITHUB_REPO_ROOT, - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } } }