add missing imports to the examples in the 'Forms'

This commit is contained in:
leandrafinger 2013-05-19 11:15:35 +02:00 committed by Silvan Spross
parent 1d543949d7
commit 08b501e7d3
8 changed files with 136 additions and 48 deletions

View file

@ -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):
# ...