From 24a45a5fda57121a6479b498f4c9c53fadde2158 Mon Sep 17 00:00:00 2001 From: Timo Graham Date: Sun, 21 Aug 2011 11:51:48 +0000 Subject: [PATCH] Fixed #16602 - Added forms.widgets TOC links to docs; thanks kencochrane. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16633 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/ref/forms/widgets.txt | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt index 4b96a1024e..f0cde04c57 100644 --- a/docs/ref/forms/widgets.txt +++ b/docs/ref/forms/widgets.txt @@ -171,6 +171,9 @@ Built-in widgets Django provides a representation of all the basic HTML widgets, plus some commonly used groups of widgets: +``Widget`` +~~~~~~~~~~ + .. class:: Widget This abstract class cannot be rendered, but provides the basic attribute :attr:`~Widget.attrs`. @@ -185,11 +188,16 @@ commonly used groups of widgets: >>> name.render('name', 'A name') u'' +``TextInput`` +~~~~~~~~~~~~~ .. class:: TextInput Text input: ```` +``PasswordInput`` +~~~~~~~~~~~~~~~~~ + .. class:: PasswordInput Password input: ```` @@ -206,10 +214,16 @@ commonly used groups of widgets: :attr:`~PasswordInput.render_value` was changed from ``True`` to ``False`` +``HiddenInput`` +~~~~~~~~~~~~~~~ + .. class:: HiddenInput Hidden input: ```` +``MultipleHiddenInput`` +~~~~~~~~~~~~~~~~~~~~~~~ + .. class:: MultipleHiddenInput Multiple ```` widgets. @@ -223,10 +237,16 @@ commonly used groups of widgets: :attr:`~Field.choices` attribute. If it does, it will override anything you set here when the attribute is updated on the :class:`Field`. +``FileInput`` +~~~~~~~~~~~~~ + .. class:: FileInput File upload input: ```` +``ClearableFileInput`` +~~~~~~~~~~~~~~~~~~~~~~ + .. class:: ClearableFileInput .. versionadded:: 1.3 @@ -235,6 +255,9 @@ commonly used groups of widgets: input to clear the field's value, if the field is not required and has initial data. +``DateInput`` +~~~~~~~~~~~~~ + .. class:: DateInput Date input as a simple text box: ```` @@ -249,6 +272,9 @@ commonly used groups of widgets: format found in :setting:`DATE_INPUT_FORMATS` and respects :ref:`format-localization`. +``DateTimeInput`` +~~~~~~~~~~~~~~~~~ + .. class:: DateTimeInput Date/time input as a simple text box: ```` @@ -263,6 +289,9 @@ commonly used groups of widgets: format found in :setting:`DATETIME_INPUT_FORMATS` and respects :ref:`format-localization`. +``TimeInput`` +~~~~~~~~~~~~~ + .. class:: TimeInput Time input as a simple text box: ```` @@ -277,10 +306,16 @@ commonly used groups of widgets: format found in :setting:`TIME_INPUT_FORMATS` and respects :ref:`format-localization`. +``Textarea`` +~~~~~~~~~~~~ + .. class:: Textarea Text area: ```` +``CheckboxInput`` +~~~~~~~~~~~~~~~~~ + .. class:: CheckboxInput Checkbox: ```` @@ -292,6 +327,9 @@ commonly used groups of widgets: A callable that takes the value of the CheckBoxInput and returns ``True`` if the checkbox should be checked for that value. +``Select`` +~~~~~~~~~~ + .. class:: Select Select widget: ```` @@ -302,15 +340,24 @@ commonly used groups of widgets: :attr:`~Field.choices` attribute. If it does, it will override anything you set here when the attribute is updated on the :class:`Field`. +``NullBooleanSelect`` +~~~~~~~~~~~~~~~~~~~~~ + .. class:: NullBooleanSelect Select widget with options 'Unknown', 'Yes' and 'No' +``SelectMultiple`` +~~~~~~~~~~~~~~~~~~ + .. class:: SelectMultiple Similar to :class:`Select`, but allows multiple selection: ```` +``RadioSelect`` +~~~~~~~~~~~~~~~ + .. class:: RadioSelect Similar to :class:`Select`, but rendered as a list of radio buttons: @@ -322,6 +369,9 @@ commonly used groups of widgets: ... +``CheckboxSelectMultiple`` +~~~~~~~~~~~~~~~~~~~~~~~~~~ + .. class:: CheckboxSelectMultiple Similar to :class:`SelectMultiple`, but rendered as a list of check @@ -334,6 +384,9 @@ commonly used groups of widgets: ... +``MultiWidget`` +~~~~~~~~~~~~~~~ + .. class:: MultiWidget Wrapper around multiple other widgets. You'll probably want to use this @@ -381,6 +434,9 @@ commonly used groups of widgets: An iterable containing the widgets needed. +``SplitDateTimeWidget`` +~~~~~~~~~~~~~~~~~~~~~~~ + .. class:: SplitDateTimeWidget Wrapper (using :class:`MultiWidget`) around two widgets: :class:`DateInput` @@ -396,6 +452,8 @@ commonly used groups of widgets: Similar to :attr:`TimeInput.format` +``SplitHiddenDateTimeWidget`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. class:: SplitHiddenDateTimeWidget @@ -404,6 +462,9 @@ commonly used groups of widgets: .. currentmodule:: django.forms.extras.widgets +``SelectDateWidget`` +~~~~~~~~~~~~~~~~~~~~ + .. class:: SelectDateWidget Wrapper around three :class:`~django.forms.Select` widgets: one each for