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

Set COPYRIGHT_YEAR dynamically
This commit is contained in:
Brian Beggs
2017-06-23 16:06:35 -04:00
committed by GitHub
5 changed files with 13 additions and 6 deletions

View File

@@ -5,6 +5,7 @@ Certificate HTML webview.
import logging
import urllib
from datetime import datetime
import pytz
from uuid import uuid4
from django.conf import settings
@@ -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
reserved = _("All rights reserved")
context['copyright_text'] = u'© {year} {platform_name}. {reserved}.'.format(
year=settings.COPYRIGHT_YEAR,
year=datetime.now(pytz.timezone(settings.TIME_ZONE)).year,
platform_name=platform_name,
reserved=reserved
)

View File

@@ -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.
PLATFORM_NAME = "Your Platform Name Here"
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_TWITTER_ACCOUNT = "@YourPlatformTwitterAccount"