support avatar upload;

use middleware to operate session data.
This commit is contained in:
zema1 committed 2017-09-19 19:10:50 +08:00
1 parent 1ee0596a3a
commit 034ad59f2e
13 files changed
+72 -65

No files matched your search

+5
View File
@@ -1,5 +1,6 @@
import logging
import random
import datetime
from io import BytesIO
from base64 import b64encode
@@ -78,3 +79,7 @@ def datetime2str(value, format="iso-8601"):
value = value[:-6] + "Z"
return value
return value.strftime(format)
def timestamp2utcstr(value):
return datetime.datetime.utcfromtimestamp(value).isoformat()