I have a django form which can be not valid, but I would like to keep the data processed with to_python() method on some fields to propose it to the user, so that he can changes wrong fields, but having already processed values for some 'good' fields.
f = MyForm(request.POST)
if f.is_valid():
# not my case
return render_to_response('template.html', form)
and request.POST {'开发者_开发问答price':'100 000', 'duration':'aaa'} is processed with to_python() to {'price':'100000', 'duration':'aaa'} and I would like to fill the form in render_to_response with this new price value (100000 and not 100 000)
精彩评论