From b8e7730f3e25a0bcabca82bf5a2e06411ffcc92e Mon Sep 17 00:00:00 2001 From: Curtis Maloney Date: Sat, 21 Sep 2013 13:54:48 +1000 Subject: [PATCH] [1.5.x] Fixed #21133 -- Clarifed documentation about strftime formatting. Backport of 43a2ec7999 from master --- docs/ref/class-based-views/mixins-date-based.txt | 5 +++++ docs/ref/templates/builtins.txt | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/docs/ref/class-based-views/mixins-date-based.txt b/docs/ref/class-based-views/mixins-date-based.txt index 75f2a776155..d1979b9e558 100644 --- a/docs/ref/class-based-views/mixins-date-based.txt +++ b/docs/ref/class-based-views/mixins-date-based.txt @@ -4,6 +4,11 @@ Date-based mixins .. currentmodule:: django.views.generic.dates +.. note:: + All the date formatting attributes in these mixins use + :func:`~time.strftime` format characters. Do not try to use the format + characters from the :ttag:`now` template tag as they are not compatible. + YearMixin --------- diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 1572b156042..0e9f586d1e0 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -1201,6 +1201,10 @@ Formats a date according to the given format. Uses a similar format as PHP's ``date()`` function (http://php.net/date) with some differences. +.. note:: + These format characters are not used in Django outside of templates. They + were designed to be compatible with PHP to ease transitioning for designers. + Available format strings: ================ ======================================== =====================