/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

davi.sh
| | sam.hooke.me
2.2 parsecs away

Travel
| | The home page of Sam Hooke.
| | www.laceyhenschel.com
0.9 parsecs away

Travel
| | Sometimes the endpoints you get when you use a ModelViewSet aren't enough and you need to add extra endpoints for custom functions. To do this, you could use the APIView class and add a custom route to your `urls.py` file, and that would work fine. But if you have a viewset already, and you feel like this new endpoint belongs with the other endpoints in your viewset, you can use DRF's @action decorator to add a custom endpoint. This means you don't have to change your urls.py -- the method you decorate w...
| | stribny.name
2.9 parsecs away

Travel
| | How to combine request and response serializers into one for use in ModelViewSets.
| | www.laceyhenschel.com
3.0 parsecs away

Travel
| One of the things I hear people say about Django is that it's a "batteries included" framework, and Django REST Framework is no different. One of the most powerful of these "batteries" is the ModelViewSet class, which is more of a "battery pack," in that it contains several different batteries. If you have any experience with Django's class-based views, then DRF's viewsets will hopefully look familiar to you.