Django Book 翻译
菜单>:
TOC
返回
原文:
For every ``DateField`` and ``DateTimeField`` that does not have ``null=True`` , the object will have ``get_next_by_FOO()`` and ``get_previous_by_FOO()`` methods, where ``FOO`` is the name of the field. This returns the next and previous object with respect to the date field, raising the appropriate ``DoesNotExist`` exception when appropriate.
翻译:
对于任何不允许空值的DateField和DateTimeField字段,将会有"get_next_by_FOO()"和"get_previous_by_FOO()"这两个方法。FOO表示字段名。这两个方法将根据给定的日期字段返回其前一个、后一个对象,适当的时候会抛出"DoesNotExist"的异常。
备注:
译者: