Re: [web2py] Re: standalone templates

2019-01-28 Thread Carlos Cesar Caballero Díaz
Nothing, but I was looking for a way that the user could directly call render and pass his own arguments and render the template with some objects passed to the environment by default. But don't worry, now I have included the possibility to use more than one template engine, so I will make

Re: [web2py] Re: standalone templates

2019-01-28 Thread Anthony
On Monday, January 28, 2019 at 8:45:53 AM UTC-5, Carlos Cesar Caballero wrote: > > Hi Antony, Thanks. I am experimenting with the Massimo idea of a bottle > based framework using web2py components, And I was looking if there was an > equivalent of the jinja2 "Environment.globals". The code is

Re: [web2py] Re: Dont allow delete specific records in grid

2019-01-28 Thread Carlos Cesar Caballero Díaz
Thanks a lot Antony, that's exactly what I need. Greetings. El 28/1/19 a las 8:22 a.m., Anthony escribió: You might find this helpful: https://stackoverflow.com/a/54200430/440323 Note, using the deletable argument in this case could be a bit inefficient because it will need to do a database

Re: [web2py] Re: standalone templates

2019-01-28 Thread Carlos Cesar Caballero Díaz
Hi Antony, Thanks. I am experimenting with the Massimo idea of a bottle based framework using web2py components, And I was looking if there was an equivalent of the jinja2 "Environment.globals". The code is in https://github.com/daxslab/ron Greetings. El 28/1/19 a las 8:16 a.m., Anthony

[web2py] Re: Dont allow delete specific records in grid

2019-01-28 Thread Anthony
You might find this helpful: https://stackoverflow.com/a/54200430/440323 Note, using the deletable argument in this case could be a bit inefficient because it will need to do a database select for each row in the grid to determine if there are any children. I suppose you could instead do a

[web2py] Re: standalone templates

2019-01-28 Thread Anthony
Can you show some code or describe in more detail what you are trying to do? If you are using the render() function from gluon.template, note that it takes a context argument, which is a dictionary used to generate an execution environment. You can do: ENV = { 'var1': 'value 1',