diff options
Diffstat (limited to 'wqflask/maintenance/gen_select_dataset.py')
-rw-r--r--[-rwxr-xr-x] | wqflask/maintenance/gen_select_dataset.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/wqflask/maintenance/gen_select_dataset.py b/wqflask/maintenance/gen_select_dataset.py index b1459bf3..d39bf4a5 100755..100644 --- a/wqflask/maintenance/gen_select_dataset.py +++ b/wqflask/maintenance/gen_select_dataset.py @@ -5,6 +5,7 @@ It needs to be run manually when database has been changed. """ + # Copyright (C) University of Tennessee Health Science Center, Memphis, TN. # # This program is free software: you can redistribute it and/or modify it @@ -36,11 +37,11 @@ from __future__ import print_function, division #print("cdict is:", cdict) import sys -import zach_settings # no hard code paths! +# import zach_settings # no hard code paths! -import MySQLdb +# import MySQLdb -import simplejson as json +# import simplejson as json import urlparse @@ -54,8 +55,8 @@ from pprint import pformat as pf #conn = Engine.connect() - - +print('ERROR: This conversion is now OBSOLETE as the menu gets built from the database in Javascript using GN_SERVER instead!') +sys.exit() def parse_db_uri(db_uri): @@ -257,7 +258,7 @@ def build_datasets(species, group, type_name): def main(): """Generates and outputs (as json file) the data for the main dropdown menus on the home page""" - parse_db_uri(zach_settings.DB_URI) + parse_db_uri(zach_settings.SQL_URI) species = get_species() groups = get_groups(species) @@ -296,6 +297,6 @@ def _test_it(): #print("build_datasets:", pf(datasets)) if __name__ == '__main__': - Conn = MySQLdb.Connect(**parse_db_uri(zach_settings.DB_URI)) + Conn = MySQLdb.Connect(**parse_db_uri(zach_settings.SQL_URI)) Cursor = Conn.cursor() main() |