|
You are here |
www.django-rest-framework.org | ||
| | | | |
richardtier.com
|
|
| | | | | Django Rest Framework integrates well with models to provide out of the box validation, and ModelSerializers allow futher fine-grained custom validation. However, if you're not using a model as the resource of your endpoint then the code required for custom validation of complex data structure can get hairy. If there is a heavily nested data... | |
| | | | |
apisyouwonthate.com
|
|
| | | | | How to handle pagination in your REST API, and what are the pros and cons of each method? | |
| | | | |
masnun.com
|
|
| | | | | So this is what happened - I built an url shortening service at work for internal use. It's a very basic app - shortens urls and tracks clicks. Two models - `URL` and `URLVisit`. `URL` model contains the full url, slug for the short url, created time etc. `URLVisit` has information related to the click, [...] | |
| | | | |
www.laceyhenschel.com
|
|
| | | If you came here from Part 1 of What You Should Know About Django REST Framework, you may be wondering why I just walked you through a bunch of source code. We stepped through that code because if you know what the main methods of the ModelViewSet do and how they work, you know where to go when you want to tweak the behavior of your viewset. You can pull out the method that contains what you want to change, override it with your own custom behavior, and put it back in. In Part 1, we were writing a BookViewSet. So let's go through a few cases where we might want to customize the behavior of our endpoints and walk through how we would do that. | ||