Django: Formate datetime.now() to Unix timestamp

To convert the datetime object to a Unix timestamp using Django:

from django.utils.dateformat import format

timestamp_string = format(datetime.now(), u'U')

slidedog
Now go forth and be happy!

 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog