Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#2692 closed enhancement (worksforme)

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

Reported by: napalm@… Owned by: adrian
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: UI/UX:

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 Changed 8 years ago by ubernostrum

  • Resolution set to worksforme
  • Status changed from new to closed

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 Changed 8 years ago by ubernostrum

(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 Changed 8 years ago by napalm@…

Thanks,
Sorry for taking your precious time :)

João

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