Re: [web2py] Re: For those using ractive or vuejs. I need help !!

2017-02-24 Thread António Ramos
check these
https://github.com/web2py/scaffold
https://github.com/lucadealfaro/vue_stripe_web2py_shopping_cart

2017-02-22 11:01 GMT+00:00 'John Philip' via web2py-users <
web2py@googlegroups.com>:

> Thanks Dave,
> unfortunately I still haven't managed it.
>
> regards,
>
> John
>
>
> On Tuesday, February 14, 2017 at 8:11:34 PM UTC+1, Dave S wrote:
>>
>>
>>
>> On Tuesday, February 14, 2017 at 2:55:30 AM UTC-8, John Philip wrote:
>>>
>>> Hi Ramon,
>>>
>>> since you've had experience using vuejs in web2py I thought I'd ask you.
>>> I am using a vuejs component library to display a table from a json
>>> dataset.
>>>
>>> var Main = {
>>>  data() {
>>>  return {
>>>  tableData: get_json_data_from_web2py_table
>>>  }
>>>  },
>>>  methods: {
>>>  formatter(row, column) {
>>>  return row.task;
>>>  },
>>>  filterTag(value, row) {
>>>  return row.status === value;
>>>  }
>>>  }
>>>  }
>>> var Ctor = Vue.extend(Main)
>>> new Ctor().$mount('#app')
>>> // configure language
>>> locale.use(en)
>>>
>>> my question is how can I pull the json data from the web2py database?
>>> Also similarly I would like to be able to edit/delete a record and push the
>>> changes to the web2py database. Do you have any suggestions?
>>>
>>> many thanks and regards,
>>>
>>> John
>>>
>>
>> Perhaps use the as_dict() operator
>> > ase-abstraction-layer#as_dict-and-as_list>
>> and have a dot-json view rather than a dot-html view.
>>
>> Chapter 5 covers the views, but doesn't seem to spend much time on
>> non-HTML fllavors.  You can get most of the way, maybe all the way, by
>> copying views/generic.json to your own file.
>>
>> /dps
>>
>>
>>> On Sunday, June 28, 2015 at 10:57:58 AM UTC+2, Ramos wrote:

 I dont use ractive. Only Vuejs and a template inside a script tag is
 what i learned from the docs and video tutorials.

 Is the

 
 (%name%)
 
accepted by web2py without any compilation so vue can do its job? Regards 2015-06-28 9:23 GMT+01:00 Massimo Di Pierro : > I am not sure but I think you are mixing ractive and vue syntax. > > In ractive you have a and a . The script > is rendered in the target. > > In vue (which you use), the ractive code is in place but you still use > a script instead of a div. > > Massimo > > > On Saturday, 27 June 2015 12:34:31 UTC-5, Ramos wrote: >> >> No help :) >> Im doomed... >> Em 26/06/2015 17:29, "António Ramos" escreveu: >> >>> Hello , >>> so far so good i created my second vuejs page inside web2py and this >>> time using components. >>> >>> >>> my doformind.js has some components and changes the delimiters to >>> avoid colision with curlies. >>> >>> Vue.config.delimiters = ['(%', '%)']; >>> Vue.component('pote', { >>> props: ['name','items'], >>> template: '#pote' *<- refering to the html template inside my >>> page* >>> }); >>> etc >>> >>> >>> my html ... >>> >>> >>> {{response.files.append(URL(r=request,c='static',f='/js/vue. >>> min.js'))}} >>> {{response.files.append(URL(r=request,c='static',f='/js/vue- >>> resource.min.js'))}} >>> {{response.files.append(URL(r=request,c='static',f='/js/toas >>> tr.js'))}} >>> {{response.files.append(URL(r=request,c='static',f='/js/jque >>> ry-ui.js'))}} >>> >>> *{{response.files.append(URL(r=request,c='static',f='/js/doformind.js'))}}* >>> {{response.files.append(URL(r=request,c='static',f='/css/toa >>> str.css'))}} >>> >>> *{{response.files.append(URL(r=request,c='static',f='/css/doformind.css'))}}* >>> {{extend 'layout.html'}} >>> >>> >>> >>> (%name%) >>>
>>>
    >>>
  • >> items=(%items%)>
  • >>>
