django timestamp format code example
Example: django tempalte tag datetime to timestamp
{% now "U" %}
The "U" is a date format for Unix epoch, and can also be used with built-in date filter. So, if you have the date in a variable:
{{ value|date:"U" }}