Fix DatabasesView

This commit is contained in:
Santiago L 2023-11-23 18:51:12 +01:00
parent 4cdff1f0db
commit d97e7b6fae
2 changed files with 3 additions and 1 deletions

View File

@ -27,7 +27,7 @@
<div class="col-md-4">
<h4>Database users</h4>
<ul class="list-unstyled pl-2">
{% for user in database.users %}
{% for user in database.users.all %}
{# TODO(@slamora) render in two columns #}
<li><span class="d-inline-block w-25">{{ user.username }}</span> <i class="fas fa-user-edit"></i></li>
{% empty %}

View File

@ -23,6 +23,7 @@ from requests.exceptions import HTTPError
from orchestra import get_version
from orchestra.contrib.bills.models import Bill
from orchestra.contrib.databases.models import Database
from orchestra.contrib.domains.models import Domain
from orchestra.contrib.lists.models import List
from orchestra.contrib.mailboxes.models import Address, Mailbox
@ -428,6 +429,7 @@ class MailboxChangePasswordView(CustomContextMixin, UserTokenRequiredMixin, Upda
class DatabasesView(ServiceListView):
template_name = "musician/databases.html"
model = Database
service_class = DatabaseService
extra_context = {
# Translators: This message appears on the page title