>>>
>>> >>> >>> >>> >>> >>> somewhere in my page i have this component >>> >>> >>> >>> >>> >>> All of this works very well outside web2py. >>> >>> Inside web2py i get a blank page and in chrome dev tools i see that >>> >>> was translated to >>>

Re: [web2py] Re: For those using ractive or vuejs. I need help !!

2017-02-22 Thread 'John Philip' via web2py-users
Thanks Dave,
unfortunately I still haven't managed it.

regards,

John

On Tuesday, February 14, 2017 at 8:11:34 PM UTC+1, Dave S wrote:
>
>
>
> On Tuesday, February 14, 2017 at 2:55:30 AM UTC-8, John Philip wrote:
>>
>> Hi Ramon,
>>
>> since you've had experience using vuejs in web2py I thought I'd ask you. 
>> I am using a vuejs component library to display a table from a json 
>> dataset. 
>>
>> var Main = {
>>  data() {
>>  return {
>>  tableData: get_json_data_from_web2py_table
>>  }
>>  },
>>  methods: {
>>  formatter(row, column) {
>>  return row.task;
>>  },
>>  filterTag(value, row) {
>>  return row.status === value;
>>  }
>>  }
>>  }
>> var Ctor = Vue.extend(Main)
>> new Ctor().$mount('#app')
>> // configure language
>> locale.use(en)
>>
>> my question is how can I pull the json data from the web2py database? 
>> Also similarly I would like to be able to edit/delete a record and push the 
>> changes to the web2py database. Do you have any suggestions? 
>>
>> many thanks and regards,
>>
>> John
>>
>
> Perhaps use the as_dict() operator 
>  http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#as_dict-and-as_list
> >
> and have a dot-json view rather than a dot-html view.
>
> Chapter 5 covers the views, but doesn't seem to spend much time on 
> non-HTML fllavors.  You can get most of the way, maybe all the way, by 
> copying views/generic.json to your own file.
>
> /dps
>
>
>> On Sunday, June 28, 2015 at 10:57:58 AM UTC+2, Ramos wrote:
>>>
>>> I dont use ractive. Only Vuejs and a template inside a script tag is 
>>> what i learned from the docs and video tutorials.
>>>
>>> Is the
>>>
>>> 
>>> (%name%)
>>> 
>>>
    >>>
  • >> items=(%items%)>
  • >>>
>>>
>>> >>> >>> accepted by web2py without any compilation so vue can do its job? >>> >>> Regards >>> >>> 2015-06-28 9:23 GMT+01:00 Massimo Di Pierro : >>> I am not sure but I think you are mixing ractive and vue syntax. In ractive you have a and a . The script is rendered in the target. In vue (which you use), the ractive code is in place but you still use a script instead of a div. Massimo On Saturday, 27 June 2015 12:34:31 UTC-5, Ramos wrote: > > No help :) > Im doomed... > Em 26/06/2015 17:29, "António Ramos" escreveu: > >> Hello , >> so far so good i created my second vuejs page inside web2py and this >> time using components. >> >> >> my doformind.js has some components and changes the delimiters to >> avoid colision with curlies. >> >> Vue.config.delimiters = ['(%', '%)']; >> Vue.component('pote', { >> props: ['name','items'], >> template: '#pote' *<- refering to the html template inside my page* >> }); >> etc >> >> >> my html ... >> >> >> >> {{response.files.append(URL(r=request,c='static',f='/js/vue.min.js'))}} >> >> {{response.files.append(URL(r=request,c='static',f='/js/vue-resource.min.js'))}} >> {{response.files.append(URL(r=request,c='static',f='/js/toastr.js'))}} >> >> {{response.files.append(URL(r=request,c='static',f='/js/jquery-ui.js'))}} >> >> *{{response.files.append(URL(r=request,c='static',f='/js/doformind.js'))}}* >> >> {{response.files.append(URL(r=request,c='static',f='/css/toastr.css'))}} >> >> *{{response.files.append(URL(r=request,c='static',f='/css/doformind.css'))}}* >> {{extend 'layout.html'}} >> >> >> >> (%name%) >>
>>
    >>
  • > items=(%items%)>
  • >>
