diff --git a/brutaldon/urls.py b/brutaldon/urls.py index a37f3ad..a8043b9 100644 --- a/brutaldon/urls.py +++ b/brutaldon/urls.py @@ -66,5 +66,6 @@ urlpatterns = [ path('filters/edit/', views.edit_filter, name='edit_filter'), path('requests/', views.follow_requests, name='follow_requests'), path('requests/', views.follow_requests, name='follow_requests'), + path('accounts/', views.accounts, name='accounts'), path('', views.home, name=''), ] diff --git a/brutaldon/views.py b/brutaldon/views.py index 47c9fe6..99f5a21 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -1132,3 +1132,12 @@ def follow_requests(request, id=None): mastodon.follow_request_reject(id) return redirect(follow_requests) +@br_login_required +def accounts(request): + active_account, mastodon = get_usercontext(request) + if request.method == 'GET': + accounts = [x['user'] for x in request.session.get('accounts_dict').values()] + return render(request, 'accounts/list.html', + {'active_account': active_account, + 'accounts': accounts, + 'preferences': active_account.preferences})