Reputation: 796
filefield works just fine in the admin, but in a template nothing is uploaded upon submit. the form comes back with a "required" error for the filefield.
the paths seem to be right, and if they weren't, I don't think filefield would be working in the admin.
spent hours on this and I'm stumped. I'm using trunk. Ideas?
Upvotes: 2
Views: 471
Reputation: 796
http://docs.djangoproject.com/en/dev/ref/forms/api/#binding-uploaded-files
Got it. I wasn't sending in request.FILES to the modelform constructor.
The django model reference for filefield doesn't mention special consideration for binding uploaded files to a form, but then again, I'm a total noob. Hopefully this helps someone else!
Upvotes: 1