diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/db/queries.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt index 3457913011..a4267489b9 100644 --- a/docs/topics/db/queries.txt +++ b/docs/topics/db/queries.txt @@ -365,6 +365,16 @@ translates (roughly) into the following SQL:: .. _`Keyword Arguments`: http://docs.python.org/tutorial/controlflow.html#keyword-arguments +.. versionchanged:: 1.4 + + The field specified in a lookup has to be the name of a model field. + There's one exception though, in case of a + :class:`~django.db.models.fields.ForeignKey` you can specify the field + name suffixed with ``_id``. In this case, the value parameter is expected + to contain the raw value of the foreign model's primary key. For example:: + + >>> Entry.objects.filter(blog_id__exact=4) + If you pass an invalid keyword argument, a lookup function will raise ``TypeError``. |
