버전 정보 표기 기능추가, 카테고리, 링크 등 수정
All checks were successful
Build And Test / build-and-push (push) Successful in 4m14s
All checks were successful
Build And Test / build-and-push (push) Successful in 4m14s
This commit is contained in:
12
butler_ddochi/version/context_processors.py
Normal file
12
butler_ddochi/version/context_processors.py
Normal file
@ -0,0 +1,12 @@
|
||||
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}
|
Reference in New Issue
Block a user