from django.conf.urls import include, url from normandy.base import views from normandy.base.api import views as api_views from normandy.base.api.routers import MixedViewRouter # API Router router = MixedViewRouter() router.register("user", api_views.UserViewSet) router.register("group", api_views.GroupViewSet) urlpatterns = [ url(r"^$", views.index, name="index"), url(r"^favicon.ico", views.favicon), url(r"^api/v2/service_info/", api_views.ServiceInfoView.as_view(), name="service-info-v2"), url(r"^api/v3/service_info/", api_views.ServiceInfoView.as_view(), name="service-info"), url(r"^api/v3/", include(router.urls)), ]
from django.conf.urls import url, include from normandy.base.api.routers import MixedViewRouter from normandy.studies.api.v3 import views # API Router router = MixedViewRouter() router.register("extension", views.ExtensionViewSet) app_name = "studies" urlpatterns = [url(r"", include(router.urls))]
from django.conf.urls import url, include from normandy.base.api.routers import MixedViewRouter from normandy.recipes.api.v3 import views app_name = "recipes" # API Router router = MixedViewRouter() router.register("action", views.ActionViewSet) router.register("recipe", views.RecipeViewSet) router.register("recipe_revision", views.RecipeRevisionViewSet) router.register("approval_request", views.ApprovalRequestViewSet) router.register_view("filters", views.Filters, name="filters") urlpatterns = [ url(r"", include(router.urls)), url( r"^identicon/(?P<generation>v[0-9]):(?P<seed>.{1,64})\.svg", views.IdenticonView.as_view(), name="identicon", ), ]
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from rest_framework_swagger.views import get_swagger_view from normandy.base.api import views as base_api_views from normandy.base.api.routers import MixedViewRouter from normandy.recipes.api.v1 import views as recipes_api_v1_views from normandy.studies.api.v1 import views as studies_api_v1_views # API Router v1_router = MixedViewRouter() v1_router.register("action", recipes_api_v1_views.ActionViewSet) v1_router.register("recipe", recipes_api_v1_views.RecipeViewSet) v1_router.register("recipe_revision", recipes_api_v1_views.RecipeRevisionViewSet) v1_router.register(r"approval_request", recipes_api_v1_views.ApprovalRequestViewSet) v1_router.register_view("classify_client", recipes_api_v1_views.ClassifyClient, name="classify-client", allow_cdn=False) v1_router.register("extension", studies_api_v1_views.ExtensionViewSet) urlpatterns = [] if settings.ADMIN_ENABLED: urlpatterns += [url(r"^admin/", admin.site.urls)]
from django.conf.urls import url, include from normandy.base.api.routers import MixedViewRouter from normandy.recipes.api.v2 import views as api_v2_views from normandy.recipes.api.v3 import views as api_v3_views # API Router v2_router = MixedViewRouter() v2_router.register("action", api_v2_views.ActionViewSet) v2_router.register("recipe", api_v2_views.RecipeViewSet) v2_router.register("recipe_revision", api_v2_views.RecipeRevisionViewSet) v2_router.register(r"approval_request", api_v2_views.ApprovalRequestViewSet) v3_router = MixedViewRouter() v3_router.register("action", api_v3_views.ActionViewSet) v3_router.register("recipe", api_v3_views.RecipeViewSet) v3_router.register("recipe_revision", api_v3_views.RecipeRevisionViewSet) v3_router.register(r"approval_request", api_v3_views.ApprovalRequestViewSet) v3_router.register_view("filters", api_v3_views.Filters, name="filters") app_name = "recipes" urlpatterns = [ url(r"^api/v2/", include((v2_router.urls, "recipes"), namespace="v2")), url( r"^api/v2/identicon/(?P<generation>v[0-9]):(?P<seed>.{1,64})\.svg", api_v2_views.IdenticonView.as_view(), name="identicon-v2", ), url( r"^api/v3/identicon/(?P<generation>v[0-9]):(?P<seed>.{1,64})\.svg",
from django.conf.urls import url, include from normandy.base.api.routers import MixedViewRouter from normandy.recipes.api.views import ( ActionImplementationView, ActionViewSet, ClassifyClient, Filters, RecipeViewSet, RecipeRevisionViewSet, ) # API Router router = MixedViewRouter() router.register('action', ActionViewSet) router.register('recipe', RecipeViewSet) router.register('recipe_revision', RecipeRevisionViewSet) router.register_view('classify_client', ClassifyClient, name='classify-client', allow_cdn=False) router.register_view('filters', Filters, name='filters') app_name = 'recipes' urlpatterns = [ url(r'^api/v1/', include(router.urls)), url(r'^api/v1/action/(?P<name>[_\-\w]+)/implementation/(?P<impl_hash>[0-9a-f]{40})/$', ActionImplementationView.as_view(), name='action-implementation'),
from django.conf.urls import include, url from normandy.base.api.routers import MixedViewRouter from normandy.base.api.v3 import views from normandy.base.api.views import APIRootView # API Router router = MixedViewRouter() router.register("user", views.UserViewSet) router.register("group", views.GroupViewSet) app_name = "base" urlpatterns = [ url(r"^$", APIRootView.as_view()), url(r"^service_info/", views.ServiceInfoView.as_view(), name="service-info"), url(r"", include(router.urls)), ]
from django.conf.urls import url, include from normandy.base.api.routers import MixedViewRouter from normandy.recipes.api.views import ( ActionImplementationView, ActionViewSet, ApprovalRequestViewSet, ClassifyClient, Filters, RecipeViewSet, RecipeRevisionViewSet, ) # API Router router = MixedViewRouter() router.register('action', ActionViewSet) router.register('recipe', RecipeViewSet) router.register('recipe_revision', RecipeRevisionViewSet) router.register(r'approval_request', ApprovalRequestViewSet) router.register_view('classify_client', ClassifyClient, name='classify-client', allow_cdn=False) router.register_view('filters', Filters, name='filters') app_name = 'recipes' urlpatterns = [ url(r'^api/v1/', include(router.urls)), url(r'^api/v1/action/(?P<name>[_\-\w]+)/implementation/(?P<impl_hash>[0-9a-f]{40})/$',
from django.conf.urls import url, include from normandy.base.api.routers import MixedViewRouter from normandy.recipes.api.v1 import views as api_v1_views from normandy.recipes.api.v2 import views as api_v2_views # API Router v1_router = MixedViewRouter() v1_router.register('action', api_v1_views.ActionViewSet) v1_router.register('recipe', api_v1_views.RecipeViewSet) v1_router.register('recipe_revision', api_v1_views.RecipeRevisionViewSet) v1_router.register(r'approval_request', api_v1_views.ApprovalRequestViewSet) v1_router.register_view('classify_client', api_v1_views.ClassifyClient, name='classify-client', allow_cdn=False) v1_router.register_view('filters', api_v1_views.Filters, name='filters') v2_router = MixedViewRouter() v2_router.register('action', api_v2_views.ActionViewSet) v2_router.register('recipe', api_v2_views.RecipeViewSet) v2_router.register('recipe_revision', api_v2_views.RecipeRevisionViewSet) v2_router.register(r'approval_request', api_v2_views.ApprovalRequestViewSet) app_name = 'recipes' urlpatterns = [ url(r'^api/v2/', include(v2_router.urls)), url(r'^api/v1/', include(v1_router.urls)), url(r'^api/v1/action/(?P<name>[_\-\w]+)/implementation/(?P<impl_hash>[a-zA-Z0-9_-]*)/$',
from django.conf.urls import url, include from normandy.base.api.routers import MixedViewRouter from normandy.studies.api.v2 import views as v2_views from normandy.studies.api.v3 import views as v3_views # API Router v2_router = MixedViewRouter() v2_router.register("extension", v2_views.ExtensionViewSet) v3_router = MixedViewRouter() v3_router.register("extension", v3_views.ExtensionViewSet) app_name = "studies" urlpatterns = [ url(r"^api/v2/", include((v2_router.urls, "studies"), namespace="v2")), url(r"^api/v3/", include((v3_router.urls, "studies"), namespace="v3")), ]