1. Merge microsites into Comprehensive Theming

2. Add site configuration overrides to theming/helpers.py
3. Move microsite.get_value from theming/helpers to site_configuration/helpers
4. Move microsite_configuration.microsite.get_value usages to site_configuration.helpers.values
This commit is contained in:
Saleem Latif
2016-07-19 15:26:31 +05:00
parent e8c60bc6c1
commit 8ae92901ef
142 changed files with 1581 additions and 785 deletions

View File

@@ -17,7 +17,7 @@ from edxmako.shortcuts import render_to_string
from simple_history.models import HistoricalRecords
from config_models.models import ConfigurationModel
from openedx.core.djangoapps.theming.helpers import get_value as get_themed_value
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers
log = logging.getLogger(__name__)
@@ -162,7 +162,7 @@ def _send_decision_email(instance):
'authentication_docs_url': settings.AUTH_DOCUMENTATION_URL,
'api_docs_url': settings.API_DOCUMENTATION_URL,
'support_email_address': settings.API_ACCESS_FROM_EMAIL,
'platform_name': get_themed_value('PLATFORM_NAME', settings.PLATFORM_NAME)
'platform_name': configuration_helpers.get_value('PLATFORM_NAME', settings.PLATFORM_NAME)
}
message = render_to_string(

View File

@@ -7,7 +7,7 @@ from django.forms.widgets import CheckboxInput
from django.utils.encoding import force_text
from django.utils.html import format_html
from django.utils.translation import ugettext as _
from openedx.core.djangoapps.theming.helpers import get_value as get_themed_value
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers
class TermsOfServiceCheckboxInput(CheckboxInput):
@@ -24,7 +24,7 @@ class TermsOfServiceCheckboxInput(CheckboxInput):
# Translators: link_start and link_end are HTML tags for a link to the terms of service.
# platform_name is the name of this Open edX installation.
label = _('I, and my company, accept the {link_start}{platform_name} API Terms of Service{link_end}.').format(
platform_name=get_themed_value('PLATFORM_NAME', settings.PLATFORM_NAME),
platform_name=configuration_helpers.get_value('PLATFORM_NAME', settings.PLATFORM_NAME),
link_start='<a href="{url}" target="_blank">'.format(url=reverse('api_admin:api-tos')),
link_end='</a>',
)