Create database list view.
This commit is contained in:
parent
c8e8f778d7
commit
37854207dc
|
@ -13,6 +13,7 @@ API_PATHS = {
|
||||||
'my-account': 'accounts/',
|
'my-account': 'accounts/',
|
||||||
|
|
||||||
# services
|
# services
|
||||||
|
'database-list': 'databases/',
|
||||||
'domain-list': 'domains/',
|
'domain-list': 'domains/',
|
||||||
'address-list': 'addresses/',
|
'address-list': 'addresses/',
|
||||||
'mailbox-list': 'mailboxes/',
|
'mailbox-list': 'mailboxes/',
|
||||||
|
|
|
@ -17,6 +17,11 @@ class Service:
|
||||||
return getattr(self, key, self.data.get(key))
|
return getattr(self, key, self.data.get(key))
|
||||||
|
|
||||||
|
|
||||||
|
class DatabaseService(Service):
|
||||||
|
api_name = 'database'
|
||||||
|
fields = ('name', 'type', 'users')
|
||||||
|
|
||||||
|
|
||||||
class MailService(Service):
|
class MailService(Service):
|
||||||
api_name = 'address'
|
api_name = 'address'
|
||||||
verbose_name = 'Mail'
|
verbose_name = 'Mail'
|
||||||
|
|
|
@ -88,8 +88,8 @@ class MailingListsView(ServiceListView):
|
||||||
service_class = MailinglistService
|
service_class = MailinglistService
|
||||||
|
|
||||||
|
|
||||||
class DatabasesView(CustomContextMixin, UserTokenRequiredMixin, TemplateView):
|
class DatabasesView(ServiceListView):
|
||||||
template_name = "musician/databases.html"
|
service_class = DatabaseService
|
||||||
|
|
||||||
|
|
||||||
class SaasView(CustomContextMixin, UserTokenRequiredMixin, TemplateView):
|
class SaasView(CustomContextMixin, UserTokenRequiredMixin, TemplateView):
|
||||||
|
|
Loading…
Reference in New Issue