diff --git a/.gitignore b/.gitignore index 7ef72bb..cfdaa5b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ *.pyc +*.egg-info .DS_Store docs/_build +/build +/dist diff --git a/example/app/forms.py b/example/app/forms.py index 4b7eb2a..9ab076f 100644 --- a/example/app/forms.py +++ b/example/app/forms.py @@ -1,7 +1,16 @@ from django import forms +CHOICES = ( + (0, 'Zero'), + (1, 'One'), + (2, 'Two'), +) + class ExampleForm(forms.Form): - title = forms.CharField() - choices = forms.ChoiceField(choices=((0, 'Zero'), (1, 'One'), (2, 'Two')), widget=forms.RadioSelect) - password = forms.CharField(widget=forms.PasswordInput) + char_field = forms.CharField() + choice_field = forms.ChoiceField(choices=CHOICES) + radio_choice = forms.ChoiceField(choices=CHOICES, widget=forms.RadioSelect) + file_fied = forms.FileField() + password_field = forms.CharField(widget=forms.PasswordInput) textarea = forms.CharField(widget=forms.Textarea) + boolean_field = forms.BooleanField() diff --git a/example/app/templates/index.html b/example/app/templates/index.html index df302b9..76527e7 100644 --- a/example/app/templates/index.html +++ b/example/app/templates/index.html @@ -2,31 +2,63 @@
- + - +