We are building an api which exposes uuids instead of pks to access objects.
As a way to shorten the urls and make them friendlier, we thought we could encode the uuids in a higher base than the default base16 (we chose base58 for readability if you're curious, but that doesn't matter).
What's the best approach to decode and encode uuids seemlessly in urls, as they go in and out of our api?
Also, we would of course like for reverse() to yield urls with encoded uuids.
After skimming through Django rest framework's source code, I've tried customizing serializers, middleware, views, etc. without success and I'm a bit lost now.