2025-07-26

This commit is contained in:
2025-07-26 14:52:54 -05:00
parent 55c03bcafb
commit c543c98bf3
28 changed files with 2779 additions and 146 deletions

View File

@@ -0,0 +1,11 @@
from hashids import Hashids
from django.conf import settings
hashids = Hashids(min_length=8, salt=settings.HASHIDS_SALT)
def encode_id(id):
return hashids.encode(id)
def decode_id(hashid):
decoded = hashids.decode(hashid)
return int(decoded[0]) if decoded else None