How do you get just the date part from a datetime value to show in an html template.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is actually an example in the jinja2 documentation; you can create a custom formatter and then just pass the datetime to your template and use the formatter to display only the date: http://jinja.pocoo.org/docs/api/#custom-filters – Wooble 22 hours ago
I am adding Wooble’s comment as an answer.