示例#1
0
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add an import:  from blog import urls as blog_urls
    2. Import the include() function: from django.conf.urls import url, include
    3. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include
from django.conf.urls import url

from baselaunch import views

from djcloudbridge.drf_routers import HybridDefaultRouter, HybridNestedRouter, HybridSimpleRouter

# from django.contrib import admin
# from rest_framework import viewsets
router = HybridDefaultRouter()
router.register(r'infrastructure',
                views.InfrastructureView,
                base_name='infrastructure')
router.register(r'applications', views.ApplicationViewSet)
# router.register(r'images', views.ImageViewSet)
router.register(r'deployments',
                views.DeploymentViewSet,
                base_name='deployments')
router.register(r'auth', views.AuthView, base_name='auth')
router.register(r'cors_proxy', views.CorsProxyView, base_name='corsproxy')

deployments_router = HybridNestedRouter(router,
                                        r'deployments',
                                        lookup='deployment')
deployments_router.register(r'tasks',
示例#2
0
文件: urls.py 项目: MungLAW/cloudman
"""CloudMan Create URL configuration."""

from django.conf.urls import include
from django.conf.urls import url

from . import views
from helmsman import views as helmsman_views
from djcloudbridge.drf_routers import HybridDefaultRouter
from djcloudbridge.drf_routers import HybridNestedRouter

router = HybridDefaultRouter()
router.register(r'projects', views.ProjectViewSet, base_name='projects')

project_router = HybridNestedRouter(router, r'projects', lookup='project')
project_router.register(r'charts',
                        views.ProjectChartViewSet,
                        base_name='chart')

app_name = "projman"

cluster_regex_pattern = r'^'
urlpatterns = [
    url(r'^', include(router.urls)),
    url(cluster_regex_pattern, include(project_router.urls))
]
示例#3
0
"""CloudMan Create URL configuration."""

from django.conf.urls import include
from django.conf.urls import url

from . import views
from djcloudbridge.drf_routers import HybridDefaultRouter


router = HybridDefaultRouter()
router.register(r'repositories', views.ChartRepoViewSet,
                basename='repositories')
router.register(r'charts', views.ChartViewSet,
                basename='charts')
router.register(r'namespaces', views.NamespaceViewSet,
                basename='namespaces')
router.register(r'install_templates', views.InstallTemplatesViewSet,
                basename='install_templates')

app_name = "helmsman"

urlpatterns = [
    url(r'^', include(router.urls)),
]
示例#4
0
文件: urls.py 项目: telukir/cloudman
"""CloudMan Create URL configuration."""

from django.conf.urls import include
from django.conf.urls import url

from . import views
from djcloudbridge.drf_routers import HybridDefaultRouter


router = HybridDefaultRouter()
router.register(r'repositories', views.ChartRepoViewSet,
                base_name='repositories')
router.register(r'charts', views.ChartViewSet,
                base_name='charts')
router.register(r'namespaces', views.NamespaceViewSet,
                base_name='namespaces')

app_name = "helmsman"

urlpatterns = [
    url(r'^', include(router.urls)),
]
示例#5
0
"""CloudMan Create URL configuration."""

from django.conf.urls import include
from django.conf.urls import url

from . import views
from djcloudbridge.drf_routers import HybridDefaultRouter
from djcloudbridge.drf_routers import HybridNestedRouter

router = HybridDefaultRouter()
router.register(r'clusters', views.ClusterViewSet, base_name='clusters')

cluster_router = HybridNestedRouter(router, r'clusters', lookup='cluster')
cluster_router.register(r'nodes', views.ClusterNodeViewSet, base_name='node')

app_name = "clusterman"

cluster_regex_pattern = r'^'
urlpatterns = [
    url(r'^', include(router.urls)),
    url(cluster_regex_pattern, include(cluster_router.urls))
]