-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8dad79b
commit f8d0806
Showing
1 changed file
with
19 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,38 @@ | ||
from django.urls import include, path | ||
|
||
from rest_framework import routers | ||
|
||
from resolwe.api_urls import api_router as resolwe_router | ||
from resolwe.flow.views import EntityViewSet | ||
|
||
from resolwe_bio.filters import BioEntityFilter | ||
from resolwe_bio.kb.views import ( | ||
FeatureViewSet, MappingSearchViewSet | ||
) | ||
from resolwe_bio.kb.views import FeatureViewSet, MappingSearchViewSet | ||
from resolwe_bio.variants.views import VariantAnnotationViewSet, VariantViewSet | ||
|
||
from .routers import SearchRouter | ||
|
||
|
||
EntityViewSet.filterset_class = BioEntityFilter | ||
|
||
api_router = routers.DefaultRouter(trailing_slash=False) | ||
api_router.register(r'sample', EntityViewSet) | ||
api_router.register(r"sample", EntityViewSet) | ||
api_router.register(r"variant", VariantViewSet) | ||
api_router.register(r"variant_annotations", VariantAnnotationViewSet) | ||
|
||
search_router = SearchRouter(trailing_slash=False) | ||
search_router.register(r'kb/feature', FeatureViewSet, 'kb_feature') | ||
search_router.register(r'kb/mapping/search', MappingSearchViewSet, 'kb_mapping_search') | ||
search_router.register(r"kb/feature", FeatureViewSet, "kb_feature") | ||
search_router.register(r"kb/mapping/search", MappingSearchViewSet, "kb_mapping_search") | ||
|
||
urlpatterns = [ | ||
path('api-auth/', include('rest_framework.urls', namespace='rest_framework')), | ||
path("api-auth/", include("rest_framework.urls", namespace="rest_framework")), | ||
# XXX: Temporary fix to work with Resolwe 2.0.0, which requires 'resolwe-api' namespace to be available when | ||
# reporting errors when running processes. | ||
path('api-resolwe/', include((resolwe_router.urls, 'resolwe-api'))), | ||
path('api/', include((api_router.urls + search_router.urls + resolwe_router.urls, 'resolwebio-api'))), | ||
path("api-resolwe/", include((resolwe_router.urls, "resolwe-api"))), | ||
path( | ||
"api/", | ||
include( | ||
( | ||
api_router.urls + search_router.urls + resolwe_router.urls, | ||
"resolwebio-api", | ||
) | ||
), | ||
), | ||
] |