summaryrefslogtreecommitdiff
path: root/tests/model_forms/models.py
diff options
context:
space:
mode:
authorManan <manan.yadav02@gmail.com>2018-12-10 19:58:49 +0530
committerTim Graham <timograham@gmail.com>2018-12-10 09:28:49 -0500
commit3a4558b84f76c1dbe54c8c38e90e4048c2bd3e9a (patch)
treebf0efe893cdf2207456c057c674c43ecded9c5a0 /tests/model_forms/models.py
parentf0082b9a77b76e5fe10a49474d93c3f80a30b928 (diff)
Moved choices inside of test models per coding style.
Diffstat (limited to 'tests/model_forms/models.py')
-rw-r--r--tests/model_forms/models.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/tests/model_forms/models.py b/tests/model_forms/models.py
index da4f5391c5..2c67c187cf 100644
--- a/tests/model_forms/models.py
+++ b/tests/model_forms/models.py
@@ -11,18 +11,6 @@ from django.db import models
temp_storage_dir = tempfile.mkdtemp()
temp_storage = FileSystemStorage(temp_storage_dir)
-ARTICLE_STATUS = (
- (1, 'Draft'),
- (2, 'Pending'),
- (3, 'Live'),
-)
-
-ARTICLE_STATUS_CHAR = (
- ('d', 'Draft'),
- ('p', 'Pending'),
- ('l', 'Live'),
-)
-
class Person(models.Model):
name = models.CharField(max_length=100)
@@ -51,6 +39,11 @@ class Writer(models.Model):
class Article(models.Model):
+ ARTICLE_STATUS = (
+ (1, 'Draft'),
+ (2, 'Pending'),
+ (3, 'Live'),
+ )
headline = models.CharField(max_length=50)
slug = models.SlugField()
pub_date = models.DateField()
@@ -239,6 +232,11 @@ class Triple(models.Model):
class ArticleStatus(models.Model):
+ ARTICLE_STATUS_CHAR = (
+ ('d', 'Draft'),
+ ('p', 'Pending'),
+ ('l', 'Live'),
+ )
status = models.CharField(max_length=2, choices=ARTICLE_STATUS_CHAR, blank=True, null=True)