Django – present current date and time in template

Question:

The title is pretty self explanatory. How can one present current data and time in django’s template?

Asked By: Neithrik

||

Answers:

Try using built-in django template tags and filters:
https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#now

Examples:

It is {% now "jS F Y H:i" %}
It is {% now "SHORT_DATETIME_FORMAT" %}
Answered By: Sara
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.