Opened 12 years ago

Closed 12 years ago

Last modified 12 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: no UI/UX: no


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 12 years ago by Adrian Holovaty

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 12 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(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