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
de52b657
Commit
de52b657
authored
13 years ago
by
Bridger Maxwell
Browse files
Options
Downloads
Patches
Plain Diff
Adding hooks for a new course info page
parent
18dc8cc5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
auth/views.py
+9
-0
9 additions, 0 deletions
auth/views.py
urls.py
+1
-0
1 addition, 0 deletions
urls.py
with
10 additions
and
0 deletions
auth/views.py
+
9
−
0
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
...
...
This diff is collapsed.
Click to expand it.
urls.py
+
1
−
0
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
'
),
...
...
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