Rename NOT_LOGGED_IN_REDIRECT -> HOME_NOT_LOGGED_IN

If we have other pages that require login, we might want them to redirect to
the login form.  But the root of the site should take you to /accounts/home --
but only after we launch the product.

(imported from commit b5d10e1c908f1ffe1ee68c2689691ca66c896786)
This commit is contained in:
Keegan McAllister 2012-10-29 14:38:41 -04:00
parent 7c790357a1
commit 5353f5b3b0
2 changed files with 3 additions and 3 deletions

View File

@ -208,11 +208,11 @@ MESSAGE_LOG="all_messages_log"
if deployed:
ALLOW_REGISTER = False
FULL_NAVBAR = False
NOT_LOGGED_IN_REDIRECT = 'django.contrib.auth.views.login'
HOME_NOT_LOGGED_IN = 'django.contrib.auth.views.login'
else:
ALLOW_REGISTER = True
FULL_NAVBAR = True
NOT_LOGGED_IN_REDIRECT = 'zephyr.views.accounts_home'
HOME_NOT_LOGGED_IN = 'zephyr.views.accounts_home'
# For testing, you may want to have emails be printed to the console.
if not deployed:

View File

@ -157,7 +157,7 @@ def accounts_home(request):
def home(request):
if not request.user.is_authenticated():
return HttpResponseRedirect(reverse(settings.NOT_LOGGED_IN_REDIRECT))
return HttpResponseRedirect(reverse(settings.HOME_NOT_LOGGED_IN))
user_profile = UserProfile.objects.get(user=request.user)
num_messages = UserMessage.objects.filter(user_profile=user_profile).count()