Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Statistical-Genetics
jass
Commits
515002a8
Commit
515002a8
authored
Jul 15, 2021
by
Hervé Ménager
Browse files
add CORS to facilitate development
parent
d1490469
Changes
2
Hide whitespace changes
Inline
Side-by-side
jass/server.py
View file @
515002a8
...
...
@@ -11,7 +11,7 @@ from jass.config import config
from
jass.models.phenotype
import
get_available_phenotypes
from
jass.models.project
import
Project
from
jass.tasks
import
create_project
from
flask_cors
import
CORS
class
PhenotypeSchema
(
ma
.
Schema
):
id
=
ma
.
fields
.
String
()
...
...
@@ -63,10 +63,14 @@ blp_phenotypes = Blueprint(
description
=
"Operations on phenotypes"
,
)
CORS
(
blp_phenotypes
)
blp_projects
=
Blueprint
(
"projects"
,
"projects"
,
url_prefix
=
"/projects"
,
description
=
"Operations on projects"
)
CORS
(
blp_projects
)
blp_local_projects
=
Blueprint
(
"local_projects"
,
"local_projects"
,
...
...
@@ -74,6 +78,8 @@ blp_local_projects = Blueprint(
description
=
"Operations on local projects"
,
)
CORS
(
blp_local_projects
)
def
get_phenotypes
():
return
get_available_phenotypes
(
os
.
path
.
join
(
config
[
"DATA_DIR"
],
"initTable.hdf5"
))
...
...
requirements.txt
View file @
515002a8
...
...
@@ -9,3 +9,4 @@ tables
scipy
matplotlib
celery
flask-cors
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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