locale
This commit is contained in:
parent
9fab6b3c94
commit
06b8325cd8
|
@ -13,7 +13,10 @@ from app.constants import *
|
|||
|
||||
app = FastAPI()
|
||||
templates = Jinja2Templates(directory="templates")
|
||||
locale.setlocale(locale.LC_TIME, 'ru_RU')
|
||||
try:
|
||||
locale.setlocale(locale.LC_TIME, 'ru_RU')
|
||||
except Exception as e:
|
||||
logger.error(e)
|
||||
|
||||
# Создаем кастомный фильтр для форматирования дат
|
||||
def format_datetime(value, format="%d %B %Y, %H:%M:%S"):
|
||||
|
|
Loading…
Reference in New Issue