diff options
| author | Alasdair Nicol <alasdair@memset.com> | 2013-10-22 11:21:07 +0100 |
|---|---|---|
| committer | Alasdair Nicol <alasdair@memset.com> | 2013-10-23 13:45:03 +0100 |
| commit | c3aa2948c6c14862407501290571f858ccf45b07 (patch) | |
| tree | 6f0812d7db0fe2f5a6bf9e07f20ba7d442ce8789 /tests/model_forms | |
| parent | 317040a73b77be8f8210801793b2ce6d1a69301e (diff) | |
Fixed #21298 -- Fixed E301 pep8 warnings
Diffstat (limited to 'tests/model_forms')
| -rw-r--r-- | tests/model_forms/models.py | 1 | ||||
| -rw-r--r-- | tests/model_forms/tests.py | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/model_forms/models.py b/tests/model_forms/models.py index 17aec29055..37c3b37864 100644 --- a/tests/model_forms/models.py +++ b/tests/model_forms/models.py @@ -211,6 +211,7 @@ class DerivedBook(Book, BookXtra): class ExplicitPK(models.Model): key = models.CharField(max_length=20, primary_key=True) desc = models.CharField(max_length=20, blank=True, unique=True) + class Meta: unique_together = ('key', 'desc') diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py index 5388ec99d0..0ca96166bc 100644 --- a/tests/model_forms/tests.py +++ b/tests/model_forms/tests.py @@ -26,6 +26,7 @@ from .models import (Article, ArticleStatus, BetterWriter, BigInt, Book, if test_images: from .models import ImageFile, OptionalImageFile + class ImageFileForm(forms.ModelForm): class Meta: model = ImageFile @@ -208,6 +209,7 @@ class ModelFormWithMedia(forms.ModelForm): css = { 'all': ('/some/form/css',) } + class Meta: model = TextFile fields = '__all__' @@ -1722,6 +1724,7 @@ class OldFormForXTests(TestCase): class CategoryForm(forms.ModelForm): description = forms.CharField() + class Meta: model = Category fields = ['description', 'url'] |
