Oct 28
Django newforms file upload
There are several places documenting that to get newforms working with file uploads, you have to do something like this (where NewformsClass is, you guessed it, a newforms class):
new_data = request.POST.copy()
new_data.update(request.FILES)
form = NewformsClass(new_data)
This is now out-of-date, and has been simplified to the following:
form = NewformsClass(request.POST, request.FILES)
Much neater.
I've disabled comments for now due to spam problems - I'll turn them back on when I've fixed it!