mirror of https://github.com/zulip/zulip.git
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:
parent
7c790357a1
commit
5353f5b3b0
|
@ -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:
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue