diff options
author | Frederick Muriuki Muriithi | 2024-11-22 12:16:28 -0600 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-11-22 12:16:28 -0600 |
commit | 8a84c4d6762446e5fdf9f9121f539c89419ae6a0 (patch) | |
tree | 0c4d175767bdfb24d83a7f0c15e0ab677e00ebba /uploader/expression_data | |
parent | 82fb92db448f1985b821193bcfdee72d512e27bb (diff) | |
download | gn-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.py | 3 | ||||
-rw-r--r-- | uploader/expression_data/views.py | 3 |
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) |