Django Chat cover image

Optimizing Django Queries - Jamie Matthews

Django Chat

00:00

Zen Queries: A Context Manager for Query Evaluation

Django encourages you to put your business logic in the model layer, essentially. But Django's migration framework doesn't really handle this very well. So Zen queries is a context manager that lets you mark a block of code as not being able to run queries - and it will raise an exception for doing so. This can help avoid problems like end queries which are often caused by nested loops or complex object graphs. Jamie has spent a lot of time thinking about how to solve these problems with his open source toolset called Zen queries.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app