﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
19668	Form enhancement: `Form.set_data` to set data and files	Byron Ruth	nobody	"This simply moves the logic for setting `is_bound`, `data` and `files` into a method which enables setting the data after form initialization. This is a backwards compatible. This makes it easier to not have to initialize a form twice in view. It changes from this idiom:

{{{#!python
def view(request):
    if request.method == 'POST':
        form = Form(request.POST, request.FILES)
        ...
    else:
        form = Form()
    ...
}}}

to simply this:

{{{#!python
def view(request):
    form = Form()
    if request.method == 'POST':
        form.set_data(request.POST, request.FILES)
    ...
}}}

This reduces clutter and redundancy when there are a lot of form arguments passed."	New feature	closed	Forms	dev	Normal	wontfix			Design decision needed	1	0	1	1	0	0
