Taken direct from the lulu manual.

controllers/default.py

def index():

    images=db().select(db.image.ALL, orderby=db.image.title)
    return dict(images=images)


default/index.html
{{extend 'layout.html'}}

{{try:}}{{=H2(message)}}{{except:}}{{=BEAUTIFY(response._vars)}}
{{pass}}<br />
{{=H1('Current Images')}}{{pass}}<br />

<ul>
{{for image in images:}}
{{=LI(A(image.title, _href=URL(r=request,f="show", args=
[image.id])))}} {{pass}}
</ul>


Here's a picture of the results. http://yfrog.com/0z20090523160159s1280x800p

The one on the left is from the book, the one on the right is what I
got.

It appears to me that the code in defaut.py index()  causes the
display of the text, but I thought that codes in that portion of your
application is only meant to process logical stuff.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to