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
de52b657
Commit
de52b657
authored
Jan 11, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding hooks for a new course info page
parent
18dc8cc5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
auth/views.py
+9
-0
urls.py
+1
-0
No files found.
auth/views.py
View file @
de52b657
...
...
@@ -25,6 +25,15 @@ def index(request):
# TODO: Clean up how 'error' is done.
return
render_to_response
(
'index.html'
,
{
'error'
:
''
,
'csrf'
:
csrf_token
})
def
courseinfo
(
request
):
if
request
.
user
.
is_authenticated
():
return
redirect
(
'/courseware'
)
else
:
csrf_token
=
csrf
(
request
)[
'csrf_token'
]
# TODO: Clean up how 'error' is done.
return
render_to_response
(
'index.html'
,
{
'error'
:
''
,
'csrf'
:
csrf_token
})
def
login_user
(
request
,
error
=
""
):
print
request
.
POST
...
...
urls.py
View file @
de52b657
...
...
@@ -27,6 +27,7 @@ urlpatterns = ('',
url
(
r'^create_account$'
,
'auth.views.create_account'
),
url
(
r'^activate/(?P<key>[^/]*)$'
,
'auth.views.activate_account'
),
url
(
r'^$'
,
'auth.views.index'
),
url
(
r'^course_info$'
,
'auth.views.courseinfo'
),
url
(
r'^password_reset/$'
,
'django.contrib.auth.views.password_reset'
,
dict
(
from_email
=
'6002-admin@mit.edu'
),
name
=
'auth_password_reset'
),
url
(
r'^password_change/$'
,
django
.
contrib
.
auth
.
views
.
password_change
,
name
=
'auth_password_change'
),
...
...
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