Re: problem : create form

2010-08-04 Thread Kenneth Gonsalves
On Wed, 2010-08-04 at 02:09 -0700, Jagdeep Singh Malhi wrote: > > Why do you think you would get any SQL with that? You're creating a > > form, not a model. > ok > I also want to store the value in database using form. make a model - use ModelForm - or just plain form > > Now what i can do? > any

Re: problem : create form

2010-08-04 Thread Kenneth Gonsalves
On Wed, 2010-08-04 at 01:19 -0700, Jagdeep Singh Malhi wrote: > i use command for create application > #python manage.py startapp form > > after this a use this code in model.py file > > from django import forms > > class ContactForm(forms.Form): > subject = forms.CharField(max_length=100) >

Re: problem : create form

2010-08-04 Thread Paulo Almeida
If possible, the easiest way would be to create a form based on a model (subclass ModelForm). When you save the form the values will be stores in the appropriate database fields. To answer your final question, the 4 part tutorial I mentioned covers that. - Paulo On Wed, Aug 4, 2010 at 10:09 AM,

Re: problem : create form

2010-08-04 Thread Jagdeep Singh Malhi
> > Why do you think you would get any SQL with that? You're creating a > form, not a model. ok I also want to store the value in database using form. Now what i can do? any tutorial of that? -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: problem : create form

2010-08-04 Thread Paulo Almeida
Hi, SQL is created for models, not for forms. Maybe you should try following the tutorial first (it's near the top of the Django documentation page), and then move to other documentation for the specifics. - Paulo On Wed, Aug 4, 2010 at 9:19 AM, Jagdeep Singh Malhi wrote: > i follow these docu

Re: problem : create form

2010-08-04 Thread Daniel Roseman
On Aug 4, 9:19 am, Jagdeep Singh Malhi wrote: > i follow these documentation for create form > > http://docs.djangoproject.com/en/dev/topics/forms/ > > i use command for create application > #python manage.py startapp form > > after this a use this code in model.py file > > from django import form