mirror of
https://github.com/django/django.git
synced 2025-11-02 04:48:33 +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:
parent
5f605678f0
commit
2b5730873b
3 changed files with 76 additions and 56 deletions
|
|
@ -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 = (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue