aboutsummaryrefslogtreecommitdiffstats
path: root/tests/models.py
diff options
context:
space:
mode:
authorXavier Ordoquy2014-08-19 11:12:36 +0200
committerXavier Ordoquy2014-08-19 11:12:36 +0200
commitc9535c036bc65082622ecb596e6579a43d441f4d (patch)
treeb050e8d874fa4843248a7fd00422922a5fa4700b /tests/models.py
parent4876bec9f529cac69aede8e51746d8a0fd6b0d88 (diff)
parent4d45865bd73ba16801950e3f47199aa6da0f7c19 (diff)
downloaddjango-rest-framework-c9535c036bc65082622ecb596e6579a43d441f4d.tar.bz2
Merged #1398 against 2.4 branch.
Diffstat (limited to 'tests/models.py')
-rw-r--r--tests/models.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/models.py b/tests/models.py
index fba3f8f7..e378c1cf 100644
--- a/tests/models.py
+++ b/tests/models.py
@@ -60,6 +60,18 @@ class ReadOnlyManyToManyModel(RESTFrameworkModel):
rel = models.ManyToManyField(Anchor)
+class BaseFilterableItem(RESTFrameworkModel):
+ text = models.CharField(max_length=100)
+
+ class Meta:
+ abstract = True
+
+
+class FilterableItem(BaseFilterableItem):
+ decimal = models.DecimalField(max_digits=4, decimal_places=2)
+ date = models.DateField()
+
+
# Model for regression test for #285
class Comment(RESTFrameworkModel):