django-rest-framework/examples/resourceexample/forms.py
markotibold 177e666fc2 BlogPosts > 10 rotation implemeneted
Latest Modelresource example is broken. Required attribute should be set to form, not model. Is fixed.
2011-03-06 13:26:19 +01:00

7 lines
246 B
Python

from django import forms
class MyForm(forms.Form):
foo = forms.BooleanField(required=False)
bar = forms.IntegerField(help_text='Must be an integer.')
baz = forms.CharField(max_length=32, help_text='Free text. Max length 32 chars.')