mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06: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:
@@ -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`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user