Opened 17 years ago
Closed 17 years ago
#10012 closed (invalid)
Query documentation uses objects.get with Q instead of objects.filter
| Reported by: | jimpurbrick | Owned by: | nobody |
|---|---|---|---|
| Component: | Documentation | Version: | 1.0 |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
http://docs.djangoproject.com/en/dev/topics/db/queries/ passes Q objects to objects.get, when it should pass them to objects.filter
Note:
See TracTickets
for help on using tickets.
This isn't a problem. Quoting that very documentation page:
"Each lookup function that takes keyword-arguments (e.g. filter(), exclude(), get()) can also be passed one or more Q objects as positional (not-named) arguments."