瀏覽代碼

Fixed a typo in docs/ref/models/fields.txt.

datetime.date.utcnow() doesn't exist, should be .today().
Nick Pope 3 年之前
父節點
當前提交
88b3982af3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      docs/ref/models/fields.txt

+ 1 - 1
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