thanx to all for your suggestions , anthony i have tried your method but i 
am getting error like this:

*ValueError: dictionary update sequence element #0 has length 1; 2 is required*


On Saturday, September 7, 2013 12:15:53 PM UTC-7, Anthony wrote:
>
>
>
> On Saturday, September 7, 2013 6:50:32 AM UTC-4, kranthi aeronaut wrote:
>>
>> some please help me , i am using web2py for simple addition of 2 numbers 
>> application , i have created a function called "calc" in default.py and 
>> wrote the following code in it
>>
>> *def calc():*
>> *    answer=request.vars.a+request.vars.b*
>> *    return dict(answer)*
>> *
>> *
>> i created a file called default/add.html & wrote following code in it:
>> *
>> *
>> <html>
>> <form action="calc" method="POST">
>>
>
> You action is a relative URL (i.e., just "calc"), so the browser simply 
> adds that on to the URL of the current page -- so that form is getting 
> posted to /yourapp/default/add/calc instead of /yourapp/default/calc. You 
> should instead use the URL() function to generate the proper URL for you:
>
> <form action="{{=URL('default', 'calc')}}" method="post">
>
> Anthony
>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to