form = FORM()
makes a form but you are making a form that contains no 
input/select/texarea/buttons.

form.add_button('Click', URL ('first'))
adds a button after the submit button in the previous form, but that form 
does not have a submit button.

If you really want a form, you should put something in the form:

form = FORM(INPUT(_type=Submit")
form.add_button('Click', URL ('first'))

or do not use a form but, for example, a DIV

form = DIV()
form.append(A('Click', _href=URL ('first')))



On Saturday, 2 August 2014 12:58:04 UTC-5, [email protected] wrote:
>
> Good evening, I just started learning this fremvork because questions may 
> seem childish, but still. 
> task: 
> Create a jump button (just to another page) 
>
> My solution, I wrote a similar code kontoroller
>  
> def index (): 
>      form = FORM () 
>      form.add_button ('Click', URL ('first')) 
>      return dict (form = form) 
> the error is 
>
> AttributeError: 'NoneType' object has no attribute 'parent'
>
> Although the official documentation of such a method is listed as a way 
> to create simple buttons. I would be grateful for your help
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to