Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#14185 closed (fixed)

Possible bad SQL at http://docs.djangoproject.com/en/dev/ref/models/querysets/

Reported by: Dave Trindall Owned by: Luke Plant
Component: Documentation Version: 1.2
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

Shouldn't

SELECT blog_entry.*, (pub_date > '2006-01-01')
FROM blog_entry;

be

SELECT blog_entry.*, (pub_date > '2006-01-01') AS is_recent
FROM blog_entry;

on http://docs.djangoproject.com/en/dev/ref/models/querysets/

Cheers,
Dave

Change History (3)

comment:1 by Luke Plant, 14 years ago

Owner: changed from nobody to Luke Plant
Status: newassigned

The example is perfectly valid SQL, and it is not intended to document exactly what SQL is generated. However, for clarity and consistency with the other examples it would be useful to make the change you suggest.

comment:2 by Luke Plant, 14 years ago

Resolution: fixed
Status: assignedclosed

(In [13652]) Fixed #14185 - improved example SQL for 'select' example.

Thanks to Trindaz for the suggestion.

Also fixed some references to 'lede' which is no longer part of the
example Blog model.

comment:3 by Luke Plant, 14 years ago

(In [13653]) [1.2.X] Fixed #14185 - improved example SQL for 'select' example.

Thanks to Trindaz for the suggestion.

Also fixed some references to 'lede' which is no longer part of the
example Blog model.

Backport of [13652] from trunk.

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