Opened 17 years ago
Closed 17 years ago
#5316 closed (invalid)
newforms issue form_for_model() got an unexpected keyword argument 'fields'
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Forms | Version: | 0.96 |
Severity: | Keywords: | new forms form_for_model() got an unexpected keyword argument 'fields' | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
i have an issue with newforms for some reason i can create a form from a model
but when it try to create a subset of form using following code
UForm = forms.form_for_model(User, fields=('firstName', 'lastName')) UserForm=UForm() return render_to_response('test.html', {'form': UserForm})
i get the following error
form_for_model() got an unexpected keyword argument 'fields'
i have 0.96 installed i'm not sure if there is a patch for it
Note:
See TracTickets
for help on using tickets.
Fields was added post-0.96. The section in the documentation on specifying a fields argument to form_for_model states that this feature is new in the development version.