| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This has likely never worked correctly, as Django's query log entry has ever since been a dictionary made of 'time' and 'sql'.
| Back | FazBrowse Home | New Git URL |
This has likely never worked correctly, as Django's query log entry has ever since been a dictionary made of 'time' and 'sql'. I've locally mounted this sqlcommenter code state into a Django project of ours using assertNumQueries, and it worked, see output below. The queries are properly formatted into the connection debug log:
File "(...)/tests/test_dummy.py", line 7, in test_dummy with self.assertNumQueries(0): ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/django/test/testcases.py", line 96, in __exit__ self.test_case.assertEqual( AssertionError: 2 != 0 : 2 queries executed, 0 expected Captured queries were: 1. SELECT [...] WHERE foo IN (1, 2, 3) /*controller='django_app.views.SomeView',framework='django%%3A5.0.11',route='SOME_SLUG'*/ [...]Fixes #2.