forked from Flagsmith/flagsmith
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurls.py
38 lines (32 loc) · 1.06 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from django.conf import settings
from django.conf.urls import include
from django.urls import path
from rest_framework_nested import routers
from features.feature_segments.views import FeatureSegmentViewSet
from features.views import (
SimpleFeatureStateViewSet,
get_feature_by_uuid,
get_feature_state_by_uuid,
)
router = routers.DefaultRouter()
router.register(r"featurestates", SimpleFeatureStateViewSet, basename="featurestates")
router.register(r"feature-segments", FeatureSegmentViewSet, basename="feature-segment")
app_name = "features"
urlpatterns = [
path("", include(router.urls)),
path("get-by-uuid/<uuid:uuid>/", get_feature_by_uuid, name="get-feature-by-uuid"),
path(
"featurestates/get-by-uuid/<uuid:uuid>/",
get_feature_state_by_uuid,
name="get-feature-state-by-uuid",
),
]
if settings.WORKFLOWS_LOGIC_INSTALLED:
urlpatterns.append(
path(
"workflows/",
include(
f"{settings.WORKFLOWS_LOGIC_MODULE_PATH}.urls", namespace="workflows"
),
)
)