Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Metagenomics
metagenedb
Commits
2e14881a
Commit
2e14881a
authored
Jun 24, 2019
by
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
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
backend/metagenedb/apps/catalog/urls.py
View file @
2e14881a
from
django.urls
import
path
,
re_path
from
django.urls
import
re_path
from
.
import
views
urlpatterns
=
[
path
(
''
,
views
.
index
,
name
=
'index'
),
re_path
(
r
'^api/genes/$'
,
views
.
gene_list
,
name
=
'genes'
),
re_path
(
r
'^api/genes/(?P<gene_id>.*)$'
,
views
.
gene_detail
),
]
backend/metagenedb/apps/catalog/views/__init__.py
0 → 100644
View file @
2e14881a
from
.genes
import
gene_detail
,
gene_list
# noqa
\ No newline at end of file
backend/metagenedb/apps/catalog/views.py
→
backend/metagenedb/apps/catalog/views
/genes
.py
View file @
2e14881a
...
...
@@ -2,14 +2,9 @@ from rest_framework import status
from
rest_framework.decorators
import
api_view
from
rest_framework.response
import
Response
from
django.core.paginator
import
Paginator
,
EmptyPage
,
PageNotAnInteger
from
django.http
import
HttpResponse
from
.models
import
Gene
from
.serializers
import
GeneSerializer
def
index
(
request
):
return
HttpResponse
(
f
"Welcome to the catalog page."
)
from
metagenedb.apps.catalog.models
import
Gene
from
metagenedb.apps.catalog.serializers
import
GeneSerializer
@
api_view
([
'GET'
])
...
...
backend/requirements.txt
View file @
2e14881a
...
...
@@ -5,8 +5,10 @@ django-extensions==2.1.7
django-filter==2.1.0
djangorestframework==3.9.4
djangorestframework-jwt==1.11.0
numpy==1.16.4
pandas==0.24.2
psycopg2==2.8.2
PyJWT==1.7.1
pytz==2019.1
six==1.12.0
sqlparse==0.3.0
sqlparse==0.3.0
\ No newline at end of file
backend/requirements_dev.txt
View file @
2e14881a
atomicwrites==1.3.0
attrs==19.1.0
coverage==4.5.3
cycler=0.10.0
Django==2.2.1
django-cors-headers==3.0.2
django-environ==0.4.5
...
...
@@ -11,6 +12,7 @@ djangorestframework-jwt==1.11.0
entrypoints==0.3
flake8==3.7.7
importlib-metadata==0.18
kiwisolver=1.1.0
mccabe==0.6.1
more-itertools==7.0.0
packaging==19.0
...
...
@@ -28,4 +30,4 @@ pytz==2019.1
six==1.12.0
sqlparse==0.3.0
wcwidth==0.1.7
zipp==0.5.1
zipp==0.5.1
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment