diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-11-12 23:21:19 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-11-12 23:21:19 -0800 |
commit | 807e554aafa598044099d6f1c695cda8b9501ba4 (patch) | |
tree | 061c8edd432c65c5e3f91ef9a5426b4d9499dbc4 | |
parent | b03bfc8f3fd84141738f775b273a99850d78e1ff (diff) | |
download | fatcat-807e554aafa598044099d6f1c695cda8b9501ba4.tar.gz fatcat-807e554aafa598044099d6f1c695cda8b9501ba4.zip |
remove sqlite cruft
-rw-r--r-- | python/fatcat_web/__init__.py | 2 | ||||
-rwxr-xr-x | python/fatcat_webface.py | 16 | ||||
-rw-r--r-- | python/web_config.py (renamed from python/webface_config.py) | 3 |
3 files changed, 2 insertions, 19 deletions
diff --git a/python/fatcat_web/__init__.py b/python/fatcat_web/__init__.py index aa12f972..0033f4a3 100644 --- a/python/fatcat_web/__init__.py +++ b/python/fatcat_web/__init__.py @@ -2,7 +2,7 @@ from flask import Flask from flask_uuid import FlaskUUID from flask_debugtoolbar import DebugToolbarExtension -from config import Config +from webface_config import Config import fatcat_client toolbar = DebugToolbarExtension() diff --git a/python/fatcat_webface.py b/python/fatcat_webface.py index cfddad48..76cebfe9 100755 --- a/python/fatcat_webface.py +++ b/python/fatcat_webface.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import argparse -from fatcat import app +from fatcat_webface import app def main(): parser = argparse.ArgumentParser() @@ -15,22 +15,8 @@ def main(): type=int, default=9810, help="listen on this port") - parser.add_argument('--database-uri', - default=app.config['SQLALCHEMY_DATABASE_URI'], - help="sqlalchemy database string") - parser.add_argument('--init-db', - action='store_true', - help="create database tables and insert dummy data") args = parser.parse_args() - app.config['SQLALCHEMY_DATABASE_URI'] = args.database_uri - - if args.init_db: - db.create_all() - fatcat.sql.populate_db() - print("Dummy database configured: " + app.config['SQLALCHEMY_DATABASE_URI']) - return - app.run(debug=args.debug, host=args.host, port=args.port) if __name__ == '__main__': diff --git a/python/webface_config.py b/python/web_config.py index 3d6db049..c213e59f 100644 --- a/python/webface_config.py +++ b/python/web_config.py @@ -5,9 +5,6 @@ import subprocess basedir = os.path.abspath(os.path.dirname(__file__)) class Config(object): - SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URI') or \ - 'sqlite:///' + os.path.join(basedir, 'fatcat_dev.sqlite') - SQLALCHEMY_TRACK_MODIFICATIONS = False GIT_REVISION = subprocess.check_output(["git", "describe", "--always"]).strip() # This is, effectively, the QA/PROD flag FATCAT_DOMAIN = "qa.fatcat.wiki" |