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
b2af990d
Commit
b2af990d
authored
Sep 23, 2013
by
Usman Khalid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If setting COURSES_ARE_BROWSABLE is off return 404 on /courses
parent
3ff203d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
lms/djangoapps/branding/views.py
+4
-0
No files found.
lms/djangoapps/branding/views.py
View file @
b2af990d
from
django.conf
import
settings
from
django.core.urlresolvers
import
reverse
from
django.http
import
Http404
from
django.shortcuts
import
redirect
from
django_future.csrf
import
ensure_csrf_cookie
from
mitxmako.shortcuts
import
render_to_response
...
...
@@ -48,6 +49,9 @@ def courses(request):
if
settings
.
MITX_FEATURES
.
get
(
'ENABLE_MKTG_SITE'
,
False
):
return
redirect
(
marketing_link
(
'COURSES'
),
permanent
=
True
)
if
not
settings
.
MITX_FEATURES
.
get
(
'COURSES_ARE_BROWSABLE'
):
raise
Http404
university
=
branding
.
get_university
(
request
.
META
.
get
(
'HTTP_HOST'
))
if
university
==
'edge'
:
return
render_to_response
(
'university_profile/edge.html'
,
{})
...
...
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