We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9540ec3 commit a43b565Copy full SHA for a43b565
setup.py
@@ -16,5 +16,5 @@
16
package_dir={"": "src"},
17
packages=["cs50"],
18
url="https://github.com/cs50/python-cs50",
19
- version="9.1.0"
+ version="9.2.0"
20
)
src/cs50/sql.py
@@ -9,6 +9,7 @@ def _enable_logging(f):
9
10
import logging
11
import functools
12
+ import os
13
14
@functools.wraps(f)
15
def decorator(*args, **kwargs):
@@ -19,9 +20,9 @@ def decorator(*args, **kwargs):
except ModuleNotFoundError:
21
return f(*args, **kwargs)
22
- # Enable logging
23
+ # Enable logging in development mode
24
disabled = logging.getLogger("cs50").disabled
- if flask.current_app:
25
+ if flask.current_app and os.getenv("FLASK_ENV") == "development":
26
logging.getLogger("cs50").disabled = False
27
try:
28
0 commit comments