debug config

This commit is contained in:
2025-02-25 15:38:21 +08:00
parent d5599814a5
commit bfb49f0a12
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ from flask_bcrypt import Bcrypt
from flask_login import LoginManager from flask_login import LoginManager
import os import os
import logging import logging
import config
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@@ -26,4 +27,4 @@ if not os.path.exists('site.db'):
if __name__ == '__main__': if __name__ == '__main__':
logger.info("Starting application...") logger.info("Starting application...")
app.run(debug=True) app.run(debug=config.DEBUG)
+2
View File
@@ -1,3 +1,5 @@
DEBUG = True
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif'} ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif'}
MAX_FILE_SIZE = 5 * 1024 * 1024 # 5 MB MAX_FILE_SIZE = 5 * 1024 * 1024 # 5 MB