#8620: ModelForm.Meta.exclude only excludes model fields, not form fields
-------------------------------+--------------------------------------------
Reporter: levity | Owner: nobody
Status: new | Milestone:
Component: Forms | Version: SVN
Resolution: | Keywords:
Stage: Accepted | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------+--------------------------------------------
Comment (by marcinnowak):
1. patch should be changed a bit to avoid "NoneType is not iterable"
error.
{{{
[declared_fields.pop(f) for f in declared_fields.keys() if f not in
(opts.fields or []) or f in (opts.exclude or [])]
}}}
2. this patch needs improvement - if fields aren't set in Meta class,
overriding the default field types does not work.
--
Ticket URL: <http://code.djangoproject.com/ticket/8620#comment:4>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---