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?
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" %}
The title is pretty self explanatory. How can one present current data and time in django’s template?
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" %}