Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
692 Lượt xem

Dates currently show up in the following format on my Email Templates: 2024-06-06 20:11:39

I would like them to show up like this: 06 Jun 2024

This may change by Template, so I don't want this as a global setting.


Here is the current code in my template, how would I modify it?

t t-out="object.validity_date"

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Been working on this for two hours and 5 minutes after I post I figure it out.  If anyone else is interested, here is it

t t-out="object.validity_date.strftime('%d %b %Y')"

Ảnh đại diện
Huỷ bỏ