mirror of
https://gitlab.com/brutaldon/brutaldon.git
synced 2024-11-02 16:37:19 -04:00
Direct people to the about page if not logged in.
This commit is contained in:
parent
097dd694fb
commit
e1c77dd483
@ -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."})
|
||||||
|
Loading…
Reference in New Issue
Block a user