aboutsummaryrefslogtreecommitdiff
path: root/uploader/expression_data
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-11-22 12:16:28 -0600
committerFrederick Muriuki Muriithi2024-11-22 12:16:28 -0600
commit8a84c4d6762446e5fdf9f9121f539c89419ae6a0 (patch)
tree0c4d175767bdfb24d83a7f0c15e0ab677e00ebba /uploader/expression_data
parent82fb92db448f1985b821193bcfdee72d512e27bb (diff)
downloadgn-uploader-8a84c4d6762446e5fdf9f9121f539c89419ae6a0.tar.gz
Use gn-libs code for db connection.
Use the code in gn-libs to connect to the database, rather than a local module.
Diffstat (limited to 'uploader/expression_data')
-rw-r--r--uploader/expression_data/dbinsert.py3
-rw-r--r--uploader/expression_data/views.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/uploader/expression_data/dbinsert.py b/uploader/expression_data/dbinsert.py
index 32ca359..6d8ce80 100644
--- a/uploader/expression_data/dbinsert.py
+++ b/uploader/expression_data/dbinsert.py
@@ -7,16 +7,17 @@ from datetime import datetime
from redis import Redis
from MySQLdb.cursors import DictCursor
+from gn_libs.mysqldb import database_connection
from flask import (
flash, request, url_for, Blueprint, redirect, render_template,
current_app as app)
from uploader import jobs
from uploader.authorisation import require_login
+from uploader.db_utils import with_db_connection
from uploader.population.models import populations_by_species
from uploader.species.models import all_species, species_by_id
from uploader.platforms.models import platform_by_species_and_id
-from uploader.db_utils import with_db_connection, database_connection
dbinsertbp = Blueprint("dbinsert", __name__)
diff --git a/uploader/expression_data/views.py b/uploader/expression_data/views.py
index bbe6538..7629f3e 100644
--- a/uploader/expression_data/views.py
+++ b/uploader/expression_data/views.py
@@ -8,6 +8,7 @@ from zipfile import ZipFile, is_zipfile
import jsonpickle
from redis import Redis
from werkzeug.utils import secure_filename
+from gn_libs.mysqldb import database_connection
from flask import (flash,
request,
url_for,
@@ -21,8 +22,8 @@ from uploader import jobs
from uploader.datautils import order_by_family
from uploader.ui import make_template_renderer
from uploader.authorisation import require_login
+from uploader.db_utils import with_db_connection
from uploader.species.models import all_species, species_by_id
-from uploader.db_utils import with_db_connection, database_connection
from uploader.population.models import (populations_by_species,
population_by_species_and_id)