Commit 6f3a954d by Don Mitchell

howitworks is default home page if not logged in. Otherwise course

index. NOTE: didn't fix old wrong behavior of going to index if not
logged in and tried to navigate to a specific page. Will work on that
next.
parent d569c559
......@@ -95,7 +95,10 @@ def login_page(request):
})
def howitworks(request):
return render_to_response('howitworks.html', {})
if request.user.is_authenticated():
return index(request)
else:
return render_to_response('howitworks.html', {})
# ==== Views for any logged-in user ==================================
......
......@@ -77,7 +77,7 @@
submit_data,
function(json) {
if(json.success) {
location.href = "${reverse('index')}";
location.href = "${reverse('homepage')}";
} else if($('#login_error').length == 0) {
$('#login_form').prepend('<div id="login_error" class="message message-status error">' + json.value + '</span></div>');
$('#login_error').addClass('is-shown');
......
......@@ -6,7 +6,8 @@ from django.conf.urls import patterns, include, url
# admin.autodiscover()
urlpatterns = ('',
url(r'^$', 'contentstore.views.index', name='index'),
url(r'^$', 'contentstore.views.howitworks', name='homepage'),
url(r'^listing', 'contentstore.views.index', name='index'),
url(r'^edit/(?P<location>.*?)$', 'contentstore.views.edit_unit', name='edit_unit'),
url(r'^subsection/(?P<location>.*?)$', 'contentstore.views.edit_subsection', name='edit_subsection'),
url(r'^preview_component/(?P<location>.*?)$', 'contentstore.views.preview_component', name='preview_component'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment