FileField can't re-display invalid form with File upload widget filled-in?

2009-06-24 Thread Chris Shenton
I've got an app that wants a file upload and some other attributes. If the user fills in the file but has problems with the other attributes, it should re-present the form with the attributes filled with his values, including the name of the file that he selects. In use the example below

Re: parsing data from fileupload

2009-05-18 Thread Chris Shenton
Oh, make sure your upload form specifies the 'enctype' attribute so it will actually send a file object, like: {% block content %} Upload a file... {{ form.as_p }} {% endblock %} --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: parsing data from fileupload

2009-05-18 Thread Chris Shenton
On May 18, 2009, at 12:12 PM, Patrick wrote: > > Well, I guess what I'm confused about is adding data that doesn't come > directly from forms. > I ended up doing this and it seemed to work. > > for line in file: >b=Book() >b.title=line >b.save() Here is how I do it, Model, Form,