Initial connection of student module with cms.

* Enable account creation
* Some code cleanups
* Fix access to nonexistent fields in the account creation view
* Formatting fixes
This commit is contained in:
Victor Shnayder
2012-07-11 16:45:33 -04:00
parent 924a911139
commit ff59c9bfa9
14 changed files with 209 additions and 35 deletions

View File

@@ -2,9 +2,11 @@ from util.json_request import expect_json
import json
from django.http import HttpResponse
from django.core.context_processors import csrf
from django_future.csrf import ensure_csrf_cookie
from fs.osfs import OSFS
from django.core.urlresolvers import reverse
from fs.osfs import OSFS
from xmodule.modulestore import Location
from github_sync import export_to_github
@@ -25,6 +27,14 @@ def index(request):
})
@ensure_csrf_cookie
def signup(request):
"""
Display the signup form.
"""
csrf_token = csrf(request)['csrf_token']
return render_to_response('signup.html', {'csrf': csrf_token })
@ensure_csrf_cookie
def course_index(request, org, course, name):
# TODO (cpennington): These need to be read in from the active user