Contribute Media
A thank you to everyone who makes this possible: Read More

The Beauty of ViewSets in Django Rest Framework

Description

DjangoCon US 2017 - The Beauty of ViewSets in Django Rest Framework by Buddy Lindsey Jr.

ViewSets will make your code shorter, more robust, and save you time during your development, if you let them. I have spent a lot of time dealing with writing view code, and dealing with all the urls, only to finally learn ViewSets. It immediately saved development time as well as making my code more simple.

Generally to make a new, basic, endpoint in DRF for a model it would take about 15 minutes. That includes creating a serializer, urls, views, and testing it the browser. Now that same endpoint is more easily understood and done, all the steps, in less than 5 minutes. Leaving you more time to worry about what your new app is supposed to actually do.

https://2017.djangocon.us/talks/the-beauty-of-viewsets-in-django-rest-framework/

Details

Improve this page