>>
>> >> >> >> >> >> somewhere in my page i have this component >> >> >> >> >> >> All of this works very well outside web2py. >> >> Inside web2py i get a blank page and in chrome dev tools i see that >> >> was translated to >> >> >> instead of >> >> >> 1 >> >> >> >> >> >> the items object have to elements each a json object. >> >> What could be the problem ? >> >> I suspect that the >> >>

Re: [web2py] Re: For those using ractive or vuejs. I need help !!

2017-02-14 Thread António Ramos
havent used vue since dec 2015 but it was working like a charm with
web2py...

here is my code , use it just to get some ideas...

Create a js file and place it inside static folder...


main.js


(function ($, Vue) {
String.prototype.replaceAll = function(str1, str2, ignore)
{
return this.replace(new
RegExp(str1.replace(/([\/\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|\<\>\-\&])/g,"\\$&"),(ignore?"gi":"g")),(typeof(str2)=="string")?str2.replace(/\$/g,""):str2);
}
$(document).ready(function () {
Vue.config.delimiters = ['(%', '%)'];
var resource = Vue.resource('/Vue/default/formula/:id');
new Vue({
  el: '#demo',
  data: {
observ:'',
processing:false,
formexist:[],
menuSelected:'nova',
id:0,
  dataf:'',
dev:'',
pedido:'',
  receita:{},
  formula:'',
  searchClient:'',
  aplicacao:'',
  cliente:'',
  subconta:'',
  aplicacoes:[
'Perfis Rígidos',
'Perfis Flexíveis',
'Mangueira',
'Estores',
'Garrafas',
'Perfis Porta-preços',
'Vedantes',
'Injecção plastificada',
'Fittings',
'Tubagem Saneamento',
'Tubagem Pressão'
],
cores:[
'AMARELO',
'AZUL',
'BEGE',
'BORDEAUX',
'BRANCO',
'CARAMELO',
'CARVALHO',
'CASTANHO',
'CINZENTO',
'CREME',
'CRISTAL',
'FAIA',
'LARANJA',
'MOGNO',
'NATURAL ',
'NEGRO',
'OURO',
'PRETO',
'ROSA',
'SALMÃO',
'VERDE ',
'VERMELHO ',
'VIOLETA',
],
  clientes:[],
  totalphr:0,
  cuTn:0,
  menuItems:[
{nome:'Resinas',cod:405},
{nome:'Lubrificantes',cod:430},
{nome:'Antichoque',cod:410},
{nome:'Estabilizantes',cod:415},
{nome:'Plastificantes',cod:425},
{nome:'Auxiliares',cod:420},
{nome:'Pigmentos',cod:440},
{nome:'Cargas',cod:455},
{nome:'Todos',cod:4},
{nome:'Seleccionados',cod:'selected'}
],
  picked:'none',
  list: []

  },
  computed: {
selected() {
return this.list.filter(list => list.checked=='selected');
},

},
  filters:{
  first:function(value,stop){
  return value.slice(0,stop);
  },
  numbergroup: {
 read: function (text) {
text = text.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1 ");
var t = text ;
return t;
  }
},
percgroup:{
read:function(text){
return (text*100).toFixed(6);
}

}
  },
  methods:
  {
selectFormula:function(form){
this.reset();
temp= JSON.stringify(form);
this.id=form.id;
this.dev=form.dev;
this.cliente=form.cliente;
this.formula=form.formula;
this.aplicacao=form.aplicacao;
this.status=form.status;
this.pedido=form.pedido;
this.observ=form.observ;
this.dataf=form.dataf;
this.processing=true;
this.getmp(form['recipe']);
  },
  getmp:function(mps){
 that=this;
 var promises = [];

 mps.forEach(function(mp) {
 console.log("-->",JSON.stringify(mp));
 var deferred = Q.defer();
  $.ajax({
  url : "/Vue/default/getmp.json",
  type: "POST",
  dataType:"json",
  data : { 'id' : mp['cod']
,'descr':mp['descricao'],'phr':mp['phr']},
  // headers: {'Content-Type': 'application/json'},
  success: function(data, textStatus, jqXHR)
  {
  for ( x in that.list){
  if (that.list[x].cod==mp['cod']){
  that.list[x].checked='selected';
  that.list[x].cume=data['cume'];
  that.list[x].exist=data['exist'];
  that.list[x].phr=data['phr'];
  console.log('promise calling');
  deferred.resolve(data);
  }
}
  },
  error: function (jqXHR, textStatus, errorThrown)
  {
   error(function(error){
deferred.reject();
  }

  )}});
promises.push(deferred.promise);

});
that.menuSelected="nova";
that.picked="selected";
  return Q.all(promises).then(function(data){
console.log("Q all done");
that.processing=false;
  });
},
log: function(arg) {
console.log(arg);
},
  doFab:function(id){
window.location='/Vue/default/doformind/'+id;
  },
  clickMenu:function(menu){
that=this;
this.menuSelected=menu;
if (menu=='existente'){
  toastr.warning('Aguarde!');
  that.formexist=[];
   resource.get({id: 1}, function (item, status, request) {
item['form'].forEach(function(d){
  console.log(d);
that.formexist.push(d);
});
});
   toastr.info('OK!');

}
window.location='#close';
  },
  prepareForm:function(){
  receita={};
  receita=this.receita;
receita.id=this.id;
  receita.status="draft";

  receita.subconta=this.subconta;
  receita.formula=this.formula;
  

Re: [web2py] Re: For those using ractive or vuejs. I need help !!

2017-02-14 Thread Dave S


On Tuesday, February 14, 2017 at 2:55:30 AM UTC-8, John Philip wrote:
>
> Hi Ramon,
>
> since you've had experience using vuejs in web2py I thought I'd ask you. I 
> am using a vuejs component library to display a table from a json dataset. 
>
> var Main = {
>  data() {
>  return {
>  tableData: get_json_data_from_web2py_table
>  }
>  },
>  methods: {
>  formatter(row, column) {
>  return row.task;
>  },
>  filterTag(value, row) {
>  return row.status === value;
>  }
>  }
>  }
> var Ctor = Vue.extend(Main)
> new Ctor().$mount('#app')
> // configure language
> locale.use(en)
>
> my question is how can I pull the json data from the web2py database? Also 
> similarly I would like to be able to edit/delete a record and push the 
> changes to the web2py database. Do you have any suggestions? 
>
> many thanks and regards,
>
> John
>

Perhaps use the as_dict() operator 

and have a dot-json view rather than a dot-html view.

Chapter 5 covers the views, but doesn't seem to spend much time on non-HTML 
fllavors.  You can get most of the way, maybe all the way, by copying 
views/generic.json to your own file.

/dps


> On Sunday, June 28, 2015 at 10:57:58 AM UTC+2, Ramos wrote:
>>
>> I dont use ractive. Only Vuejs and a template inside a script tag is what 
>> i learned from the docs and video tutorials.
>>
>> Is the
>>
>> 
>> (%name%)
>> 
>>
    >>
  • > pote='(%name%)' mp='(%item%)' myid=(%name%) >> items=(%items%)>
  • >>
>>
>> >> >> accepted by web2py without any compilation so vue can do its job? >> >> Regards >> >> 2015-06-28 9:23 GMT+01:00 Massimo Di Pierro : >> >>> I am not sure but I think you are mixing ractive and vue syntax. >>> >>> In ractive you have a and a . The script is >>> rendered in the target. >>> >>> In vue (which you use), the ractive code is in place but you still use a >>> script instead of a div. >>> >>> Massimo >>> >>> >>> On Saturday, 27 June 2015 12:34:31 UTC-5, Ramos wrote: No help :) Im doomed... Em 26/06/2015 17:29, "António Ramos" escreveu: > Hello , > so far so good i created my second vuejs page inside web2py and this > time using components. > > > my doformind.js has some components and changes the delimiters to > avoid colision with curlies. > > Vue.config.delimiters = ['(%', '%)']; > Vue.component('pote', { > props: ['name','items'], > template: '#pote' *<- refering to the html template inside my page* > }); > etc > > > my html ... > > > {{response.files.append(URL(r=request,c='static',f='/js/vue.min.js'))}} > > {{response.files.append(URL(r=request,c='static',f='/js/vue-resource.min.js'))}} > {{response.files.append(URL(r=request,c='static',f='/js/toastr.js'))}} > > {{response.files.append(URL(r=request,c='static',f='/js/jquery-ui.js'))}} > > *{{response.files.append(URL(r=request,c='static',f='/js/doformind.js'))}}* > > {{response.files.append(URL(r=request,c='static',f='/css/toastr.css'))}} > > *{{response.files.append(URL(r=request,c='static',f='/css/doformind.css'))}}* > {{extend 'layout.html'}} > > > > (%name%) >
>
    >
  • items=(%items%)>
  • >
>
> > > > > > somewhere in my page i have this component > > > > > > All of this works very well outside web2py. > > Inside web2py i get a blank page and in chrome dev tools i see that > > was translated to > > > instead of > > > 1 > > > > > > the items object have to elements each a json object. > > What could be the problem ? > > I suspect that the > >

Re: [web2py] Re: For those using ractive or vuejs. I need help !!

2017-02-14 Thread 'John Philip' via web2py-users
I apologize I meant Ramos...sorry typo.

On Tuesday, February 14, 2017 at 11:55:30 AM UTC+1, John Philip wrote:
>
> Hi Ramon,
>
> since you've had experience using vuejs in web2py I thought I'd ask you. I 
> am using a vuejs component library to display a table from a json dataset. 
>
> var Main = {
>  data() {
>  return {
>  tableData: get_json_data_from_web2py_table
>  }
>  },
>  methods: {
>  formatter(row, column) {
>  return row.task;
>  },
>  filterTag(value, row) {
>  return row.status === value;
>  }
>  }
>  }
> var Ctor = Vue.extend(Main)
> new Ctor().$mount('#app')
> // configure language
> locale.use(en)
>
> my question is how can I pull the json data from the web2py database? Also 
> similarly I would like to be able to edit/delete a record and push the 
> changes to the web2py database. Do you have any suggestions? 
>
> many thanks and regards,
>
> John
>
> On Sunday, June 28, 2015 at 10:57:58 AM UTC+2, Ramos wrote:
>>
>> I dont use ractive. Only Vuejs and a template inside a script tag is what 
>> i learned from the docs and video tutorials.
>>
>> Is the
>>
>> 
>> (%name%)
>> 
>>
    >>
  • > pote='(%name%)' mp='(%item%)' myid=(%name%) >> items=(%items%)>
  • >>
>>
>> >> >> accepted by web2py without any compilation so vue can do its job? >> >> Regards >> >> 2015-06-28 9:23 GMT+01:00 Massimo Di Pierro : >> >>> I am not sure but I think you are mixing ractive and vue syntax. >>> >>> In ractive you have a and a . The script is >>> rendered in the target. >>> >>> In vue (which you use), the ractive code is in place but you still use a >>> script instead of a div. >>> >>> Massimo >>> >>> >>> On Saturday, 27 June 2015 12:34:31 UTC-5, Ramos wrote: No help :) Im doomed... Em 26/06/2015 17:29, "António Ramos" escreveu: > Hello , > so far so good i created my second vuejs page inside web2py and this > time using components. > > > my doformind.js has some components and changes the delimiters to > avoid colision with curlies. > > Vue.config.delimiters = ['(%', '%)']; > Vue.component('pote', { > props: ['name','items'], > template: '#pote' *<- refering to the html template inside my page* > }); > etc > > > my html ... > > > {{response.files.append(URL(r=request,c='static',f='/js/vue.min.js'))}} > > {{response.files.append(URL(r=request,c='static',f='/js/vue-resource.min.js'))}} > {{response.files.append(URL(r=request,c='static',f='/js/toastr.js'))}} > > {{response.files.append(URL(r=request,c='static',f='/js/jquery-ui.js'))}} > > *{{response.files.append(URL(r=request,c='static',f='/js/doformind.js'))}}* > > {{response.files.append(URL(r=request,c='static',f='/css/toastr.css'))}} > > *{{response.files.append(URL(r=request,c='static',f='/css/doformind.css'))}}* > {{extend 'layout.html'}} > > > > (%name%) >
>
    >
  • items=(%items%)>
  • >
>
> > > > > > somewhere in my page i have this component > > > > > > All of this works very well outside web2py. > > Inside web2py i get a blank page and in chrome dev tools i see that > > was translated to > > > instead of > > > 1 > > > > > > the items object have to elements each a json object. > > What could be the problem ? > > I suspect that the > >

Re: [web2py] Re: For those using ractive or vuejs. I need help !!

2017-02-14 Thread 'John Philip' via web2py-users
Hi Ramon,

since you've had experience using vuejs in web2py I thought I'd ask you. I 
am using a vuejs component library to display a table from a json dataset. 

var Main = {
 data() {
 return {
 tableData: get_json_data_from_web2py_table
 }
 },
 methods: {
 formatter(row, column) {
 return row.task;
 },
 filterTag(value, row) {
 return row.status === value;
 }
 }
 }
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')
// configure language
locale.use(en)

my question is how can I pull the json data from the web2py database? Also 
similarly I would like to be able to edit/delete a record and push the 
changes to the web2py database. Do you have any suggestions? 

many thanks and regards,

John

On Sunday, June 28, 2015 at 10:57:58 AM UTC+2, Ramos wrote:
>
> I dont use ractive. Only Vuejs and a template inside a script tag is what 
> i learned from the docs and video tutorials.
>
> Is the
>
> 
> (%name%)
> 
>
    >
  • pote='(%name%)' mp='(%item%)' myid=(%name%) > items=(%items%)>
  • >
>
> > > accepted by web2py without any compilation so vue can do its job? > > Regards > > 2015-06-28 9:23 GMT+01:00 Massimo Di Pierro >: > >> I am not sure but I think you are mixing ractive and vue syntax. >> >> In ractive you have a and a . The script is >> rendered in the target. >> >> In vue (which you use), the ractive code is in place but you still use a >> script instead of a div. >> >> Massimo >> >> >> On Saturday, 27 June 2015 12:34:31 UTC-5, Ramos wrote: >>> >>> No help :) >>> Im doomed... >>> Em 26/06/2015 17:29, "António Ramos" >>> escreveu: >>> Hello , so far so good i created my second vuejs page inside web2py and this time using components. my doformind.js has some components and changes the delimiters to avoid colision with curlies. Vue.config.delimiters = ['(%', '%)']; Vue.component('pote', { props: ['name','items'], template: '#pote' *<- refering to the html template inside my page* }); etc my html ... {{response.files.append(URL(r=request,c='static',f='/js/vue.min.js'))}} {{response.files.append(URL(r=request,c='static',f='/js/vue-resource.min.js'))}} {{response.files.append(URL(r=request,c='static',f='/js/toastr.js'))}} {{response.files.append(URL(r=request,c='static',f='/js/jquery-ui.js'))}} *{{response.files.append(URL(r=request,c='static',f='/js/doformind.js'))}}* {{response.files.append(URL(r=request,c='static',f='/css/toastr.css'))}} *{{response.files.append(URL(r=request,c='static',f='/css/doformind.css'))}}* {{extend 'layout.html'}} (%name%)
somewhere in my page i have this component All of this works very well outside web2py. Inside web2py i get a blank page and in chrome dev tools i see that was translated to instead of 1 the items object have to elements each a json object. What could be the problem ? I suspect that the

Re: [web2py] Re: For those using ractive or vuejs. I need help !!

2015-06-28 Thread António Ramos
I dont use ractive. Only Vuejs and a template inside a script tag is what i
learned from the docs and video tutorials.

Is the

script type=text/x-template id=pote
span class=label label-info(%name%)/span
div
ul class=sortable-list
li v-repeat=item:items|only name macro-doses
pote='(%name%)' mp='(%item%)' myid=(%name%)
items=(%items%)/macro-doses/li
/ul
/div
/script

accepted by web2py without any compilation so vue can do its job?

Regards

2015-06-28 9:23 GMT+01:00 Massimo Di Pierro massimo.dipie...@gmail.com:

 I am not sure but I think you are mixing ractive and vue syntax.

 In ractive you have a script/ and a div id=target/. The script is
 rendered in the target.

 In vue (which you use), the ractive code is in place but you still use a
 script instead of a div.

 Massimo


 On Saturday, 27 June 2015 12:34:31 UTC-5, Ramos wrote:

 No help :)
 Im doomed...
 Em 26/06/2015 17:29, António Ramos ramstei...@gmail.com escreveu:

 Hello ,
 so far so good i created my second vuejs page inside web2py and this
 time using components.


 my doformind.js has some components and changes the delimiters to avoid
 colision with curlies.

 Vue.config.delimiters = ['(%', '%)'];
 Vue.component('pote', {
   props: ['name','items'],
   template: '#pote' *- refering to the html template inside my page*
 });
 etc


 my html ...


 {{response.files.append(URL(r=request,c='static',f='/js/vue.min.js'))}}

 {{response.files.append(URL(r=request,c='static',f='/js/vue-resource.min.js'))}}
 {{response.files.append(URL(r=request,c='static',f='/js/toastr.js'))}}
 {{response.files.append(URL(r=request,c='static',f='/js/jquery-ui.js'))}}

 *{{response.files.append(URL(r=request,c='static',f='/js/doformind.js'))}}*
 {{response.files.append(URL(r=request,c='static',f='/css/toastr.css'))}}

 *{{response.files.append(URL(r=request,c='static',f='/css/doformind.css'))}}*
 {{extend 'layout.html'}}


 script type=text/x-template id=pote
 span class=label label-info(%name%)/span
 div
 ul class=sortable-list
 li v-repeat=item:items|only name
 macro-doses pote='(%name%)' mp='(%item%)' myid=(%name%)
 items=(%items%)/macro-doses/li
 /ul
 /div
 /script


 
 
 somewhere in my page i have this component

 pote name=1 items=(%items%)/pote



 All of this works very well outside web2py.

 Inside web2py i get a blank page and in chrome dev tools i see that
 pote name=1 items=(%items%)/pote
 was translated to
 pote name=1 items=[object Object],[object Object]/pote

 instead of

 pote name=1
 span class=label label-info1/span
 div
 ul class=sortable-list ui-sortable
 /ul
 /div/pote

 the items object have to elements each a json object.

 What could be the problem ?

 I suspect that the

 script type=text/x-template id=pote
 is not being correctly interpteted.

 Any comments would be very appreciated.

 Thank you

 António

   --
 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.


-- 
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.