Commit 2e14881a authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

make views a module for organization and add pandas dependencies

parent 885592ef
Pipeline #12753 failed with stage
in 17 seconds
from django.urls import path, re_path from django.urls import re_path
from . import views from . import views
urlpatterns = [ urlpatterns = [
path('', views.index, name='index'),
re_path(r'^api/genes/$', views.gene_list, name='genes'), re_path(r'^api/genes/$', views.gene_list, name='genes'),
re_path(r'^api/genes/(?P<gene_id>.*)$', views.gene_detail), re_path(r'^api/genes/(?P<gene_id>.*)$', views.gene_detail),
] ]
from .genes import gene_detail, gene_list # noqa
\ No newline at end of file
...@@ -2,14 +2,9 @@ from rest_framework import status ...@@ -2,14 +2,9 @@ from rest_framework import status
from rest_framework.decorators import api_view from rest_framework.decorators import api_view
from rest_framework.response import Response from rest_framework.response import Response
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.http import HttpResponse
from .models import Gene from metagenedb.apps.catalog.models import Gene
from .serializers import GeneSerializer from metagenedb.apps.catalog.serializers import GeneSerializer
def index(request):
return HttpResponse(f"Welcome to the catalog page.")
@api_view(['GET']) @api_view(['GET'])
......
...@@ -5,8 +5,10 @@ django-extensions==2.1.7 ...@@ -5,8 +5,10 @@ django-extensions==2.1.7
django-filter==2.1.0 django-filter==2.1.0
djangorestframework==3.9.4 djangorestframework==3.9.4
djangorestframework-jwt==1.11.0 djangorestframework-jwt==1.11.0
numpy==1.16.4
pandas==0.24.2
psycopg2==2.8.2 psycopg2==2.8.2
PyJWT==1.7.1 PyJWT==1.7.1
pytz==2019.1 pytz==2019.1
six==1.12.0 six==1.12.0
sqlparse==0.3.0 sqlparse==0.3.0
\ No newline at end of file
atomicwrites==1.3.0 atomicwrites==1.3.0
attrs==19.1.0 attrs==19.1.0
coverage==4.5.3 coverage==4.5.3
cycler=0.10.0
Django==2.2.1 Django==2.2.1
django-cors-headers==3.0.2 django-cors-headers==3.0.2
django-environ==0.4.5 django-environ==0.4.5
...@@ -11,6 +12,7 @@ djangorestframework-jwt==1.11.0 ...@@ -11,6 +12,7 @@ djangorestframework-jwt==1.11.0
entrypoints==0.3 entrypoints==0.3
flake8==3.7.7 flake8==3.7.7
importlib-metadata==0.18 importlib-metadata==0.18
kiwisolver=1.1.0
mccabe==0.6.1 mccabe==0.6.1
more-itertools==7.0.0 more-itertools==7.0.0
packaging==19.0 packaging==19.0
...@@ -28,4 +30,4 @@ pytz==2019.1 ...@@ -28,4 +30,4 @@ pytz==2019.1
six==1.12.0 six==1.12.0
sqlparse==0.3.0 sqlparse==0.3.0
wcwidth==0.1.7 wcwidth==0.1.7
zipp==0.5.1 zipp==0.5.1
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment