mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-09 08:00:52 +03:00
Abstract out the app_label on test models
This commit is contained in:
parent
bcd2caf559
commit
f8edfa2675
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user