Add Activity log Service and model

This commit is contained in:
2026-08-01 15:41:26 +05:30
parent 2d7d146ec3
commit e98e1422a0
6 changed files with 350 additions and 43 deletions

View File

@@ -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")