Add Activity log Service and model
This commit is contained in:
@@ -5,7 +5,14 @@ from flask import current_app
|
||||
# file extension
|
||||
ALLOWED_EXTENSIONS = {"xlsx", "xls", "csv"}
|
||||
|
||||
# .log file allowed
|
||||
ALLOWED_LOG_FILE = {
|
||||
"app.log",
|
||||
"debug.log",
|
||||
"error.log"
|
||||
}
|
||||
|
||||
# Get path of format excel folder
|
||||
def get_download_format_folder():
|
||||
return os.path.join(
|
||||
current_app.root_path,
|
||||
@@ -14,6 +21,7 @@ def get_download_format_folder():
|
||||
"format"
|
||||
)
|
||||
|
||||
# Get path of uploads folder
|
||||
def get_uploads_folder():
|
||||
return os.path.join(
|
||||
current_app.root_path,
|
||||
@@ -26,8 +34,7 @@ def ensure_upload_folder():
|
||||
os.makedirs(get_uploads_folder())
|
||||
|
||||
|
||||
# Get path of logs folder
|
||||
def get_logs_folder():
|
||||
return os.path.join(
|
||||
current_app.root_path,
|
||||
"logs"
|
||||
)
|
||||
project_root = os.path.dirname(current_app.root_path)
|
||||
return os.path.join(project_root, "logs")
|
||||
Reference in New Issue
Block a user