Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#2692 closed enhancement (worksforme)

Show the SQL that's being generated on each query.

Reported by: napalm@… 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 James Bennett, 18 years ago

Resolution: worksforme
Status: newclosed

Django already makes this information available when the DEBUG setting is True; see this item in the FAQ: http://www.djangoproject.com/documentation/faq/#how-can-i-see-the-raw-sql-queries-django-is-running

comment:2 by James Bennett, 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)

comment:3 by napalm@…, 18 years ago

Thanks,
Sorry for taking your precious time :)

João

Note: See TracTickets for help on using tickets.
Back to Top