summaryrefslogtreecommitdiff
path: root/docs/ref/models/fields.txt
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-09-08 11:00:04 -0400
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-09-08 11:00:04 -0400
commite69348b4e7f07ef927edaecc7126901fc91c79d0 (patch)
treee3bf89867455ee918f69245a3d4c7be5535ad155 /docs/ref/models/fields.txt
parentb7d3b057f32ed6aa7ee0941e1f0dec9d3e9223a3 (diff)
Avoided mixing dates and datetimes in the examples.
Refs #16023.
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,