Commit 7074e3ab by Brian Beggs Committed by GitHub

Merge pull request #14902 from Salomari1987/salah/copyright-year

Set COPYRIGHT_YEAR dynamically
parents cc460bbb b8ba64cb
...@@ -49,7 +49,7 @@ import lms.envs.common ...@@ -49,7 +49,7 @@ import lms.envs.common
# Although this module itself may not use these imported variables, other dependent modules may. # Although this module itself may not use these imported variables, other dependent modules may.
from lms.envs.common import ( from lms.envs.common import (
USE_TZ, TECH_SUPPORT_EMAIL, PLATFORM_NAME, BUGS_EMAIL, DOC_STORE_CONFIG, DATA_DIR, ALL_LANGUAGES, WIKI_ENABLED, USE_TZ, TECH_SUPPORT_EMAIL, PLATFORM_NAME, BUGS_EMAIL, DOC_STORE_CONFIG, DATA_DIR, ALL_LANGUAGES, WIKI_ENABLED,
update_module_store_settings, ASSET_IGNORE_REGEX, COPYRIGHT_YEAR, update_module_store_settings, ASSET_IGNORE_REGEX,
PARENTAL_CONSENT_AGE_LIMIT, COMPREHENSIVE_THEME_DIRS, REGISTRATION_EMAIL_PATTERNS_ALLOWED, PARENTAL_CONSENT_AGE_LIMIT, COMPREHENSIVE_THEME_DIRS, REGISTRATION_EMAIL_PATTERNS_ALLOWED,
# The following PROFILE_IMAGE_* settings are included as they are # The following PROFILE_IMAGE_* settings are included as they are
# indirectly accessed through the email opt-in API, which is # indirectly accessed through the email opt-in API, which is
......
<%! <%!
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from datetime import datetime
from django.conf import settings
import pytz
%> %>
<div class="wrapper-footer wrapper"> <div class="wrapper-footer wrapper">
...@@ -8,7 +11,7 @@ from django.core.urlresolvers import reverse ...@@ -8,7 +11,7 @@ from django.core.urlresolvers import reverse
<div class="footer-content-primary"> <div class="footer-content-primary">
<div class="colophon"> <div class="colophon">
<p>&copy; ${settings.COPYRIGHT_YEAR} <a data-rel="edx.org" href="${marketing_link('ROOT')}" rel="external">${settings.PLATFORM_NAME}</a>.</p> <p>&copy; ${datetime.now(pytz.timezone(settings.TIME_ZONE)).year} <a data-rel="edx.org" href="${marketing_link('ROOT')}" rel="external">${settings.PLATFORM_NAME}</a>.</p>
</div> </div>
% if is_any_marketing_link_set(['TOS', 'PRIVACY']): % if is_any_marketing_link_set(['TOS', 'PRIVACY']):
......
...@@ -5,6 +5,7 @@ Certificate HTML webview. ...@@ -5,6 +5,7 @@ Certificate HTML webview.
import logging import logging
import urllib import urllib
from datetime import datetime from datetime import datetime
import pytz
from uuid import uuid4 from uuid import uuid4
from django.conf import settings from django.conf import settings
...@@ -153,7 +154,7 @@ def _update_context_with_basic_info(context, course_id, platform_name, configura ...@@ -153,7 +154,7 @@ def _update_context_with_basic_info(context, course_id, platform_name, configura
# Translators: 'All rights reserved' is a legal term used in copyrighting to protect published content # Translators: 'All rights reserved' is a legal term used in copyrighting to protect published content
reserved = _("All rights reserved") reserved = _("All rights reserved")
context['copyright_text'] = u'&copy; {year} {platform_name}. {reserved}.'.format( context['copyright_text'] = u'&copy; {year} {platform_name}. {reserved}.'.format(
year=settings.COPYRIGHT_YEAR, year=datetime.now(pytz.timezone(settings.TIME_ZONE)).year,
platform_name=platform_name, platform_name=platform_name,
reserved=reserved reserved=reserved
) )
......
...@@ -47,8 +47,6 @@ from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin ...@@ -47,8 +47,6 @@ from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin
# The display name of the platform to be used in templates/emails/etc. # The display name of the platform to be used in templates/emails/etc.
PLATFORM_NAME = "Your Platform Name Here" PLATFORM_NAME = "Your Platform Name Here"
CC_MERCHANT_NAME = PLATFORM_NAME CC_MERCHANT_NAME = PLATFORM_NAME
# Shows up in the platform footer, eg "(c) COPYRIGHT_YEAR"
COPYRIGHT_YEAR = "2017"
PLATFORM_FACEBOOK_ACCOUNT = "http://www.facebook.com/YourPlatformFacebookAccount" PLATFORM_FACEBOOK_ACCOUNT = "http://www.facebook.com/YourPlatformFacebookAccount"
PLATFORM_TWITTER_ACCOUNT = "@YourPlatformTwitterAccount" PLATFORM_TWITTER_ACCOUNT = "@YourPlatformTwitterAccount"
......
...@@ -3,6 +3,11 @@ ...@@ -3,6 +3,11 @@
<%! <%!
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from django.conf import settings
from datetime import datetime
import pytz
from openedx.core.djangoapps.lang_pref.api import footer_language_selector_is_enabled from openedx.core.djangoapps.lang_pref.api import footer_language_selector_is_enabled
%> %>
...@@ -58,7 +63,7 @@ from openedx.core.djangoapps.lang_pref.api import footer_language_selector_is_en ...@@ -58,7 +63,7 @@ from openedx.core.djangoapps.lang_pref.api import footer_language_selector_is_en
</p> </p>
</div> </div>
<p class="copyright">&copy; ${settings.COPYRIGHT_YEAR} ${static.get_platform_name()}.</p> <p class="copyright">&copy; ${datetime.now(pytz.timezone(settings.TIME_ZONE)).year} ${static.get_platform_name()}.</p>
## Site operators: Please do not remove this paragraph! This attributes back to edX and makes your acknowledgement of edX's trademarks clear. ## Site operators: Please do not remove this paragraph! This attributes back to edX and makes your acknowledgement of edX's trademarks clear.
<p class="copyright"> <p class="copyright">
......
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