here is the code : 
*models/db.py*
def __after_insert_test(f, id):
row_test = db(db.test.id == id).iterselect().first()
mail_to = f['email']
subject = 'Data test Created'
messages = response.render('templates/mail/test_1.html', 
  dict(row_test = row_test) )

db.mail_queue.insert(mail_to = mail_to, 
subject = subject, 
messages = messages)

db.define_table('test', 
Field('first_name'), 
Field('last_name'), 
Field('email', 'list:string'), 
format = lambda r: '%s %s' % (r.first_name, r.last_name) )

db.test._after_insert.append(__after_insert_test)

*views/templates/mail/test_1.html*
...
<table id = 'header-left'>
<tbody>
<tr>
...
</tr>
<!-- 
</tbody> 
</table> 
<table id = 'header-right'> 
<tbody> 
-->
<tr>
...
</tr>
</tbody>
</table>
...

right now my solution is remove the html comment in 
views/templates/mail/test_1.html but i want to have the html comment in 
there for future notes

thanks and best regards,
stifan

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to