diff options
| author | Bryan Newbold <bnewbold@robocracy.org> | 2018-04-24 16:11:43 -0700 | 
|---|---|---|
| committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-04-24 16:11:49 -0700 | 
| commit | ecfc0bae97919a88b22145415cb54e3cc170eec2 (patch) | |
| tree | 66278ae2becf2051a0873b88ca427c460bed123f | |
| parent | 90303b0d15d51ec51b501db8ba61c11dd78ff522 (diff) | |
| download | fatcat-ecfc0bae97919a88b22145415cb54e3cc170eec2.tar.gz fatcat-ecfc0bae97919a88b22145415cb54e3cc170eec2.zip  | |
wire up debug toolbar (cool!)
| -rw-r--r-- | config.py | 5 | ||||
| -rw-r--r-- | fatcat/__init__.py | 3 | ||||
| -rwxr-xr-x | run.py | 2 | 
3 files changed, 9 insertions, 1 deletions
@@ -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 @@ -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")  | 
