Skip to content

Commit

Permalink
Fixed #10135 -- Added some import statements to docs/ref/forms/fields…
Browse files Browse the repository at this point in the history
….txt and docs/ref/forms/widgets.txt to help people understand where the code lives. Thanks, Rob Hudson

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9853 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed Feb 21, 2009
1 parent 6418533 commit 28448a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/ref/forms/fields.txt
Expand Up @@ -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`` a single argument and either raises a ``django.forms.ValidationError``
exception or returns the clean value:: exception or returns the clean value::


>>> from django import forms
>>> f = forms.EmailField() >>> f = forms.EmailField()
>>> f.clean('foo@example.com') >>> f.clean('foo@example.com')
u'foo@example.com' u'foo@example.com'
Expand Down
2 changes: 2 additions & 0 deletions docs/ref/forms/widgets.txt
Expand Up @@ -107,6 +107,8 @@ built-in Field classes.
However, if you want to use a different widget for a field, you can - 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:: just use the 'widget' argument on the field definition. For example::


from django import forms

class CommentForm(forms.Form): class CommentForm(forms.Form):
name = forms.CharField() name = forms.CharField()
url = forms.URLField() url = forms.URLField()
Expand Down

0 comments on commit 28448a5

Please sign in to comment.