Direct people to the about page if not logged in.

This commit is contained in:
Jason McBrayer 2018-06-01 09:22:17 -04:00
parent 097dd694fb
commit e1c77dd483

View File

@ -55,7 +55,7 @@ def timeline(request, timeline='home', timeline_name='Home', max_id=None, since_
try: try:
mastodon = get_mastodon(request) mastodon = get_mastodon(request)
except NotLoggedInException: except NotLoggedInException:
return redirect(login) return redirect(about)
data = mastodon.timeline(timeline, limit=100, max_id=max_id, since_id=since_id) data = mastodon.timeline(timeline, limit=100, max_id=max_id, since_id=since_id)
form = PostForm(initial={'visibility': request.session['user'].source.privacy}) form = PostForm(initial={'visibility': request.session['user'].source.privacy})
try: try:
@ -221,7 +221,7 @@ def old_login(request):
@never_cache @never_cache
def logout(request): def logout(request):
request.session.flush() request.session.flush()
return redirect(home) return redirect(about)
def error(request): def error(request):
return render(request, 'error.html', { 'error': "Not logged in yet."}) return render(request, 'error.html', { 'error': "Not logged in yet."})