From f2cb74edde91ece19f7860e065d8ceec92cea7a7 Mon Sep 17 00:00:00 2001 From: Dale Hui Date: Mon, 5 Dec 2016 09:17:36 -0800 Subject: [PATCH] Update documentation to include iso-8601-strict --- docs/api-guide/fields.md | 4 ++-- docs/api-guide/settings.md | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md index 17168b721..e6b648df0 100644 --- a/docs/api-guide/fields.md +++ b/docs/api-guide/fields.md @@ -299,7 +299,7 @@ Corresponds to `django.db.models.fields.DateTimeField`. #### `DateTimeField` format strings. -Format strings may either be [Python strftime formats][strftime] which explicitly specify the format, or the special string `'iso-8601'`, which indicates that [ISO 8601][iso8601] style datetimes should be used. (eg `'2013-01-29T12:34:56.000000Z'`) +Format strings may either be [Python strftime formats][strftime] which explicitly specify the format, or the special strings `'iso-8601'`, which indicates that [ISO 8601][iso8601] style datetimes should be used (eg `'2013-01-29T12:34:56.000000Z'`), and `'iso-8601-strict'`, which indicates that [ISO 8601][iso8601] style datetimes without fraction seconds should be used (eg `'2013-01-29T12:34:56Z'`) When a value of `None` is used for the format `datetime` objects will be returned by `to_representation` and the final output representation will determined by the renderer class. @@ -345,7 +345,7 @@ Corresponds to `django.db.models.fields.TimeField` #### `TimeField` format strings -Format strings may either be [Python strftime formats][strftime] which explicitly specify the format, or the special string `'iso-8601'`, which indicates that [ISO 8601][iso8601] style times should be used. (eg `'12:34:56.000000'`) +Format strings may either be [Python strftime formats][strftime] which explicitly specify the format, or the special strings `'iso-8601'`, which indicates that [ISO 8601][iso8601] style times should be used (eg `'12:34:56.000000'`), and `'iso-8601-strict'`, which indicates that [ISO 8601][iso8601] style times without fractional seconds should be used (eg `'12:34:56'`). ## DurationField diff --git a/docs/api-guide/settings.md b/docs/api-guide/settings.md index 58ceeeeb4..717e2babe 100644 --- a/docs/api-guide/settings.md +++ b/docs/api-guide/settings.md @@ -286,7 +286,7 @@ Default: `'format'` A format string that should be used by default for rendering the output of `DateTimeField` serializer fields. If `None`, then `DateTimeField` serializer fields will return Python `datetime` objects, and the datetime encoding will be determined by the renderer. -May be any of `None`, `'iso-8601'` or a Python [strftime format][strftime] string. +May be any of `None`, `'iso-8601'`, `'iso-8601-strict'`, or a Python [strftime format][strftime] string. Default: `'iso-8601'` @@ -294,7 +294,7 @@ Default: `'iso-8601'` A list of format strings that should be used by default for parsing inputs to `DateTimeField` serializer fields. -May be a list including the string `'iso-8601'` or Python [strftime format][strftime] strings. +May be a list including the string `'iso-8601'`, `'iso-8601-strict'` or Python [strftime format][strftime] strings. Default: `['iso-8601']` @@ -318,7 +318,7 @@ Default: `['iso-8601']` A format string that should be used by default for rendering the output of `TimeField` serializer fields. If `None`, then `TimeField` serializer fields will return Python `time` objects, and the time encoding will be determined by the renderer. -May be any of `None`, `'iso-8601'` or a Python [strftime format][strftime] string. +May be any of `None`, `'iso-8601'`, `'iso-8601-strict'` or a Python [strftime format][strftime] string. Default: `'iso-8601'` @@ -326,7 +326,7 @@ Default: `'iso-8601'` A list of format strings that should be used by default for parsing inputs to `TimeField` serializer fields. -May be a list including the string `'iso-8601'` or Python [strftime format][strftime] strings. +May be a list including the string `'iso-8601'`, `'iso-8601-strict'` or Python [strftime format][strftime] strings. Default: `['iso-8601']`