You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TurboGears, mark.mch...@gmail.com
Hi Mark,
Please may you be kind enough to detail how one would setup turbogears
to use mako.
Thank you so much for the assistance.
Regards
charles
casibbald
unread,
Jun 22, 2008, 8:01:47 AM6/22/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TurboGears
Instructions for working with Mako on Turbogears.
Step 1:
Edit <project>myfirstproject/config/app.cfg
add:
mako.directories = ["."]
Step 2:
Edit controller.py
add:
@expose('mako:myfirstproject.templates.private')
# Template will be located in <project>/templates/
# name as follows: pagename.mak
# within templates refer to static content with:
../static/css/stylesheet.css
def private(self):
return dict(a='foo')
Step 3:
Create: <project>/templates/private.mak
insert "hello world" and start Turbogears
Step 4:
Test your mako template at the following url
http://<servername>:8080/private
You should get your "hello world" message in your browser window.
Again thanks mark for helping me get this working.