stammdaten-formular/id.py

7 lines
156 B
Python
Raw Normal View History

import datetime
import hashlib
def new_id():
h = hashlib.md5()
h.update(datetime.datetime.now().isoformat().encode())
return h.hexdigest()[-5:]