Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
77f605b3
Commit
77f605b3
authored
Jun 06, 2016
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected usage of the title block for the main_django template
ECOM-4610
parent
6bc0fa2b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
2 deletions
+37
-2
common/djangoapps/microsite_configuration/context_processors.py
+11
-0
common/djangoapps/microsite_configuration/tests/test_context_processors.py
+21
-0
lms/envs/common.py
+1
-0
lms/templates/main_django.html
+1
-1
lms/templates/wiki/base.html
+3
-1
No files found.
common/djangoapps/microsite_configuration/context_processors.py
0 → 100644
View file @
77f605b3
""" Django template ontext processors. """
from
django.conf
import
settings
from
microsite_configuration
import
microsite
def
microsite_context
(
request
):
# pylint: disable=unused-argument
return
{
'platform_name'
:
microsite
.
get_value
(
'platform_name'
,
settings
.
PLATFORM_NAME
)
}
common/djangoapps/microsite_configuration/tests/test_context_processors.py
0 → 100644
View file @
77f605b3
""" Tests for Django template context processors. """
from
django.test
import
TestCase
from
django.test.client
import
RequestFactory
from
django.test.utils
import
override_settings
from
microsite_configuration.context_processors
import
microsite_context
PLATFORM_NAME
=
'Test Platform'
@override_settings
(
PLATFORM_NAME
=
PLATFORM_NAME
)
class
MicrositeContextProcessorTests
(
TestCase
):
""" Tests for the microsite context processor. """
def
setUp
(
self
):
request
=
RequestFactory
()
.
get
(
'/'
)
self
.
context
=
microsite_context
(
request
)
def
test_platform_name
(
self
):
""" Verify the context includes the platform name. """
self
.
assertEqual
(
self
.
context
[
'platform_name'
],
PLATFORM_NAME
)
lms/envs/common.py
View file @
77f605b3
...
...
@@ -499,6 +499,7 @@ TEMPLATES = [
'django.template.context_processors.i18n'
,
'django.contrib.auth.context_processors.auth'
,
# this is required for admin
'django.template.context_processors.csrf'
,
'microsite_configuration.context_processors.microsite_context'
,
# Added for django-wiki
'django.template.context_processors.media'
,
...
...
lms/templates/main_django.html
View file @
77f605b3
...
...
@@ -4,7 +4,7 @@
<html
lang=
"{{LANGUAGE_CODE}}"
>
<head>
<meta
charset=
"UTF-8"
>
{% block title %}
<title>
{% platform_name %}
</title>
{% endblock %}
<title>
{% block title %}{{ platform_name }}{% endblock %}
</title>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"{% favicon_path %}"
/>
...
...
lms/templates/wiki/base.html
View file @
77f605b3
...
...
@@ -2,7 +2,9 @@
{% with online_help_token="wiki" %}
{% load pipeline %}{% load sekizai_tags i18n microsite %}{% load url from future %}{% load staticfiles %}
{% block title %}
<title>
{% block pagetitle %}{% endblock %} | {% trans "Wiki" %} | {% platform_name %}
</title>
{% endblock %}
{% block title %}
{% block pagetitle %}{% endblock %} | {% trans "Wiki" %} | {% platform_name %}
{% endblock %}
{% block bodyclass %}view-in-course view-wiki{% endblock %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment