Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, March 26th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
397f3833
Commit
397f3833
authored
11 years ago
by
Sef Kloninger
Browse files
Options
Downloads
Patches
Plain Diff
missing themed embargo page fails safely to unthemed
parent
f4848074
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/djangoapps/student/views.py
+8
-5
8 additions, 5 deletions
common/djangoapps/student/views.py
with
8 additions
and
5 deletions
common/djangoapps/student/views.py
+
8
−
5
View file @
397f3833
...
...
@@ -33,6 +33,7 @@ from django.views.decorators.http import require_POST, require_GET
from
ratelimitbackend.exceptions
import
RateLimitException
from
edxmako.shortcuts
import
render_to_response
,
render_to_string
from
mako.exceptions
import
TopLevelLookupException
from
course_modes.models
import
CourseMode
from
student.models
import
(
...
...
@@ -147,12 +148,14 @@ def embargo(_request):
Render the embargo page.
Explains to the user why they are not able to access a particular embargoed course.
Tries to use the themed version, but fall back to the default if not found.
"""
if
settings
.
FEATURES
[
"
USE_CUSTOM_THEME
"
]:
template
=
"
static_templates/theme-embargo.html
"
else
:
template
=
"
static_templates/embargo.html
"
return
render_to_response
(
template
)
try
:
if
settings
.
FEATURES
[
"
USE_CUSTOM_THEME
"
]:
return
render_to_response
(
"
static_templates/theme-embargo.html
"
)
except
TopLevelLookupException
:
pass
return
render_to_response
(
"
static_templates/embargo.html
"
)
def
press
(
request
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment