locale
This commit is contained in:
parent
9fab6b3c94
commit
06b8325cd8
|
@ -13,7 +13,10 @@ from app.constants import *
|
||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
templates = Jinja2Templates(directory="templates")
|
templates = Jinja2Templates(directory="templates")
|
||||||
|
try:
|
||||||
locale.setlocale(locale.LC_TIME, 'ru_RU')
|
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"):
|
def format_datetime(value, format="%d %B %Y, %H:%M:%S"):
|
||||||
|
|
Loading…
Reference in New Issue