urls.py 434 Bytes
Newer Older
1
from django.urls import re_path
Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
2

Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
3
4
5
6
7
8
9
from django.conf.urls import url, include
from rest_framework.routers import DefaultRouter

from metagenedb.api.catalog.views import GeneViewSet, gene_length


api_router = DefaultRouter()
10
api_router.register(r'genes', GeneViewSet, base_name='genes')
Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
11

12

Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
13
urlpatterns = [
Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
14
    re_path(r'^gene_length$', gene_length, name='gene_length'),
15
    url(r'v1/', include((api_router.urls, 'v1'), namespace='v1'))
Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
16
]