Abstract out the app_label on test models

This commit is contained in:
Tom Christie 2012-10-04 09:19:10 +01:00
parent bcd2caf559
commit f8edfa2675

View File

@ -28,7 +28,7 @@ from django.db import models
# 'pk': self.id # 'pk': self.id
# }) # })
class RestFrameworkModel(models.Model): class RESTFrameworkModel(models.Model):
""" """
Base for test models that sets app_label, so they play nicely. Base for test models that sets app_label, so they play nicely.
""" """
@ -37,13 +37,13 @@ class RestFrameworkModel(models.Model):
abstract = True abstract = True
class Anchor(RestFrameworkModel): class Anchor(RESTFrameworkModel):
text = models.CharField(max_length=100, default='anchor') text = models.CharField(max_length=100, default='anchor')
class BasicModel(RestFrameworkModel): class BasicModel(RESTFrameworkModel):
text = models.CharField(max_length=100) text = models.CharField(max_length=100)
class ManyToManyModel(RestFrameworkModel): class ManyToManyModel(RESTFrameworkModel):
rel = models.ManyToManyField(Anchor) rel = models.ManyToManyField(Anchor)