1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

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
This commit is contained in:
Ramiro Morales
2011-05-14 16:29:39 +00:00
parent 5f605678f0
commit 2b5730873b
3 changed files with 76 additions and 56 deletions

View File

@@ -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 = (