aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/tests/models.py
diff options
context:
space:
mode:
authorTom Christie2012-10-22 15:00:56 -0700
committerTom Christie2012-10-22 15:00:56 -0700
commit5d76f03ac6f4937aa4f52d43ddb8d014ff632780 (patch)
treec7bd774f5c5c69a69510f99999dc00fe1fe53905 /rest_framework/tests/models.py
parentb7d11cbc57db2155a4436599d65bbc307adbb2dd (diff)
parentc7a0d52fd7e22fbc4a01ff900bd3b2c1215e984d (diff)
downloaddjango-rest-framework-5d76f03ac6f4937aa4f52d43ddb8d014ff632780.tar.bz2
Merge pull request #315 from Roarster/emptymanytomany
#314 Fix for manytomany field being required in the payload even though ...
Diffstat (limited to 'rest_framework/tests/models.py')
-rw-r--r--rest_framework/tests/models.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/rest_framework/tests/models.py b/rest_framework/tests/models.py
index 8e721737..97cd0849 100644
--- a/rest_framework/tests/models.py
+++ b/rest_framework/tests/models.py
@@ -62,7 +62,12 @@ class CallableDefaultValueModel(RESTFrameworkModel):
class ManyToManyModel(RESTFrameworkModel):
rel = models.ManyToManyField(Anchor)
+
+class ReadOnlyManyToManyModel(RESTFrameworkModel):
+ text = models.CharField(max_length=100, default='anchor')
+ rel = models.ManyToManyField(Anchor)
+
# Models to test generic relations