summaryrefslogtreecommitdiff
path: root/tests/custom_columns/models.py
diff options
context:
space:
mode:
authorLoic Bistuer <loic.bistuer@gmail.com>2014-09-23 01:07:30 +0700
committerLoic Bistuer <loic.bistuer@gmail.com>2014-09-23 03:56:19 +0700
commitd42a45de407c7d7962aa7a2dd79f7d32b423e600 (patch)
tree0322ab45541729ecc3173b7ef8665b171c4b130f /tests/custom_columns/models.py
parent7fe554b2a3d72d0142e5c9e97efbd0a672c2d790 (diff)
Merged custom_columns_regress into the custom_columns test package.
Diffstat (limited to 'tests/custom_columns/models.py')
-rw-r--r--tests/custom_columns/models.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/custom_columns/models.py b/tests/custom_columns/models.py
index df1e743be9..6126183ca9 100644
--- a/tests/custom_columns/models.py
+++ b/tests/custom_columns/models.py
@@ -23,6 +23,7 @@ from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Author(models.Model):
+ Author_ID = models.AutoField(primary_key=True, db_column='Author ID')
first_name = models.CharField(max_length=30, db_column='firstname')
last_name = models.CharField(max_length=30, db_column='last')
@@ -36,8 +37,10 @@ class Author(models.Model):
@python_2_unicode_compatible
class Article(models.Model):
+ Article_ID = models.AutoField(primary_key=True, db_column='Article ID')
headline = models.CharField(max_length=100)
authors = models.ManyToManyField(Author, db_table='my_m2m_table')
+ primary_author = models.ForeignKey(Author, db_column='Author ID', related_name='primary_set', null=True)
def __str__(self):
return self.headline