1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

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
This commit is contained in:
Malcolm Tredinnick
2008-09-27 05:57:10 +00:00
parent edabc4aca1
commit 6c7cf34d69
4 changed files with 13 additions and 2 deletions

View File

@@ -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`.