summaryrefslogtreecommitdiff
path: root/docs/ref/forms/widgets.txt
diff options
context:
space:
mode:
authorMarc Tamlyn <marc.tamlyn@gmail.com>2013-05-19 05:26:13 -0700
committerMarc Tamlyn <marc.tamlyn@gmail.com>2013-05-19 05:26:13 -0700
commitc6855e8a704a8fadee8fc0eefcd99c5dc5372ab2 (patch)
tree62cecfa131e9bd5b08caaaccc823ac2b75d9d932 /docs/ref/forms/widgets.txt
parentc28b79580493f4bf5df9bea88a5c6bddfe27a6d6 (diff)
parent1fe587d80bfcf062a94252fb532c8ac035c833b9 (diff)
Merge pull request #1162 from sspross/patch-docs
Add needed Imports to the Documentation, Part II
Diffstat (limited to 'docs/ref/forms/widgets.txt')
-rw-r--r--docs/ref/forms/widgets.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt
index 678f2e6949..0f6917d44c 100644
--- a/docs/ref/forms/widgets.txt
+++ b/docs/ref/forms/widgets.txt
@@ -201,6 +201,7 @@ foundation for custom widgets.
.. code-block:: python
+ >>> from django import forms
>>> name = forms.TextInput(attrs={'size': 10, 'title': 'Your name',})
>>> name.render('name', 'A name')
u'<input title="Your name" type="text" name="name" value="A name" size="10" />'
@@ -249,6 +250,8 @@ foundation for custom widgets.
:class:`~datetime.datetime` value into a list with date and time split
into two separate values::
+ from django.forms import MultiWidget
+
class SplitDateTimeWidget(MultiWidget):
# ...