thank you so much for your detail explaination and example miguel, i'm
really appreciate it. i'll follow what you n massimo suggest to put the
logic in the controlller. should i change it for example in the example
before.
e.g.
from :
=== view ===
{{for i, row in enumerate(rows):}}
   {{if i == items_per_page: break}}

   {{db.blog_comment.blog_id.default = row.id}}
   {{form = crud.create(db.blog_comment,
                        message = T('Record Inserted'))}}

   {{=DIV(form)}}
{{pass}}

into :
=== controller ===
def blog_index():
    for i, row in enumerate(rows):
       if i == items_per_page: break

       db.blog_comment.blog_id.default = row.id
       form = crud.create(db.blog_comment,
                            message = T('Record Inserted'))
    return dict (form, rows.id, rows.title, rows.content)

please give an advice, thanks

Reply via email to