aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/fatcat_web/__init__.py2
-rwxr-xr-xpython/fatcat_webface.py16
-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"