import --> create tag distribution with/without batch
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import base64
|
||||
import random
|
||||
from datetime import datetime
|
||||
from functools import lru_cache
|
||||
|
||||
@@ -56,3 +57,10 @@ def parse_birthdate(jalali_str):
|
||||
gregorian_dt,
|
||||
timezone.get_current_timezone()
|
||||
)
|
||||
|
||||
|
||||
def generate_unique_code(prefix: str):
|
||||
now = timezone.now()
|
||||
date_part = now.strftime("%Y%m%d")
|
||||
rand_part = random.randint(100000, 999999)
|
||||
return f"{prefix}{date_part}{rand_part}"
|
||||
|
||||
Reference in New Issue
Block a user