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
fc15438f
Commit
fc15438f
authored
Jan 01, 2012
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added help page
parent
ded38ca9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
static_template_view/views.py
+11
-0
urls.py
+1
-0
No files found.
static_template_view/views.py
View file @
fc15438f
...
...
@@ -13,3 +13,14 @@ def index(request, template):
return
render_to_response
(
template
,{})
else
:
return
redirect
(
'/'
)
valid_auth_templates
=
[
'help.html'
]
def
auth_index
(
request
,
template
):
if
not
request
.
user
.
is_authenticated
():
return
redirect
(
'/'
)
if
template
in
valid_auth_templates
:
return
render_to_response
(
template
,{})
else
:
return
redirect
(
'/'
)
urls.py
View file @
fc15438f
...
...
@@ -18,6 +18,7 @@ urlpatterns = ('',
url
(
r'^profile$'
,
'courseware.views.profile'
),
url
(
r'^change_setting$'
,
'auth.views.change_setting'
),
url
(
r'^t/(?P<template>[^/]*)$'
,
'static_template_view.views.index'
),
url
(
r'^s/(?P<template>[^/]*)$'
,
'static_template_view.views.auth_index'
),
url
(
r'^book/(?P<page>[^/]*)$'
,
'staticbook.views.index'
),
url
(
r'^book*$'
,
'staticbook.views.index'
),
url
(
r'^logout$'
,
'auth.views.logout_user'
),
...
...
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