Create database list view.
This commit is contained in:
parent
c8e8f778d7
commit
37854207dc
|
@ -13,6 +13,7 @@ API_PATHS = {
|
|||
'my-account': 'accounts/',
|
||||
|
||||
# services
|
||||
'database-list': 'databases/',
|
||||
'domain-list': 'domains/',
|
||||
'address-list': 'addresses/',
|
||||
'mailbox-list': 'mailboxes/',
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue