Skip to content
Browse files

Fixed #10135 -- Added some import statements to docs/ref/forms/fields…

….txt and docs/ref/forms/widgets.txt to help people understand where the code lives. Thanks, Rob Hudson

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 6418533 commit 28448a53a9d4cf17306789cd9980162795c644ed @adrianholovaty adrianholovaty committed
Showing with 3 additions and 0 deletions.
  1. +1 −0 docs/ref/forms/fields.txt
  2. +2 −0 docs/ref/forms/widgets.txt
1 docs/ref/forms/fields.txt
@@ -23,6 +23,7 @@ how they work. Each ``Field`` instance has a ``clean()`` method, which takes
a single argument and either raises a ``django.forms.ValidationError``
exception or returns the clean value::
+ >>> from django import forms
>>> f = forms.EmailField()
>>> f.clean('')
2 docs/ref/forms/widgets.txt
@@ -107,6 +107,8 @@ built-in Field classes.
However, if you want to use a different widget for a field, you can -
just use the 'widget' argument on the field definition. For example::
+ from django import forms
class CommentForm(forms.Form):
name = forms.CharField()
url = forms.URLField()

0 comments on commit 28448a5

Please sign in to comment.
Something went wrong with that request. Please try again.