module render problem

11 views
Skip to first unread message

Jens Hellmeier

unread,
May 15, 2011, 11:40:33 AM5/15/11
to Tornado Web Server
Hello,
i want to render a module into my HTML template, but in the part of
the template where the module should be, stands only "<function render
at 0x88f2844>".

Jeremy Kelley

unread,
May 15, 2011, 11:48:31 AM5/15/11
to python-...@googlegroups.com
Please share a bit of code.

-j
--
The Christian ideal has not been tried and found wanting;
it has been found difficult and left untried – G. K. Chesterton

andreas schmid

unread,
May 15, 2011, 12:15:57 PM5/15/11
to python-...@googlegroups.com
it looks like ur not calling the method. you miss some () in ur code.

Jens Hellmeier

unread,
May 15, 2011, 12:36:18 PM5/15/11
to Tornado Web Server
here is the code:

class NavigationModule(tornado.web.UIModule):
def render(self):
self.render_string("NavigationTop.html")

On 15 Mai, 17:48, Jeremy Kelley <jer...@33ad.org> wrote:
> Please share a bit of code.
>
> -j
>
> On Sun, May 15, 2011 at 10:40 AM, Jens Hellmeier <jens.hellme...@t-online.de

Jens Hellmeier

unread,
May 15, 2011, 12:43:17 PM5/15/11
to Tornado Web Server
and the html:

<div class="navigation">
{{ modules.Navigation }}
</div>

Didip Kerabat

unread,
May 15, 2011, 12:48:15 PM5/15/11
to python-...@googlegroups.com
What's the template code looks like when you call the module?

- Didip -

Jens Hellmeier

unread,
May 15, 2011, 12:46:13 PM5/15/11
to Tornado Web Server
so:

<div class="navigation">
<function render at 0x9ca179c>
</div>

Adil Khashtamov

unread,
May 15, 2011, 1:16:20 PM5/15/11
to python-...@googlegroups.com
But what about "()" ?

2011/5/15 Jens Hellmeier <jens.he...@t-online.de>



--
Adil Khashtamov, http://khashtamov.kz/
cellphone: +7 701 5771577
skype: adilkhashtamov

Didip Kerabat

unread,
May 15, 2011, 1:22:17 PM5/15/11
to python-...@googlegroups.com
Shouldn't that be:

> {{ modules.NavigationModule() }}


- Didip -

Jens Hellmeier

unread,
May 15, 2011, 1:18:24 PM5/15/11
to Tornado Web Server
that was it, thanks for your help

Jeremy Kelley

unread,
May 15, 2011, 2:28:34 PM5/15/11
to python-...@googlegroups.com
Off the top of my head you need a return there too. self.render_string creates and returns a string. Otherwise I don't think youll see the output of the module.

-jeremy

Sent from my iPhone

Reply all
Reply to author
Forward
0 new messages