diff --git a/app/admin/routes.py b/app/admin/routes.py index 8026135d..e090f4cc 100644 --- a/app/admin/routes.py +++ b/app/admin/routes.py @@ -973,6 +973,7 @@ def admin_instances(): low_bandwidth = request.cookies.get('low_bandwidth', '0') == '1' instances = Instance.query.order_by(Instance.domain) + user_model = User if search: instances = instances.filter(Instance.domain.ilike(f"%{search}%")) @@ -987,7 +988,7 @@ def admin_instances(): return render_template('admin/instances.html', instances=instances, title=_('Instances'), search=search, next_url=next_url, prev_url=prev_url, - low_bandwidth=low_bandwidth, + low_bandwidth=low_bandwidth, user_model=user_model, moderating_communities=moderating_communities(current_user.get_id()), joined_communities=joined_communities(current_user.get_id()), menu_topics=menu_topics(), site=g.site) diff --git a/app/templates/admin/instances.html b/app/templates/admin/instances.html index 7e8a912f..22c9ab26 100644 --- a/app/templates/admin/instances.html +++ b/app/templates/admin/instances.html @@ -18,6 +18,7 @@ Domain Software Version + Users Posts Post Replies Communities @@ -32,6 +33,7 @@ {{ instance.domain }} {{ instance.software }} {{ instance.version if instance.version }} + {{ len(user_model.query.filter_by(instance_id=instance.id).all()) }} {{ len(instance.posts.all()) }} {{ len(instance.post_replies.all()) }} {{ len(instance.communities.all()) }}