datamade / how-to

📚 Doing all sorts of things, the DataMade way
MIT License
80 stars 12 forks source link

Document pattern for using DRF serializers to serialize data outside of DRF logic #345

Closed smcalilly closed 2 months ago

smcalilly commented 10 months ago

Documentation request

We've used DRF serializers to serialize data outside of a DRF endpoint. It's a useful tool that you can use in parts of your code that have nothing to do with an API endpoint (aka DRF's job).

Some ways we use it:

We should document this pattern. I've found myself coming back to it in various projects and I think it could be good information to share.