summaryrefslogtreecommitdiff
path: root/docs/ref/models/fields.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref/models/fields.txt')
-rw-r--r--docs/ref/models/fields.txt4
1 files changed, 2 insertions, 2 deletions
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 <complex-lookups-with-q>`. However,