aboutsummaryrefslogtreecommitdiffstats
path: root/tests/models.py
diff options
context:
space:
mode:
authorTom Christie2014-08-19 16:16:02 +0100
committerTom Christie2014-08-19 16:16:02 +0100
commit5358243ca5e35dcb28ce96175c4f8f58504513aa (patch)
treed717e4cb77089b3190ab79c82bec1fa34e8c8c8d /tests/models.py
parent390061bed0991892dfa6c9b953fffc1bd15564a9 (diff)
parent06b6b96f933088ba36d4c98e13893274f29bed6a (diff)
downloaddjango-rest-framework-5358243ca5e35dcb28ce96175c4f8f58504513aa.tar.bz2
Merge pull request #1778 from linovia/bugfix/1398
Bugfix/1398
Diffstat (limited to 'tests/models.py')
-rw-r--r--tests/models.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/tests/models.py b/tests/models.py
index fba3f8f7..fe064b46 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):
@@ -172,10 +184,3 @@ class NullableOneToOneSource(RESTFrameworkModel):
class BasicModelSerializer(serializers.ModelSerializer):
class Meta:
model = BasicModel
-
-
-# Models to test filters
-class FilterableItem(models.Model):
- text = models.CharField(max_length=100)
- decimal = models.DecimalField(max_digits=4, decimal_places=2)
- date = models.DateField()