/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

www.paulox.net
| | www.paepper.com

Unit testing your models in Django As a good developer, you write unit tests, of course. You will probably even write your tests before implementing your logic in a test-driven approach! However, when developing complex models which have interactions and foreign keys, writing tests can get messy and complicated. Say you want to test a model which has many dependencies to other models via foreign keys. To create an instance of your model, you first need to create all the other model instances which your m...
4.8 parsecs

Travel
| |
| | humberto.io

How to solve the issue of dealing with generic many to many relations on Django
4.1 parsecs

Travel
| |
| | www.rorvswild.com

Querying your database across associations can become a bottleneck in your Rails application. Julian Rubisch, our first guest author, explains why and suggests an efficient solution.
5.1 parsecs

Travel
| |
| | 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.
24.2 parsecs

Travel
|