Re: [web2py] Re: How do I view text on view.html

2014-06-17 Thread Maurice Waka
Thanks! it works! On Mon, Jun 16, 2014 at 6:32 PM, LoveWeb2py atayloru...@gmail.com wrote: If you want to get 'Victor' in a view you could do something simple like: Controller: def name_return(): name = 'Victor' return dict(name=name) view name_return.html: {{extend

[web2py] Re: How do I view text on view.html

2014-06-16 Thread Anthony
This doesn't look anything like typical web2py code. I would recommend that you read some of the book and follow the typical patterns and then come back with questions if you're having trouble. In general, though, note that you won't be using the print statement to display anything in HTML

[web2py] Re: How do I view text on view.html

2014-06-16 Thread LoveWeb2py
On Monday, June 16, 2014 6:08:55 AM UTC-4, Maurice Waka wrote: My code: class Person(): name = 'Victor' def say(self, what): print(self.name, what) getattr(person, attr_name) How do I display 'Victor' on web2py html.view? I tried using: {{=getattr(person,

[web2py] Re: How do I view text on view.html

2014-06-16 Thread LoveWeb2py
If you want to get 'Victor' in a view you could do something simple like: Controller: def name_return(): name = 'Victor' return dict(name=name) view name_return.html: {{extend 'layout.html'}} {{=name}} -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] Re: How do I view text on view.html

2014-06-16 Thread Carlos Costa
I guess you need to familiarize yourself more with not just with web2py but also with web development, right? Anthony is right, you should read web2py book at www.web2py.com/book, at least the first chapters to get a start. At first you need to understand MVC. For example you may have: in db.py