From e69348b4e7f07ef927edaecc7126901fc91c79d0 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sat, 8 Sep 2012 11:00:04 -0400 Subject: Avoided mixing dates and datetimes in the examples. Refs #16023. --- docs/ref/models/fields.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/ref/models/fields.txt') diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 275c696230..190c0037ca 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -983,10 +983,10 @@ define the details of how the relation works. this with functions from the Python ``datetime`` module to limit choices of objects by date. For example:: - limit_choices_to = {'pub_date__lte': datetime.now} + limit_choices_to = {'pub_date__lte': datetime.date.today} only allows the choice of related objects with a ``pub_date`` before the - current date/time to be chosen. + current date to be chosen. Instead of a dictionary this can also be a :class:`~django.db.models.Q` object for more :ref:`complex queries `. However, -- cgit v1.3