t***@adaptive-channel.com
2018-08-23 13:58:29 UTC
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.
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.
--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.