Skip to content

Commit 6cd20b3

Browse files
committed
fixes to readme; make QUERYINSPECT_ENABLED default to True
1 parent f55f1e5 commit 6cd20b3

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ pip install Flask-QueryInspect
1919

2020
```python
2121
app = Flask(__name__)
22-
db = SQLAlchemy(cls.app)
23-
app.config['QUERYINSPECT_ENABLED'] = True
24-
qi = QueryInspect(cls.app)
22+
qi = QueryInspect(app)
2523
```
2624

2725
## Configuration ##

flask_queryinspect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self, app=None):
2323
self.init_app(app)
2424

2525
def init_app(self, app):
26-
app.config.setdefault('QUERYINSPECT_ENABLED', False)
26+
app.config.setdefault('QUERYINSPECT_ENABLED', True)
2727
app.config.setdefault('QUERYINSPECT_HEADERS', True)
2828
app.config.setdefault('QUERYINSPECT_HEADERS_COMBINED', True)
2929
app.config.setdefault('QUERYINSPECT_LOG', True)

test_queryinspect.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ def setUpClass(cls):
2222
#cls.app.config['SQLALCHEMY_ECHO'] = True
2323
db = SQLAlchemy(cls.app)
2424
cls.db = db
25-
26-
cls.app.config['QUERYINSPECT_ENABLED'] = True
2725
cls.qi = QueryInspect(cls.app)
2826

2927
class TestModel(db.Model):

0 commit comments

Comments
 (0)