mdipierro
unread,Sep 8, 2010, 10:45:19 AM9/8/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py-users
I just implemented arbitrary delimiters in web2py trunk. Now you can
do in a controller:
def render(filename,**variables):
context = globals()
context.update(variables)
from gluon.template import render
return
render(filename=os.path.join(request.folder,'views',filename),
path=os.path.join(request.folder,'views'),
context=context,delimiters=('{%','%}'))
def index():
return render('default/index.html',message='hello world')
and in default/index.html:
{%=message%}
This is very new (5 mins ago) so give it a try and let me know if it
works for you.
Not sure it is a good idea. Not sure it should stay. Not sure it works
100%.
Anyway, share your thoughts.
Massimo