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
03b23da9
Commit
03b23da9
authored
May 10, 2017
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support fallback to supported language variants in the footer
parent
544d5d59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
lms/djangoapps/branding/views.py
+9
-4
No files found.
lms/djangoapps/branding/views.py
View file @
03b23da9
...
...
@@ -3,14 +3,15 @@ import logging
import
urllib
from
django.conf
import
settings
from
django.co
re.urlresolvers
import
revers
e
from
django.co
ntrib.staticfiles.storage
import
staticfiles_storag
e
from
django.core.cache
import
cache
from
django.
views.decorators.cache
import
cache_control
from
django.
core.urlresolvers
import
reverse
from
django.http
import
HttpResponse
,
Http404
from
django.utils
import
translation
from
django.shortcuts
import
redirect
from
django.utils
import
translation
from
django.utils.translation.trans_real
import
get_supported_language_variant
from
django.views.decorators.cache
import
cache_control
from
django.views.decorators.csrf
import
ensure_csrf_cookie
from
django.contrib.staticfiles.storage
import
staticfiles_storage
from
edxmako.shortcuts
import
render_to_response
import
student.views
...
...
@@ -255,6 +256,10 @@ def footer(request):
# Override the language if necessary
language
=
request
.
GET
.
get
(
'language'
,
translation
.
get_language
())
try
:
language
=
get_supported_language_variant
(
language
)
except
LookupError
:
language
=
settings
.
LANGUAGE_CODE
# Render the footer information based on the extension
if
'text/html'
in
accepts
or
'*/*'
in
accepts
:
...
...
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