Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#2064 closed enhancement (fixed)

Need documentation for low-level API for writing your own SQL

Reported by: Simon Willison Owned by: jacob
Component: Documentation Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


The Django database documentation doesn't currently describe the low-level API for writing your own SQL, using django.db.connection, cursors and so on. (It does explain the extra() clause on QuerySets which covers 80% of cases). Documentation for this should demonstrate writing custom model methods that run their own SQL queries, thus encouraging best practises.

Change History (2)

comment:1 Changed 9 years ago by adrian

The model docs have it here:

This is a bit confusing, because the database API docs should point this out as well. I'll make the addition.

comment:2 Changed 9 years ago by adrian

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

(In [3054]) Fixed #2064 -- Added 'Falling back to raw SQL' section to docs/db-api.txt

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