2 ms·
I don't find it has a lot of overhead if you keep it simple. No need to use class based views for REST services, just add function-based views with the @api_vie
by sgt 4y ago
I don't find it has a lot of overhead if you keep it simple. No need to use class based views for REST services, just add function-based views with the @api_view decorator.
You can then within minutes return JSON coming from your data model by also adding an additional decorator to make it render JSON output.
If returning data directly from managed ORM objects, you will need to serialize it, but you can easily build an API without doing that and just return a dict.