aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-04-24 16:11:43 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-04-24 16:11:49 -0700
commitecfc0bae97919a88b22145415cb54e3cc170eec2 (patch)
tree66278ae2becf2051a0873b88ca427c460bed123f
parent90303b0d15d51ec51b501db8ba61c11dd78ff522 (diff)
downloadfatcat-ecfc0bae97919a88b22145415cb54e3cc170eec2.tar.gz
fatcat-ecfc0bae97919a88b22145415cb54e3cc170eec2.zip
wire up debug toolbar (cool!)
-rw-r--r--config.py5
-rw-r--r--fatcat/__init__.py3
-rwxr-xr-xrun.py2
3 files changed, 9 insertions, 1 deletions
diff --git a/config.py b/config.py
index bad871dc..a7ec4b50 100644
--- a/config.py
+++ b/config.py
@@ -6,3 +6,8 @@ class Config(object):
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URI') or \
'sqlite:///' + os.path.join(basedir, 'fatcat_dev.sqlite')
SQLALCHEMY_TRACK_MODIFICATIONS = False
+
+ # "Event more verbose" debug options. SECRET_KEY is bogus.
+ #SQLALCHEMY_ECHO = True
+ #SECRET_KEY = "kuhy0284hflskjhg01284"
+ #DEBUG = True
diff --git a/fatcat/__init__.py b/fatcat/__init__.py
index 74e25f1e..a824d220 100644
--- a/fatcat/__init__.py
+++ b/fatcat/__init__.py
@@ -2,11 +2,14 @@
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import Marshmallow
+from flask_debugtoolbar import DebugToolbarExtension
from config import Config
+toolbar = DebugToolbarExtension()
app = Flask(__name__)
app.config.from_object(Config)
db = SQLAlchemy(app)
ma = Marshmallow(app)
+toolbar = DebugToolbarExtension(app)
from fatcat import routes, models, api, sql, dummy
diff --git a/run.py b/run.py
index 512d5828..0fbd6194 100755
--- a/run.py
+++ b/run.py
@@ -8,7 +8,7 @@ def main():
parser = argparse.ArgumentParser()
parser.add_argument('--debug',
action='store_true',
- help="enable debugging interface")
+ help="enable debugging interface (note: not for everything)")
parser.add_argument('--host',
default="127.0.0.1",
help="listen on this host/IP")