Closed luiscoms closed 7 years ago
In order to maintain API compatibility with the specification and other implementations I'm reluctant to change how slug()
works. If you need a longer slug, why don't you use a full cuid()
?
I see, I don`t want to use full cuid cause it is too long.
It sounds like you want to shorten the full cuid. If you simply take every 2nd or every 3rd character from the cuid, this will preserve other useful properties (like sorting) -- for example:
>>> short_cuid = cuid.cuid()[::2]
>>> len(short_cuid) # 13
>>> shorter_cuid = cuid.cuid()[::3]
>>> len(shorter_cuid) # 9
If you're not so concerned about uniqueness, this should work.
Closing this issue since we have an alternative solution.
Once I generate a bunch of slugs, i need to increase the size of slug to be able to generate more of them. Is it possible? Thanks