[web2py] Re: info: represent when IS_IN_SET multiple is set to True

2018-07-25 Thread rāma
Obsoleted by Anthony's answer: https://groups.google.com/d/msg/web2py/pY36w84ovgQ/lA5vepMRBgAJ On Wednesday, 25 July 2018 12:29:32 UTC+8, rāma wrote: > > Just to share with everyone for a record here. Tried searching and > couldn't find anything easily. > > If you're using the T function for tra

Re: [web2py] Re: Sum/Total of the column values in SQLFROM.grid?

2018-07-25 Thread sandeep patel
Thanks to all for your support @Anthony, I have done this way!! That provie all values sum which is having in grid. #controller.py grid = SQLFROM.grid(query,..,...) a = grid.__dict__ b = sum([int(i.number_of_bags) for i in a['dbset'].select()]) Please, Let let me know if any other way to do that

[web2py] Re: Scheduler migrate=True doesn't recreate tables

2018-07-25 Thread Anthony
On Wednesday, July 25, 2018 at 3:19:33 PM UTC-4, Ur. Kr. wrote: > > I have dropped the tables relating to the scheduler from the old database > because I moved to a newer version of web2py. I want the scheduler to > create the new tables it needs. > If you drop a table and want web2py to re-crea

[web2py] Re: Sum/Total of the column values in SQLFROM.grid?

2018-07-25 Thread Anthony
On Wednesday, July 25, 2018 at 5:41:26 PM UTC-4, Anthony wrote: > > On Wednesday, July 25, 2018 at 3:49:09 PM UTC-4, pbreit wrote: >> >> How about JavaScript? >> >> >> https://www.oreilly.com/library/view/javascript-cookbook/9781449390211/ch04s07.html >> > > Having the database do it is most effici

[web2py] Re: Sum/Total of the column values in SQLFROM.grid?

2018-07-25 Thread Anthony
On Wednesday, July 25, 2018 at 3:49:09 PM UTC-4, pbreit wrote: > > How about JavaScript? > > > https://www.oreilly.com/library/view/javascript-cookbook/9781449390211/ch04s07.html > Having the database do it is most efficient -- you neither have to get all the data from the database into the Pytho

[web2py] Re: Dealing with reserved keywords when you change or upgrade your database from SQLite to POSTGRES

2018-07-25 Thread Anthony
On Wednesday, July 25, 2018 at 3:36:58 PM UTC-4, pbreit wrote: > > ...or Anthony! > > Thanks, that's good info and reassuring. > > Safe to assume little/no downside to always double-quoting? > It's the default behavior of web2py now, so hopefully not. -- Resources: - http://web2py.com - http://

[web2py] Re: Sum/Total of the column values in SQLFROM.grid?

2018-07-25 Thread pbreit
How about JavaScript? https://www.oreilly.com/library/view/javascript-cookbook/9781449390211/ch04s07.html -- 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) ---

[web2py] Re: Scheduler migrate=True doesn't recreate tables

2018-07-25 Thread Ur. Kr.
Web2py\gluon\scheduler.py The commit under the if around line 878 does run. On Wednesday, July 25, 2018 at 9:19:33 PM UTC+2, Ur. Kr. wrote: > > I have dropped the tables relating to the scheduler from the old database > because I moved to a newer version of web2py. I want the scheduler to > crea

[web2py] Re: Dealing with reserved keywords when you change or upgrade your database from SQLite to POSTGRES

2018-07-25 Thread pbreit
...or Anthony! Thanks, that's good info and reassuring. Safe to assume little/no downside to always double-quoting? -- 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 I

[web2py] Re: Scheduler migrate=True doesn't recreate tables

2018-07-25 Thread Ur. Kr.
I have dropped the tables relating to the scheduler from the old database because I moved to a newer version of web2py. I want the scheduler to create the new tables it needs. On Wednesday, July 25, 2018 at 8:29:05 PM UTC+2, Anthony wrote: > > On Wednesday, July 25, 2018 at 1:33:24 PM UTC-4, Ur

[web2py] Re: Scheduler migrate=True doesn't recreate tables

