コード例 #1
0
ファイル: groups.py プロジェクト: jonathancg90/appSpiral
 def test_list_groups(self):
     view = AdminGroupListView.as_view()
     request = self.request_factory.get(reverse('admin_group_list'))
     request.user = self.user
     response = view(request)
     self.assertEqual(response.status_code, 200)
     self.assertEqual(response.context_data['object_list'].count(), 2)
     self.create_group()
     response = view(request)
     self.assertEqual(response.status_code, 200)
     self.assertEqual(response.context_data['object_list'].count(), 3)
コード例 #2
0
ファイル: groups.py プロジェクト: jonathancg90/appSpiral
 def test_list_groups(self):
     view = AdminGroupListView.as_view()
     request = self.request_factory.get(
         reverse('admin_group_list')
     )
     request.user = self.user
     response = view(request)
     self.assertEqual(response.status_code, 200)
     self.assertEqual(response.context_data['object_list'].count(), 2)
     self.create_group()
     response = view(request)
     self.assertEqual(response.status_code, 200)
     self.assertEqual(response.context_data['object_list'].count(), 3)
コード例 #3
0
    AdminUserDetailView, AdminUserGroupDeleteView, AdminUserPermissionDetailView, \
    AdminUserCreateView, AdminUserUpdateView, AdminUserChangeStatusRedirectView

from apps.sp.views.panel.admin.Support import AdminSupportListView
from apps.sp.views.panel.admin.Support import AdminSupportReportView
from apps.sp.views.panel.admin.Support import AdminSupportCompleteRedirectView

from apps.sp.views.panel.Dashboard import SettingsTemplateView

urlpatterns = patterns(
    '',
    url(r'^settings/$', SettingsTemplateView.as_view(), name='admin_settings'),

    #Group
    url(r'^group/list/$',
        AdminGroupListView.as_view(),
        name='admin_group_list'),
    url(r'^group/create/$',
        AdminGroupCreateView.as_view(),
        name='admin_group_create'),
    url(r'^group/edit/(?P<pk>\d+)/$',
        AdminGroupEditView.as_view(),
        name='admin_group_edit'),
    url(r'^group/delete/$',
        AdminGroupDeleteView.as_view(),
        name='admin_group_delete'),

    #User
    url(r'^user/list/$', AdminUserListView.as_view(), name='admin_user_list'),
    url(r'^user/list/create/$',
        AdminUserCreateView.as_view(),
コード例 #4
0
ファイル: admin.py プロジェクト: jonathancg90/appSpiral
    AdminUserCreateView, AdminUserUpdateView, AdminUserChangeStatusRedirectView

from apps.sp.views.panel.admin.Support import AdminSupportListView
from apps.sp.views.panel.admin.Support import AdminSupportReportView
from apps.sp.views.panel.admin.Support import AdminSupportCompleteRedirectView

from apps.sp.views.panel.Dashboard import SettingsTemplateView

urlpatterns = patterns('',
                       url(r'^settings/$',
                           SettingsTemplateView.as_view(),
                           name='admin_settings'),

                       #Group
                       url(r'^group/list/$',
                           AdminGroupListView.as_view(),
                           name='admin_group_list'),
                       
                       url(r'^group/create/$',
                           AdminGroupCreateView.as_view(),
                           name='admin_group_create'),

                       url(r'^group/edit/(?P<pk>\d+)/$',
                           AdminGroupEditView.as_view(),
                           name='admin_group_edit'),

                       url(r'^group/delete/$',
                           AdminGroupDeleteView.as_view(),
                           name='admin_group_delete'),

                       #User