'Django: disable querysets from console
After python manage.py runserver and doing a request to the server, console displays logs of querysets for model instances for a given view. It's fine, helpful even, until trying python manage.py test, it's simply unnecessary and annoying while running tests. I've tried to disable those logs with logging.disable(logging.CRITICAL) or logging.disable() (critical is supposed to be the default value), but without any effect. I tried to put in in settings.py on condition i'm running the test environment, then i tried to make it work no matter the environment - I even tried to put it in setUp functions of test files or in test functions themselves. I also tried to modify the LOGGING variable in settings.py in various ways. Nothing worked.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
