소스 검색

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