You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
263 B

import random
import string
def genRandomStr(N = 7):
res = ''.join(random.choices(string.ascii_uppercase + string.digits, k=N))
return res
async def genNum(instance):
instance.num = genRandomStr(4)
instance.tag = "123"
await instance.save()