Why isn't it possible to delete sliced querysets?

2023-01-29 Thread M T
Hi all, I was wondering about the technical reasons why deleting sliced querysets is prohibited (the error thrown is Cannot use 'limit' or 'offset' with delete()). This makes it really complex when one wants to delete huge amounts of data (think millions of rows): The only supported options ar

Logging: set default values for custom keys in custom formatters OR choose formatter based on logger

2022-04-10 Thread M T
Hi all, I'm trying to extend the formatter for console logging with custom keys. But I've run into two problems while doing that: 1) Root log messages of course don't provide these custom keys in their extra dict, so they throw errors. Looking at the official Python documentation, it is possible