Re: form problem

2009-10-18 Thread Michael P. Jung
> I made the change but now the following error appears: > 'QueryDict' object is not callable Whops. request.GET is a query dict, so it's of course not callable. I ment to call get('user_text', '') on the request.GET: request.GET.get('user_text', '') --mp --~--~-~--~~-

Re: form problem

2009-10-18 Thread A_Swtos
I made the change but now the following error appears: 'QueryDict' object is not callable On Oct 18, 6:43 pm, "Michael P. Jung" wrote: > First of all may I recommend you to use Django forms: > > http://docs.djangoproject.com/en/dev/topics/forms/ > > > With this method i have the following erro

Re: form problem

2009-10-18 Thread Michael P. Jung
First of all may I recommend you to use Django forms: http://docs.djangoproject.com/en/dev/topics/forms/ > With this method i have the following error: > Key 'user_text' not found in >> def view(request): >> user_text = request.GET['user_text'] >> return render_to_reponse("html",

Re: form problem

2009-10-18 Thread A_Swtos
With this method i have the following error: Key 'user_text' not found in What should i change or add to my code? On Oct 18, 5:40 pm, Rama Vadakattu wrote: > Simple Capture the form variable and send it to another template > > def view(request): >      user_text = request.GET['user_text'] >  

Re: form problem

2009-10-18 Thread Rama Vadakattu
Simple Capture the form variable and send it to another template def view(request): user_text = request.GET['user_text'] return render_to_reponse("html",{'user_text':user_text}) --rama On Oct 18, 7:26 pm, A_Swtos wrote: > I have a form like this: > > > Text: >     maxlength="20"

form problem

2009-10-18 Thread A_Swtos
I have a form like this: Text: The user can type into the form whatever wants.If i press the button 'submit' i want to go to a page where it appears what i wrote before. Is this possible without saving it into a database? What is the code that you propose? Im new in django and i would l

Re: jquery ajax form problem--Can't render template variables

2009-06-10 Thread Malcolm MacKinnon
Thanks Alex. I'll give it a try. I appreciate your comments. On Wed, Jun 10, 2009 at 5:49 AM, Alex Robbins wrote: > > I haven't used that form plugin before, but from the documentation it > looks like the problem is this line: > target:"#new", > http://malsup.com/jquery/form/#options-object > Yo

Re: jquery ajax form problem--Can't render template variables

2009-06-10 Thread Alex Robbins
I haven't used that form plugin before, but from the documentation it looks like the problem is this line: target:"#new", http://malsup.com/jquery/form/#options-object You are asking jQuery to jam the whole response in, just like you are seeing. What happens if you take that line out? It looks lik

jquery ajax form problem--Can't render template variables

2009-06-09 Thread Mac
I'm new to programming and can't figure out how to properly render the {{comment}} and {{username}} variables in the element below using jquery and the ajax form plugin. Everything posts to the database just as it should. However, I want to show what gets posted in the template after submission.

Re: Strange widget and form problem

2009-05-12 Thread Karen Tracey
On Mon, May 11, 2009 at 8:25 AM, timc3 wrote: > > I have just updated to trunk and now I get a problem... OK, after looking at this a little more closely I'm not sure your shell session is accurately re-creating whatever problem your real code is encountering. I also see an error in your form

Re: Strange widget and form problem

2009-05-11 Thread timc3
> [snip] > > "Just updated to trunk" doesn't actually tell us what level you are at.  I > know there was very recently (within the last couple of hours) a fix made > for a recent bug introduced in upload file handling.  I do not not if you > are running with that fix or not. > > So first, make sur

Re: Strange widget and form problem

2009-05-11 Thread Karen Tracey
On Mon, May 11, 2009 at 8:25 AM, timc3 wrote: > > I have just updated to trunk and now I get a problem uploading files > into a filefield so I did an interactive session in shellplus and got > the following: > [snip] "Just updated to trunk" doesn't actually tell us what level you are at. I know

Strange widget and form problem

2009-05-11 Thread timc3
I have just updated to trunk and now I get a problem uploading files into a filefield so I did an interactive session in shellplus and got the following: In [1]: from testsite.media.forms import MediaObjectForm In [2]: d = {u'path': "my test image.png"} In [3]: f = MediaObjectForm(d) In [4]: f

Re: custom form problem...

2009-05-06 Thread NicoEchániz
On May 6, 10:47 am, NicoEchániz wrote: > On May 6, 8:57 am, Daniel Roseman > wrote: > > On May 6, 5:26 am, NicoEchániz wrote: > > > Hello, > > > > I have a model which has a ForeignKey to itself. I'm doing this to > > > represent a hierarchy which I then need to display in the > > > correspondi

Re: custom form problem...

2009-05-06 Thread NicoEchániz
On May 6, 8:57 am, Daniel Roseman wrote: > On May 6, 5:26 am, NicoEchániz wrote: > > Hello, > > > I have a model which has a ForeignKey to itself. I'm doing this to > > represent a hierarchy which I then need to display in the > > corresponding select field of my form. >[] > > You can find t

Re: custom form problem...

2009-05-06 Thread Daniel Roseman
On May 6, 5:26 am, NicoEchániz wrote: > Hello, > > I have a model which has a ForeignKey to itself. I'm doing this to > represent a hierarchy which I then need to display in the > corresponding select field of my form. > > I've come up with a simple custom Form which represents my select > choice

custom form problem...

2009-05-05 Thread NicoEchániz
Hello, I have a model which has a ForeignKey to itself. I'm doing this to represent a hierarchy which I then need to display in the corresponding select field of my form. I've come up with a simple custom Form which represents my select choices like this: - level0.a level0.a > level1.a l

Re: Simple Dynamic Form Problem

2009-03-13 Thread Jacob Kaplan-Moss
On Fri, Mar 13, 2009 at 12:04 PM, Alex G wrote: > I knew it was going to be something like this.  I'm sorry to have > troubled you :-/. No worries at all. `super()` confuses the hell out of me, too :) Jacob --~--~-~--~~~---~--~~ You received this message because

Re: Simple Dynamic Form Problem

2009-03-13 Thread Alex G
/sigh I knew it was going to be something like this. I'm sorry to have troubled you :-/. Thank you, JKM. On Mar 12, 9:31 pm, Jacob Kaplan-Moss wrote: > On Wed, Mar 11, 2009 at 11:30 AM,Alex G wrote: > > > Having referencedhttp://www.b-list.org/weblog/2008/nov/09/dynamic-forms/, > > I set abou

Re: Simple Dynamic Form Problem

2009-03-12 Thread Jacob Kaplan-Moss
On Wed, Mar 11, 2009 at 11:30 AM, Alex G wrote: > > Having referenced http://www.b-list.org/weblog/2008/nov/09/dynamic-forms/, > I set about in an attempt to make a dynamic form through a simple > change to __init__, but not all is well... > [snip] > .        super(RFSInputForm, self).__init__(se

Simple Dynamic Form Problem

2009-03-11 Thread Alex G
Having referenced http://www.b-list.org/weblog/2008/nov/09/dynamic-forms/, I set about in an attempt to make a dynamic form through a simple change to __init__, but not all is well... My code is simply: .class RFSInputForm(forms.Form): .def __init__(self, rfs, *args, **kwargs): #test init to

My uppload form problem?

2008-01-24 Thread makkalot
Hi all i use django 0.96.1 version and i'm trying to upload file to server. Actually that is not the problem here my dropdown menus gone crazy :) I got an error that i have not entered a valid choice ! I have did that operation hundred times i can not understand whats wron! Here is my code htt