From f5c6d3c8d9fa2158734858fa0a7ac917c384cb97 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Thu, 18 Aug 2016 17:55:47 -0700 Subject: Fixed #27068 -- Unified form field initial data retrieval. --- docs/ref/forms/api.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs/ref/forms') diff --git a/docs/ref/forms/api.txt b/docs/ref/forms/api.txt index 094be3a565..8849ce284d 100644 --- a/docs/ref/forms/api.txt +++ b/docs/ref/forms/api.txt @@ -248,6 +248,14 @@ precedence:: Url: Comment: +.. method:: Form.get_initial_for_field(field, field_name) + +.. versionadded:: 1.11 + +Use :meth:`~Form.get_initial_for_field()` to retrieve initial data for a form +field. It retrieves data from :attr:`Form.initial` and :attr:`Field.initial`, +in that order, and evaluates any callable initial values. + Checking which form data has changed ==================================== -- cgit v1.3