On Sun, Mar 4, 2012 at 12:55 AM, HittingSmoke <[email protected]>wrote:

> def view():
>     postid = request.args(0) *or redirect(URL('default', 'index'))*
>     post = db(db.blogPost.id == postid).select()*.first()*
>     db.blogComment.post.default = postid
>     commentForm = SQLFORM(db.blogComment)
>     if commentForm.process().accepted:
>         response.flash = 'Comment accepted'
>     elif commentForm.errors:
>         response.flash = 'Error posting comment.'
>     return dict(post=post, commentForm=commentForm)
>



-- 

Bruno Rocha
[http://rochacbruno.com.br]

Reply via email to