summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2011-05-14 16:29:39 +0000
committerRamiro Morales <cramm0@gmail.com>2011-05-14 16:29:39 +0000
commit2b5730873bd29e5bb449df5800dea610c462786a (patch)
treeffb868131d1d55de0d4983660c2b8c019e7ab752 /tests
parent5f605678f073967a4a7bae5c1e9c59fbc0ae0620 (diff)
Added ability to describe grouping of form fields in the same row to the `fields` ModelAdmin attribute.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16225 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/admin_validation/tests.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/regressiontests/admin_validation/tests.py b/tests/regressiontests/admin_validation/tests.py
index 6fbdc8040e..a80820cb67 100644
--- a/tests/regressiontests/admin_validation/tests.py
+++ b/tests/regressiontests/admin_validation/tests.py
@@ -201,7 +201,7 @@ class ValidationTestCase(TestCase):
validate,
BookAdmin, Book)
- def test_cannon_include_through(self):
+ def test_cannot_include_through(self):
class FieldsetBookAdmin(admin.ModelAdmin):
fieldsets = (
('Header 1', {'fields': ('name',)}),
@@ -212,6 +212,11 @@ class ValidationTestCase(TestCase):
validate,
FieldsetBookAdmin, Book)
+ def test_nested_fields(self):
+ class NestedFieldsAdmin(admin.ModelAdmin):
+ fields = ('price', ('name', 'subtitle'))
+ validate(NestedFieldsAdmin, Book)
+
def test_nested_fieldsets(self):
class NestedFieldsetAdmin(admin.ModelAdmin):
fieldsets = (