summaryrefslogtreecommitdiff
path: root/tests/shared_models/models.py
diff options
context:
space:
mode:
authorFlorian Apolloner <florian@apolloner.eu>2013-06-10 12:22:40 +0200
committerFlorian Apolloner <florian@apolloner.eu>2013-06-10 12:22:40 +0200
commitf5d4849cbeda994e7d2e43c4aaf2aac69d5c95bb (patch)
tree7fee22d3c4cbe27a0f8302ff4283b66d74d9c8a9 /tests/shared_models/models.py
parentdfcce4288ac6887e9995c48f2fde38f555cec03e (diff)
Revert "Began implementing a shared set of test models to speed up tests."
This reverts commit 22b7870e40a3ecf022b423de6cd867dcb35a6940.
Diffstat (limited to 'tests/shared_models/models.py')
-rw-r--r--tests/shared_models/models.py17
1 files changed, 5 insertions, 12 deletions
diff --git a/tests/shared_models/models.py b/tests/shared_models/models.py
index 145edad1bf..61b3669bc4 100644
--- a/tests/shared_models/models.py
+++ b/tests/shared_models/models.py
@@ -1,5 +1,3 @@
-from __future__ import unicode_literals
-
from django.db import models
from django.utils import timezone
from django.utils.encoding import python_2_unicode_compatible
@@ -11,11 +9,7 @@ class Tag(models.Model):
@python_2_unicode_compatible
class Author(models.Model):
- name = models.CharField(max_length=100, help_text='Use both first and last names.',
- unique=True)
-
- class Meta:
- ordering = ['name']
+ name = models.CharField(max_length=100)
def __str__(self):
return self.name
@@ -23,15 +17,14 @@ class Author(models.Model):
@python_2_unicode_compatible
class Book(models.Model):
- title = models.CharField(max_length=200)
+ name = models.CharField(max_length=200)
pages = models.IntegerField(default=0)
- author = models.ForeignKey(Author, null=True, blank=True)
+ author = models.ForeignKey(Author, null=True)
pubdate = models.DateTimeField()
tags = models.ManyToManyField(Tag)
class Meta:
- ordering = ['-pubdate', 'title']
- unique_together = ['title', 'author']
+ ordering = ['-pubdate', 'name']
def __str__(self):
- return self.title
+ return self.name