Clean up URL scheme a bit.

Nicer URLs:
	/login to login
	/register to register
	/signup to signup

(Step two is to remove, e.g. /accounts/home/)

Also make /login the default page when you're not logged in.

(Prior to this commit, it was annoyingly different on deployed
vs. not.)

(imported from commit 21adb7a94f03256098d15b2e608d793d3ddb5b23)
This commit is contained in:
Waseem Daher 2013-05-17 17:58:34 -04:00 committed by Leo Franchi
parent 69b3397076
commit 1117278983
3 changed files with 4 additions and 4 deletions

View File

@ -490,14 +490,13 @@ POLL_TIMEOUT = 90 * 1000
# client tests.
TUTORIAL_ENABLED = True
HOME_NOT_LOGGED_IN = '/login'
if DEPLOYED:
ALLOW_REGISTER = False
FULL_NAVBAR = False
HOME_NOT_LOGGED_IN = '/accounts/login'
else:
ALLOW_REGISTER = True
FULL_NAVBAR = True
HOME_NOT_LOGGED_IN = '/accounts/home'
# For testing, you may want to have emails be printed to the console.
if not DEPLOYED:

View File

@ -65,6 +65,8 @@ urlpatterns = patterns('',
url(r'^signup/$', TemplateView.as_view(template_name='zephyr/signup.html'),
name='signup'),
url(r'^signup/sign-me-up$', 'zephyr.views.beta_signup_submission', name='beta-signup-submission'),
url(r'^register/$', 'zephyr.views.accounts_home'),
url(r'^login/$', 'zephyr.views.login_page', {'template_name': 'zephyr/login.html'}),
# API and integrations documentation
url(r'^api$', TemplateView.as_view(template_name='zephyr/api.html')),

View File

@ -5,8 +5,7 @@ casper.start('http://localhost:9981/', common.initialize_casper);
casper.then(function () {
casper.test.assertHttpStatus(302);
casper.test.assertUrlMatch(/^http:\/\/[^\/]+\/accounts\/home/, 'Redirected to /accounts/home');
casper.click('a[href^="/accounts/login"]');
casper.test.assertUrlMatch(/^http:\/\/[^\/]+\/login/, 'Redirected to /login');
});
common.then_log_in();