Re: Forms questions

2015-09-22 Thread 'Tom Evans' via Django users
On Tue, Aug 25, 2015 at 6:10 PM, Hugo Kitano wrote: > > Here it is, very simple: > > Submit form: > > {% csrf_token %} > {{ form.as_p }} > > > Read this section of the manual, particularly the section starting "Firstly, ...". The problems yo uare having are

Re: Forms questions

2015-09-19 Thread Martin Torre Castro
If there's a file in the form data, I'm no expert but I have fought a little with forms and files and I advise you to look in the internet for multipart forms and file inputs inside forms. On Tuesday, 25 August 2015 21:12:46 UTC+2, Hugo Kitano wrote: > > I've realized that the action field in

Re: Forms questions

2015-08-25 Thread Hugo Kitano
I've realized that the action field in the form should be "/stats/submit/", the same view as the one that sent me to the template. However, whenever I submit with the form then, it tells me that the file I submit is missing, even when it is definitely there. On Tuesday, August 25, 2015 at

Re: Forms questions

2015-08-25 Thread Hugo Kitano
Here it is, very simple: Submit form: {% csrf_token %} {{ form.as_p }} On Monday, August 24, 2015 at 4:31:47 PM UTC-7, Sait Maraşlıoğlu wrote: > > Can you provide the template code? > > > On Tuesday, 25 August 2015 00:16:40 UTC+3, Hugo Kitano wrote: >> >> Hi, I'm trying to

Re: Forms questions

2015-08-24 Thread Sait Maraşlıoğlu
Can you provide the template code? On Tuesday, 25 August 2015 00:16:40 UTC+3, Hugo Kitano wrote: > > Hi, I'm trying to figure out what's wrong with my form: > > I've noticed that every time I load my submit view, the request.method is > GET not POST, so nothing gets saved to the database. > > >

Forms questions

2015-08-24 Thread Hugo Kitano
Hi, I'm trying to figure out what's wrong with my form: I've noticed that every time I load my submit view, the request.method is GET not POST, so nothing gets saved to the database. Here's views.py models.py Thanks!! -- You received this message because you are subscribed to the Google

Re: Forms Questions

2010-12-22 Thread Łukasz Rekucki
On 22 December 2010 22:27, hank23 wrote: > I've been going through a lot of the forms related documentation and > some things are still not clear, partly because of information > overload. > First do I have to code/generate my forms using my models? No, forms can be used

Re: Forms Questions

2010-12-22 Thread ringemup
> First do I have to code/generate my forms using my models? No. Model forms are basically a shortcut to the very common use case of creating a form to update or save a single model object. With regular forms, you just have to explicitly declare your form fields instead of counting on the

Forms Questions

2010-12-22 Thread hank23
I've been going through a lot of the forms related documentation and some things are still not clear, partly because of information overload. First do I have to code/generate my forms using my models? If not then if I code my form from scratch will it still have all or most of the background