From 3d012a18cec7edeb19f7fb579dc47dfae00a99bb Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Sun, 12 Aug 2007 06:25:05 +0000 Subject: [PATCH] Added documentation for widgets in newforms. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5867 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/newforms.txt | 152 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 151 insertions(+), 1 deletion(-) diff --git a/docs/newforms.txt b/docs/newforms.txt index 800c13b52a..5d735ceb28 100644 --- a/docs/newforms.txt +++ b/docs/newforms.txt @@ -962,7 +962,7 @@ validation if a particular field's value is not given. ``initial`` values are ~~~~~~~~~~ The ``widget`` argument lets you specify a ``Widget`` class to use when -rendering this ``Field``. See "Widgets" below for more information. +rendering this ``Field``. See "Widgets"_ below for more information. ``help_text`` ~~~~~~~~~~~~~ @@ -1437,6 +1437,156 @@ like so:: senders = MultiEmailField() cc_myself = forms.BooleanField() +Widgets +======= + +A widget is Django's representation of a HTML input element. The widget +handles the rendering of the HTML, and the extraction of data from a GET/POST +dictionary that corresponds to the widget. + +Django provides a representation of all the basic HTML widgets, plus some +commonly used groups of widgets: + + ============================ =========================================== + Widget HTML Equivalent + ============================ =========================================== + ``TextInput`` ``...`` + ``CheckboxInput`` ``