Vue  delimiters are configurable  too!
@scaffold <https://github.com/web2py/scaffold>/static 
<https://github.com/web2py/scaffold/tree/master/static>/js 
<https://github.com/web2py/scaffold/tree/master/static/js>/main-vue.js: 
row#23 Vue.config.delimiters = ['${', '}'] - it's global default config

so, you shouldn't change web2py delimiters, just try ${message} instead 
{{message}}


On Friday, January 27, 2017 at 6:07:56 PM UTC+3, John Philip wrote:
>
> Hi Richard,
>
> no luck. I modified the view:
>
> response.delimiters = ('{[', ']}')
> <div id="app">
>   <p>{{message}}</p>
> </div>
>
> <h1>This is the default/vgrid.html template</h1>
> {[=BEAUTIFY(response._vars)]}
> <script src="https://unpkg.com/vue/dist/vue.js";></script>
>
> I also returned empty var in the controller as you suggested but when 
> loading the view I still get {{message}}. I have no idea why? ;(
>
> thanks again,
>
> John
>
>
>
> On Friday, January 27, 2017 at 3:20:38 PM UTC+1, Richard wrote:
>>
>> Ok, first try to leave layout.html out of the way... remove the first 
>> line... It should work so far, but consider you always better put the js at 
>> the bottom of the page for faster page load and improve parsing as the js 
>> come later (after the dom) anyway...
>>
>> Do you have a controllers function for the view you try to serve? If yes 
>> do you return an empty vars :
>>
>> def view():
>>     response.delimiters = ('{[', ']}')
>>     return dict(empty_vars='')
>>
>> It makes sure web2py serve something.
>>
>> Try to set response.delimiters in you view at first too...
>>
>> Good luck
>>
>> Richard
>>
>>
>> On Fri, Jan 27, 2017 at 3:23 AM, 'John Philip' via web2py-users <
>> web...@googlegroups.com> wrote:
>>
>>> Hi Richard,
>>>
>>> thanks for your reply. I'm did change the delimiter as you described in 
>>> the model. I changed the delimiters in all of the html files in view. 
>>> response.delimiters = ('{[',']}'. I have a snippet from the vuejs 
>>> website. However when loading the view it does not seem to recognise 
>>> {{message}}. Any help would be appreciated!! 
>>>
>>> thanks,
>>>
>>> John
>>>
>>> {[extend 'layout.html']}
>>> <script src="https://unpkg.com/vue/dist/vue.js";></script>
>>>
>>> <script>
>>> new Vue({
>>>   el: '#app',
>>>   data: {
>>>     message: 'Hello Vue.js!'
>>>   }
>>> })</script>
>>>
>>> <div id="app">
>>>   <p>{{message}}</p>
>>> </div>
>>>
>>> <h1>This is the default/vgrid.html template</h1>
>>> {[=BEAUTIFY(response._vars)]}
>>>
>>> On Thursday, January 26, 2017 at 4:38:54 PM UTC+1, Richard wrote:
>>>>
>>>> Do you use the web2py layout.html?
>>>>
>>>> Did you set proper web2py delimiters?
>>>>
>>>> http://web2py.com/books/default/chapter/29/05/the-views#The-views
>>>>
>>>> Vue.JS use {{}} as web2py you need to change web2py delimiters, I like 
>>>> (so it stays readable) :
>>>>
>>>> response.delimiters = ('{[',']}')
>>>>
>>>>
>>>> Richard
>>>>
>>>>
>>>> On Thu, Jan 26, 2017 at 10:26 AM, 'John Philip' via web2py-users <
>>>> web...@googlegroups.com> wrote:
>>>>
>>>>> Hi Massimo,
>>>>>
>>>>> I downloaded your scaffolding app but for some reason in the main.html 
>>>>> file vuejs does not seem to recognize ${doc.title} and ${doc.body} . Am I 
>>>>> missing something?
>>>>>
>>>>> thanks and regards,
>>>>>
>>>>> John
>>>>>
>>>>> On Sunday, September 25, 2016 at 5:25:51 AM UTC+2, Massimo Di Pierro 
>>>>> wrote:
>>>>>
>>>>>> I am becoming a huge fan of vue.js. Any other user here?
>>>>>>
>>>>> -- 
>>>>> 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 web2py+un...@googlegroups.com.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>> -- 
>>> 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 web2py+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to