Create database list view.

This commit is contained in:
Santiago Lamora 2019-11-13 12:27:25 +01:00
parent c8e8f778d7
commit 37854207dc
3 changed files with 8 additions and 2 deletions

View File

@ -13,6 +13,7 @@ API_PATHS = {
'my-account': 'accounts/',
# services
'database-list': 'databases/',
'domain-list': 'domains/',
'address-list': 'addresses/',
'mailbox-list': 'mailboxes/',

View File

@ -17,6 +17,11 @@ class Service:
return getattr(self, key, self.data.get(key))
class DatabaseService(Service):
api_name = 'database'
fields = ('name', 'type', 'users')
class MailService(Service):
api_name = 'address'
verbose_name = 'Mail'

View File

@ -88,8 +88,8 @@ class MailingListsView(ServiceListView):
service_class = MailinglistService
class DatabasesView(CustomContextMixin, UserTokenRequiredMixin, TemplateView):
template_name = "musician/databases.html"
class DatabasesView(ServiceListView):
service_class = DatabaseService
class SaasView(CustomContextMixin, UserTokenRequiredMixin, TemplateView):