Files
butler_ddochi/butler_ddochi/version/context_processors.py
icurfer 0e59c11818
All checks were successful
Build And Test / build-and-push (push) Successful in 4m14s
버전 정보 표기 기능추가, 카테고리, 링크 등 수정
2024-12-15 23:58:47 +09:00

13 lines
346 B
Python

import os
def version_processor(request):
version_file_path = os.path.join(os.path.dirname(__file__), "../../version")
try:
with open(version_file_path, "r", encoding="utf-8") as file:
version = file.read().strip()
except FileNotFoundError:
version = "Version not found"
return {"version": version}