the form is working fine now , actually my form was inside another form , that was the problem
On May 22, 6:55 pm, watad <awa...@gmail.com> wrote: > hi karen , actually im runing this code , after submit i can see all > the data inside the model ,only the filefield resume is empty , of > course when i test this i add (blank=True, null=True) to my resume > field , so why do u think the other fileds is geeting the data > submitted by the form and the resume field does not? > thanks for your replys > > On May 20, 9:13 pm, Karen Tracey <kmtra...@gmail.com> wrote: > > > > > On Wed, May 20, 2009 at 2:39 AM, watad <awa...@gmail.com> wrote: > > > > this is my form after thomas reply: > > > <form enctype="multipart/form-data" action="" method="POST" > > > > {{ form.as_p }} > > > <input type="submit" value="Submit" / > > > > </form> > > > > and this is my view after your reply : > > > > def careerspage(request): > > > if request.method == 'POST': > > > form = CareerForm(request.POST,request.FILES) > > > if form.is_valid(): > > > form.save() > > > return HttpResponseRedirect('/thanks') > > > else: > > > form = CareerForm() > > > return render_to_response('careers.html', {'form':form}) > > > > the validation for the resume upload still failing when i submit > > > im reading the link u have posted to check whats wrong another help > > > will be appriciated :) > > > If I cut-and-paste that view, that form (fixing up the oddly broken line) > > and your models from your earlier note into a test project and test out that > > view, I get a page with a form. When I actually submit a file using that > > form, I get redirected to '/thanks/', which gives me a "Page not found" > > since I didn't set up any mapping for thanks. So, somehow you are not > > actually running the code you have posted, or using the template you think > > you are. At this point you need to do the standard debugging things -- > > start putting prints in to test the value of variables, etc. What you have > > posted here does work. > > > Karen- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---