summaryrefslogtreecommitdiff
path: root/tests/admin_validation/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/admin_validation/models.py')
-rw-r--r--tests/admin_validation/models.py57
1 files changed, 0 insertions, 57 deletions
diff --git a/tests/admin_validation/models.py b/tests/admin_validation/models.py
deleted file mode 100644
index d23849a2a8..0000000000
--- a/tests/admin_validation/models.py
+++ /dev/null
@@ -1,57 +0,0 @@
-"""
-Tests of ModelAdmin validation logic.
-"""
-
-from django.db import models
-from django.utils.encoding import python_2_unicode_compatible
-
-
-class Album(models.Model):
- title = models.CharField(max_length=150)
-
-
-@python_2_unicode_compatible
-class Song(models.Model):
- title = models.CharField(max_length=150)
- album = models.ForeignKey(Album)
- original_release = models.DateField(editable=False)
-
- class Meta:
- ordering = ('title',)
-
- def __str__(self):
- return self.title
-
- def readonly_method_on_model(self):
- # does nothing
- pass
-
-
-class TwoAlbumFKAndAnE(models.Model):
- album1 = models.ForeignKey(Album, related_name="album1_set")
- album2 = models.ForeignKey(Album, related_name="album2_set")
- e = models.CharField(max_length=1)
-
-
-class Author(models.Model):
- name = models.CharField(max_length=100)
-
-
-class Book(models.Model):
- name = models.CharField(max_length=100)
- subtitle = models.CharField(max_length=100)
- price = models.FloatField()
- authors = models.ManyToManyField(Author, through='AuthorsBooks')
-
-
-class AuthorsBooks(models.Model):
- author = models.ForeignKey(Author)
- book = models.ForeignKey(Book)
-
-
-class State(models.Model):
- name = models.CharField(max_length=15)
-
-
-class City(models.Model):
- state = models.ForeignKey(State)