2018-07-25 Thread Anthony
On Wednesday, July 25, 2018 at 1:33:24 PM UTC-4, Ur. Kr. wrote: > > > scheduler = Scheduler(db, migrate=True) > This doesn't recreate tables for me when I rerun the scheduler and the > application. > Have the tables already been created once? If so, they will not be re-created. What are you try

[web2py] Re: Dealing with reserved keywords when you change or upgrade your database from SQLite to POSTGRES

2018-07-25 Thread Anthony
See also https://groups.google.com/d/msg/web2py/lPcl3CrfnDs/J0zqHf8DAwAJ. On Wednesday, July 25, 2018 at 2:23:58 PM UTC-4, Anthony wrote: > > On Wednesday, July 25, 2018 at 1:54:56 PM UTC-4, pbreit wrote: >> >> I feel like I've heard before that we no longer need to worry about >> reserved words

[web2py] Re: Dealing with reserved keywords when you change or upgrade your database from SQLite to POSTGRES

2018-07-25 Thread Anthony
On Wednesday, July 25, 2018 at 1:54:56 PM UTC-4, pbreit wrote: > > I feel like I've heard before that we no longer need to worry about > reserved words which would be awesome. I'm going to try that on my projects > and see if I run into any issues. > > Is this something that Massimo or Giovanni c

[web2py] Re: CAS provider Logout Issue

2018-07-25 Thread fiubarc
Hello! I have the same problem with cas logout...any thoughts? Thanks! El jueves, 31 de marzo de 2016, 17:03:49 (UTC-3), Franz Pietz escribió: > > Hello, > > I am using CAS to manage login in my application, with the following > structure: > MainApp -> Main Application > App1 and App2 -> Secon

[web2py] Re: Dealing with reserved keywords when you change or upgrade your database from SQLite to POSTGRES

2018-07-25 Thread pbreit
I feel like I've heard before that we no longer need to worry about reserved words which would be awesome. I'm going to try that on my projects and see if I run into any issues. Is this something that Massimo or Giovanni could confirm? -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Scheduler migrate=True doesn't recreate tables

2018-07-25 Thread Ur. Kr.
scheduler = Scheduler(db, migrate=True) This doesn't recreate tables for me when I rerun the scheduler and the application. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: How to force an update to the scheduler schema

2018-07-25 Thread Ur. Kr.
scheduler = Scheduler(db, migrate=True) Doesn't recreate tables for me when I rerun the scheduler. On Tuesday, May 23, 2017 at 8:03:13 PM UTC+2, Dave S wrote: > > > > On Tuesday, May 23, 2017 at 5:30:08 AM UTC-7, Brad Miller wrote: >> >> Due to a forced migration to new hardware/os on webfaction,

[web2py] Re: Dealing with reserved keywords when you change or upgrade your database from SQLite to POSTGRES

2018-07-25 Thread Anthony
On Wednesday, July 25, 2018 at 8:51:26 AM UTC-4, Rahul wrote: > > Hi Anthony, pbreit, >The following line of code works just fine for *rname*. I was able > to save *state*, *date*, *module*, *notify *etc in the database table as > field names. Although I will make it a practice to use di

[web2py] Re: Dealing with reserved keywords when you change or upgrade your database from SQLite to POSTGRES

2018-07-25 Thread Rahul
Hi Anthony, pbreit, The following line of code works just fine for *rname*. I was able to save *state*, *date*, *module*, *notify *etc in the database table as field names. Although I will make it a practice to use different field names than those reserved/unreserved for future projects.

Re: [web2py] Re: Issues getting web2py to work.

2018-07-25 Thread Ben Duncan
Thanks, Figured that out late yesterday. I've gone ahead and purchased the book "web2py complete reference manual - 5th edition". I've pretty much decided that web2py will be our framework for the criminal accounting system for our state supreme court. Anyway, I will probably have LOTS and LOTS of

[web2py] Re: SQLFORM widget IS_IN_SET translation

2018-07-25 Thread Anthony
You can specify labels associated with the values of an IS_IN_SET validator in one of three ways: values = ['list', 'of', 'values'] # As a dictionary in {value: label, ...} form: IS_IN_SET({value: T(value) for value in values}) # As a list of tuples in (value, label) form: IS_IN_SET([(value, T(