diff options
author | Zachary Sloan | 2013-04-30 22:52:27 +0000 |
---|---|---|
committer | Zachary Sloan | 2013-04-30 22:52:27 +0000 |
commit | bfb2195d4aa6af0814a50998b57c89c3d497b4db (patch) | |
tree | 37825c982a84ea28333c41f32bd1265519d145a9 /wqflask | |
parent | d4138b76eae3aa54ba18d44d753cb440aac7a0f8 (diff) | |
parent | 34312cfacdcb5af450d33ac3b54d7c01a6a61788 (diff) | |
download | genenetwork2-bfb2195d4aa6af0814a50998b57c89c3d497b4db.tar.gz |
Merge branch 'flask' of git://github.com/leiyan/genenetwork into flask
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/cfg/default_settings.py | 2 | ||||
-rw-r--r-- | wqflask/secure_server.py | 5 | ||||
-rwxr-xr-x | wqflask/wqflask/dataSharing/SharingInfo.py | 12 |
3 files changed, 12 insertions, 7 deletions
diff --git a/wqflask/cfg/default_settings.py b/wqflask/cfg/default_settings.py index a575a3bd..d0713e4d 100644 --- a/wqflask/cfg/default_settings.py +++ b/wqflask/cfg/default_settings.py @@ -1,5 +1,7 @@ LOGFILE = """/tmp/flask_gn_log""" +SERVER_PORT = 5000 + #This is needed because Flask turns key errors into a #400 bad request response with no exception/log TRAP_BAD_REQUEST_ERRORS = True diff --git a/wqflask/secure_server.py b/wqflask/secure_server.py index 425fce89..5448dbeb 100644 --- a/wqflask/secure_server.py +++ b/wqflask/secure_server.py @@ -49,16 +49,19 @@ security = Security(app, user_datastore) import logging -file_handler = logging.FileHandler("/tmp/flask_gn_log") +file_handler = logging.FileHandler(app.config['LOGFILE']) file_handler.setLevel(logging.DEBUG) app.logger.addHandler(file_handler) import logging_tree logging_tree.printout() +#print("app.config is:", app.config) + if __name__ == '__main__': #create_user() app.run(host='0.0.0.0', + port=app.config['SERVER_PORT'], use_debugger=False, threaded=True, use_reloader=True) diff --git a/wqflask/wqflask/dataSharing/SharingInfo.py b/wqflask/wqflask/dataSharing/SharingInfo.py index befc158a..41a75222 100755 --- a/wqflask/wqflask/dataSharing/SharingInfo.py +++ b/wqflask/wqflask/dataSharing/SharingInfo.py @@ -34,12 +34,12 @@ import requests from dbFunction import webqtlDatabaseFunction import SharingBody -import logging -logging.basicConfig(filename="/tmp/flask_gn_log", level=logging.INFO) - -_log = logging.getLogger("search") -_ch = logging.StreamHandler() -_log.addHandler(_ch) +#import logging +#logging.basicConfig(filename="/tmp/flask_gn_log", level=logging.INFO) +# +#_log = logging.getLogger("search") +#_ch = logging.StreamHandler() +#_log.addHandler(_ch) |