From 88b3982af396a7c2eca0db9c52dfa9830045cc19 Mon Sep 17 00:00:00 2001 From: Nick Pope Date: Fri, 7 May 2021 11:14:07 +0100 Subject: [PATCH] Fixed a typo in docs/ref/models/fields.txt. datetime.date.utcnow() doesn't exist, should be .today(). --- docs/ref/models/fields.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index e5332d4bfc..9847560504 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -1662,7 +1662,7 @@ The possible values for :attr:`~ForeignKey.on_delete` are found in example:: def limit_pub_date_choices(): - return {'pub_date__lte': datetime.date.utcnow()} + return {'pub_date__lte': datetime.date.today()} limit_choices_to = limit_pub_date_choices