diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-09-27 05:57:10 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-09-27 05:57:10 +0000 |
| commit | 6c7cf34d691ffe9ac2c9a7be8d2838b205ace757 (patch) | |
| tree | 76ae4fab2793bb112e02c197ec5a30642f23abcd /tests/regressiontests/modeladmin | |
| parent | edabc4aca1d5f8ff081bbc0c94ad8eb6bcad28e9 (diff) | |
Fixed #9171 -- Fixed a few places where we were assuming lists instead of
generic sequences in ModelForm structures. Patch from mrmachine.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9086 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/modeladmin')
| -rw-r--r-- | tests/regressiontests/modeladmin/models.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/regressiontests/modeladmin/models.py b/tests/regressiontests/modeladmin/models.py index f7526ab3dd..3a7d3f031f 100644 --- a/tests/regressiontests/modeladmin/models.py +++ b/tests/regressiontests/modeladmin/models.py @@ -123,6 +123,14 @@ displayed because you forgot to add it to fields/fielsets >>> ma = BandAdmin(Band, site) >>> ma.get_form(request).base_fields.keys() ['name', 'sign_date'] + +# You can also pass a tuple to `exclude`. + +>>> class BandAdmin(ModelAdmin): +... exclude = ('bio',) +>>> ma = BandAdmin(Band, site) +>>> ma.get_form(request).base_fields.keys() +['name', 'sign_date'] # Using `fields` and `exclude`. |
