verification/api/helpers.py

5 lines
105 B
Python
Raw Normal View History

2019-12-24 14:40:58 +00:00
import random
def generate_token(length=6):
return random.SystemRandom().randint(0, (10**length)-1)