#2692 closed enhancement (worksforme)
Show the SQL that's being generated on each query.
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Tools | Version: | 0.95 |
Severity: | trivial | Keywords: | db, debug, sql |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In the old days I used to write all the SQL in every project that required a db and although I'm enjoying a lot the ORM approach implemented on Django I still have some troubles in doing certain "complex" queries.
Before deciding to give this project a go, I've played with SQLObject and enjoyed a lot a debug feature which shows all the SQL that hits the db.
I'd love to see it on Django too.
A (hopefully) faithful customer,
João C. Morais
Change History (3)
comment:1 by , 18 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 18 years ago
(additionally, the context processor django.core.context_processors.debug
makes this information available for use in templates; see here for details: http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext)
Django already makes this information available when the
DEBUG
setting isTrue
; see this item in the FAQ: http://www.djangoproject.com/documentation/faq/#how-can-i-see-the-raw-sql-queries-django-is-running