def some_function():
response.view = 'default/my_common_view.html'
if request.function in ['myfun1', 'myfun2', 'myfun3', ...]:
response.view = 'default/my_common_view.html'
--
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/bCojfljja54/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
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 itdef calc():answer=request.vars.a+request.vars.breturn dict(answer)i created a file called default/add.html & wrote following code in it:<html><form action="calc" method="POST"><input name="a" required/><br><input name="b" required/><br><input type="submit"/></form></html>again i created another file called default/calc.html & wrote the following code:<html><h1>{{=answer}}</h1></html>now when i enter 2 numbers in text field & click submit , i am getting lots of errors & unable to get the answer , is there anything wrong in code , please help me ....
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 itdef calc():answer=request.vars.a+request.vars.breturn dict(answer)i created a file called default/add.html & wrote following code in it:<html><form action="calc" method="POST">
<form action="{{=URL('default', 'calc')}}" method="post">ValueError: dictionary update sequence element #0 has length 1; 2 is required