web2py delimiters conflict with vue.jsz

29 views
Skip to first unread message

Craig Matthews

unread,
Jun 4, 2019, 2:20:30 PM6/4/19
to web2py-users
I am currently running web2py Version 2.14.6-stable+timestamp.2016.05.10.00.21.47.

Even though that is old, it is meeting my needs.

I am currently learning vue.js and hoping to include it in my offerings.

The obvious problem is that both web2py and vue.js use "{{" and "}}" as delimiters in their templates.

Is there a single place in web2py that I can change this to something else?

In web2py\gluon\globals.py there is:
class Response(Storage):
and within the __init__ there is:
self.delimiters = ('{{', '}}')

Could this be the place?

黄祥

unread,
Jun 4, 2019, 2:32:00 PM6/4/19
to web2py-users
another way around perhaps can use response.delimiter 
ref:

best regards,
stifan

Anthony

unread,
Jun 4, 2019, 2:32:51 PM6/4/19
to web2py-users
See response.delimiters at http://web2py.com/books/default/chapter/29/04/the-core#response. You can set it in a model file to apply to all views, or within a particular controller or view to apply to a specific view.

Anthony
Reply all
Reply to author
Forward
0 new messages