7 lines
156 B
Python
7 lines
156 B
Python
|
import datetime
|
||
|
import hashlib
|
||
|
|
||
|
def new_id():
|
||
|
h = hashlib.md5()
|
||
|
h.update(datetime.datetime.now().isoformat().encode())
|
||
|
return h.hexdigest()[-5:]
|