summaryrefslogtreecommitdiff
path: root/docs/ref/forms/widgets.txt
diff options
context:
space:
mode:
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):
# ...