I have recently installed web2py, so I don't think the issue is out of date 
files. I have been following the recipe in the documentation, so my code is 
as follows:

index.html:
{{extend 'layout.html'}}

{{=LOAD('comments','post.load',ajax=True)}}

post.load:
{{for post in comments:}}
<div class="post">
  On {{=post.created_on}} {{=post.created_by.first_name}}
  says <span class="post_body">{{=post.f_comment}}</span>
</div>
{{pass}}
{{=form}}
The table definition I used had f_comment in place of body for the main 
text of the comment.

comments.py:

@auth.requires_login()
def post():
    db.t_comment.f_approved.writable = False
    db.t_comment.f_approved.readable = False
    form=SQLFORM(db.t_comment).process()
    comments=db(db.t_comment).select()
    return dict(form=form,comments=comments)

Loading the page my accessing through app/comments/post.load works fine and 
the functionality is there. But when the index page loads, it never gets 
beyond "loading...". 

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to