My question is, is there a way to generate Django slugs on the fly WITHOUT storing them in the DB?
I have been tinkering with get_absolute_url
but no luck yet.
def get_absolute_url(self):
randstr = hashlib.sha256(str(random.getrandbits(256)).encode('utf-8')).hexdigest()
return reverse(args=[randstr])
Yea I know, why not use uuid, right? Not the point, the question is how to generate slugs on the fly WITHOUT storing them in the DB? I would my urls to change that's the point.