[web2py] Re: Many connections to one db

2015-12-03 Thread Niphlod
no, you can't . every DAL connection needs to have defined the tables you need to interact with. On Thursday, December 3, 2015 at 11:24:07 PM UTC+1, Piotr Róż wrote: > > Hello everyone, > > I'm developing an application where I need to separate rest api functions > from other standard www appli

[web2py] Re: DAL equivalent of Field1 * 2 as MyComputedField

2015-12-03 Thread Massimo Di Pierro
x = db.MyDatabase.Value*2 rows = db(db.MyDatabase.Value).select(x) print rows[0][x] On Thursday, 3 December 2015 16:24:14 UTC-6, Henk Hendricks wrote: > > Hello All, > > Is there a DAL equivalent of "(Field1 * 2) as MyComputedField", which > possible in sqlite? > I've trouble addressing the fie

[web2py] Re: In grid , how to choose in which table we add, when we have a query?

2015-12-03 Thread Massimo Di Pierro
When you click on [add] it makes a create form. Do you want to replace the form with something else? If you simply want to change the name of the table in the breadcrumbs you do: db.define_table('t_meal_week_month',, singular = 'Meal of the week', plural = 'Meals') On Thursday, 3 Decemb

[web2py] Re: defer query in controller

2015-12-03 Thread Anthony
On Thursday, December 3, 2015 at 5:37:51 PM UTC-5, Brian Craft wrote: > > I don't know what this means. > He's saying to load a parent page (that does not run the query or return any data), and once the parent page has loaded, then request the data via Ajax. > Also, I can't find docs for LOAD

[web2py] Re: defer query in controller

2015-12-03 Thread Brian Craft
I don't know what this means. Also, I can't find docs for LOAD(). On Thursday, December 3, 2015 at 2:23:54 PM UTC-8, Massimo Di Pierro wrote: > > yes and no. You need a controller that returns tha page and then you need > to request the data via ajax or via a LOAD(... ajax=True) helper. > > On

[web2py] DAL equivalent of Field1 * 2 as MyComputedField

2015-12-03 Thread Henk Hendricks
Hello All, Is there a DAL equivalent of "(Field1 * 2) as MyComputedField", which possible in sqlite? I've trouble addressing the fields in my queries with computations in them. While toying with computations in my DAL queries, I came across the following particularity: These generate an err

[web2py] Many connections to one db

2015-12-03 Thread Piotr Róż
Hello everyone, I'm developing an application where I need to separate rest api functions from other standard www application functions on database permissions level. This means that I want to create: - normal database user for standard cases - http requests - first (main) DAL object (db); - sp

[web2py] In grid , how to choose in which table we add, when we have a query?

2015-12-03 Thread Ahmed Saidi
Hi , I m new in web2py and im trying to understand why when I click on the add button in the grid , it shows the t_meal_week form How i can change this to show t_meal_week_month here is my code query = ((db.t_meal_week.id == db.t_meal_week_month.week_id ) & (db.t_meal_week_month.

[web2py] Re: defer query in controller

2015-12-03 Thread Massimo Di Pierro
yes and no. You need a controller that returns tha page and then you need to request the data via ajax or via a LOAD(... ajax=True) helper. On Thursday, 3 December 2015 15:33:04 UTC-6, Brian Craft wrote: > > A large query is causing the client (browser) to become unresponsive, > because web2py d

[web2py] Re: disabling date selection from widget

2015-12-03 Thread Massimo Di Pierro
I do not think the provided calendar.js supports this, only minYear and maxYear. You may have to use a different calendar js. The validators handle it but that is not reflected in the UI. On Tuesday, 1 December 2015 03:55:29 UTC-6, Manuele wrote: > > Hi! > I'd like to disable selection of date

[web2py] defer query in controller

2015-12-03 Thread Brian Craft
A large query is causing the client (browser) to become unresponsive, because web2py doesn't return anything to the client until the controller function has completed. It needs, instead, to return a chunked response header immediately, with the data to follow. From the controller I can return a

Re: [web2py] web2py and page load time showing to end user

2015-12-03 Thread Richard Vézina
First link pretty interresting... Now I need a howto... :) Richard On Thu, Dec 3, 2015 at 1:51 PM, Anthony wrote: > Anything you do in Python on the server will not tell you how long the > user waited for the page to arrive at and be fully rendered in the browser > -- it will only tell you how

Re: [web2py] web2py and page load time showing to end user

2015-12-03 Thread Anthony
Anything you do in Python on the server will not tell you how long the user waited for the page to arrive at and be fully rendered in the browser -- it will only tell you how long web2py took to generate its response. If you want the full time from the original request leaving the browser until

[web2py] Re: unrecoverable internal error

2015-12-03 Thread Robin Manoli
Seems like web2py can't write to its errors folder. It needs to be able to write at least to errors, sessions and cache. Den torsdag 27 september 2012 kl. 14:42:31 UTC+2 skrev Hassan Alnatour: > > Dear ALL ,, > > When i try to login i keep getting this page : > > Internal errorTicket issued: unr

[web2py] Re: Fancytree lazyload

2015-12-03 Thread Henk huisman
> > Solved the issue. > I found a post on http://salesforce.stackexchange.com/questions/41917/trying-to-implement-lazy-loading-with-fancytree It appeared that the format of the items in the

[web2py] web2py and page load time showing to end user

2015-12-03 Thread Richard
Hello, Is web2py track page load time somehow, so I can just pick it up this value and display page load time to end user? If not what could be a good way to monitor page load and display the page load time in every view without degrading the performance too much? I think about this : # In mo

Re: [web2py] Re: Changing Bootstrap Navbar to light background colour

2015-12-03 Thread Manuele Pesenti
Il 03/12/15 11:32, Leonel Câmara ha scritto: > I don't mean in the css file, I mean in layout.html where you have > > | > > | > > > > Just remove navbar-inverse. I tryied recentrly but with a bad result... I think I'll try the solution of Chris. Thanks for sharing Manuele -- Resources: - ht

[web2py] Re: Seeing SQL Create Statements

2015-12-03 Thread Rob N
Hi Stifan, That's brilliant! Many thanks, Rob. On Tuesday, December 1, 2015 at 11:41:43 PM UTC, 黄祥 wrote: > > there is sql.log file in databases folder of your applications, or you can > simply looking in the appadmin as well (near models) > > best regards, > stifan > > On Wednesday, December

[web2py] Re: Changing Bootstrap Navbar to light background colour

2015-12-03 Thread Leonel Câmara
I don't mean in the css file, I mean in layout.html where you have Just remove navbar-inverse. -- 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 re