Put ParseEmote in the same controller and just call it like this:

      {{=ParseEmote(shout.Shout)}}

If you want the function available to all views, put it in a model file.

If you want to get fancy, you could implement a virtual field:
http://web2py.com/book/default/chapter/06#Virtual-Fields

At some point you will probably want to change how you do this since this 
creates a database query for each and every row: 
{{=db.auth_user[shout.created_by].first_name}}

Instead, you could do just one "join" query in the controller.

Reply via email to