verification/api/helpers.py
2019-12-24 15:40:58 +01:00

4 lines
105 B
Python

import random
def generate_token(length=6):
return random.SystemRandom().randint(0, (10**length)-1)