mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
add missing imports to the examples in the 'Forms'
This commit is contained in:
parent
1d543949d7
commit
08b501e7d3
8 changed files with 136 additions and 48 deletions
|
@ -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):
|
||||
|
||||
# ...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue