2013-03-14 01:15:00 +04:00
from django . conf import settings
from django . conf . urls import *
2013-03-20 06:26:35 +04:00
import lib . main . views as views
2013-02-28 18:10:20 +04:00
2013-03-21 23:11:47 +04:00
# organizations service
views_OrganizationsList = views . OrganizationsList . as_view ( )
views_OrganizationsDetail = views . OrganizationsDetail . as_view ( )
views_OrganizationsAuditTrailList = views . OrganizationsAuditTrailList . as_view ( )
views_OrganizationsUsersList = views . OrganizationsUsersList . as_view ( )
views_OrganizationsAdminsList = views . OrganizationsAdminsList . as_view ( )
views_OrganizationsProjectsList = views . OrganizationsProjectsList . as_view ( )
views_OrganizationsTagsList = views . OrganizationsTagsList . as_view ( )
2013-03-22 01:38:53 +04:00
# FIXME: add entries for all of these:
# projects service
views_ProjectsDetail = views . OrganizationsDetail . as_view ( )
# audit trail service
# team service
# inventory service
# group service
# host service
# inventory variable service
# log data services
# events services
# jobs services
# tags service
2013-03-21 08:12:03 +04:00
2013-02-28 18:10:20 +04:00
urlpatterns = patterns ( ' ' ,
2013-03-21 23:11:47 +04:00
# organizations service
url ( r ' ^api/v1/organizations/$ ' , views_OrganizationsList ) ,
url ( r ' ^api/v1/organizations/(?P<pk>[0-9]+)/$ ' , views_OrganizationsDetail ) ,
url ( r ' ^api/v1/organizations/(?P<pk>[0-9]+)/audit_trail/$ ' , views_OrganizationsAuditTrailList ) ,
url ( r ' ^api/v1/organizations/(?P<pk>[0-9]+)/users/$ ' , views_OrganizationsUsersList ) ,
url ( r ' ^api/v1/organizations/(?P<pk>[0-9]+)/admins/$ ' , views_OrganizationsAdminsList ) ,
url ( r ' ^api/v1/organizations/(?P<pk>[0-9]+)/projects/$ ' , views_OrganizationsProjectsList ) ,
url ( r ' ^api/v1/organizations/(?P<pk>[0-9]+)/tags/$ ' , views_OrganizationsTagsList ) ,
# FIXME: implement:
# users service
2013-03-22 01:38:53 +04:00
2013-03-21 23:11:47 +04:00
# projects service
2013-03-22 01:38:53 +04:00
url ( r ' ^api/v1/projects/(?P<pk>[0-9]+)/$ ' , views_ProjectsDetail ) ,
2013-03-21 23:11:47 +04:00
# audit trail service
2013-03-22 01:38:53 +04:00
2013-03-21 23:11:47 +04:00
# team service
2013-03-22 01:38:53 +04:00
2013-03-21 23:11:47 +04:00
# inventory service
2013-03-22 01:38:53 +04:00
2013-03-21 23:11:47 +04:00
# group service
2013-03-22 01:38:53 +04:00
2013-03-21 23:11:47 +04:00
# host service
2013-03-22 01:38:53 +04:00
2013-03-21 23:11:47 +04:00
# inventory variable service
2013-03-22 01:38:53 +04:00
2013-03-21 23:11:47 +04:00
# log data services
2013-03-22 01:38:53 +04:00
2013-03-21 23:11:47 +04:00
# events services
2013-03-22 01:38:53 +04:00
2013-03-21 23:11:47 +04:00
# jobs services
2013-03-22 01:38:53 +04:00
2013-03-21 23:11:47 +04:00
# tags service
2013-02-28 18:10:20 +04:00
)
2013-03-14 01:15:00 +04:00
if ' django.contrib.admin ' in settings . INSTALLED_APPS :
from django . contrib import admin
admin . autodiscover ( )
urlpatterns + = patterns ( ' ' ,
url ( r ' ^admin/ ' , include ( admin . site . urls ) ) ,
)