diff options
| author | Marko Tibold | 2012-10-30 00:03:24 +0100 |
|---|---|---|
| committer | Marko Tibold | 2012-10-30 00:03:24 +0100 |
| commit | 6ccbdd10ad91bbc2116c6adf520096e9da95b8e0 (patch) | |
| tree | 4d46e728e7f0a15207832b8354cb31610cf1e48c /rest_framework/tests/models.py | |
| parent | b6c90c0d684cd036a2ce874fd9ace7a8a2bfda2f (diff) | |
| download | django-rest-framework-6ccbdd10ad91bbc2116c6adf520096e9da95b8e0.tar.bz2 | |
Adding failing tests that show null=True model fields are won't validate if their value is omitted.
Diffstat (limited to 'rest_framework/tests/models.py')
| -rw-r--r-- | rest_framework/tests/models.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rest_framework/tests/models.py b/rest_framework/tests/models.py index ac73a4bb..fb23e359 100644 --- a/rest_framework/tests/models.py +++ b/rest_framework/tests/models.py @@ -116,3 +116,8 @@ class BlogPost(RESTFrameworkModel): class BlogPostComment(RESTFrameworkModel): text = models.TextField() blog_post = models.ForeignKey(BlogPost) + + +class Person(RESTFrameworkModel): + name = models.CharField(max_length=10) + age = models.IntegerField(null=True, blank=True) |
