Fix south migration problem caused by 0003_update_keys_to_textversion using TextVersion model which is updated only in 0010_auto__add_field_textversion_category_1__add_field_textversion_category, same with 0007_populate_id_key_in_comments using Comment model updated in 0011_auto__add_field_comment_category.
import time
from django.utils.translation import ugettext as _
#http://docs.python.org/lib/module-time.html
def datetime_to_user_str(dt):
return dt.strftime(str(_("%Y-%m-%d %H:%M")))
#def datetime_to_str(dt):
# return dt.strftime(CLIENT_DATE_FMT['python_output'])
def datetime_to_epoch(dt):
return time.mktime(dt.timetuple())
#def datetime_to_js_date_str(dt):
# print str(1000*mktime(dt.timetuple()))
# return str(1000*mktime(dt.timetuple()))