Skip to content

Instantly share code, notes, and snippets.

@meoooh
Last active December 24, 2015 08:59
Show Gist options
  • Save meoooh/6774558 to your computer and use it in GitHub Desktop.
Save meoooh/6774558 to your computer and use it in GitHub Desktop.
class Test(models.Model):
s = models.BooleanField()
class TestForm(ModelForm):
class Meta:
model = Test
####
>> t = TestForm({'s': 3})
>> t.is_valid()
True
>> t = TestForm({'s': 'ha'})
>> t.is_valid()
True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment