AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
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.