버전 정보 표기 기능추가, 카테고리, 링크 등 수정
All checks were successful
Build And Test / build-and-push (push) Successful in 4m14s

This commit is contained in:
2024-12-15 23:58:47 +09:00
parent 52586e9369
commit 0e59c11818
9 changed files with 64 additions and 21 deletions

View File

@ -77,6 +77,7 @@ TEMPLATES = [
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
"butler_ddochi.version.context_processors.version_processor", # 추가
],
},
},

View 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}