summaryrefslogtreecommitdiffstats
path: root/uauth/organization/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'uauth/organization/views.py')
-rw-r--r--uauth/organization/views.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/uauth/organization/views.py b/uauth/organization/views.py
index 61bb002..e940311 100644
--- a/uauth/organization/views.py
+++ b/uauth/organization/views.py
@@ -1,5 +1,13 @@
+from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse_lazy
+
from django.views.generic.base import TemplateView
+from django.views.generic.list import ListView
+
+from django_tables2 import RequestConfig
+
+from .models import LocalAccount, Organization
+from .tables import AccountTable
class OrganizationMixin(object):
@@ -20,3 +28,16 @@ class ManageView(TemplateView):
template_name = 'organization/manage.html'
manage = ManageView.as_view()
+
+class UsersPageView(OrganizationMixin, ListView):
+ template_name = 'organization/users.html'
+ model = LocalAccount
+
+ def get_context_data(self, *args, **kwargs):
+ context = super(UsersPageView, self).get_context_data(*args, **kwargs)
+ table = AccountTable(context['object_list'])
+ RequestConfig(self.request).configure(table)
+ context['table'] = table
+ return context
+
+users = UsersPageView.as_view()