[web2py] onvalidation error for nonSQLFORM but request.vars

2016-07-09 Thread lucas
hey everyone, under the onvalidation function, i can add errors for fields that are not directly generated from an SQLFORM but from client side jQuery side. but those fields are correctly still coming to the server, not through the SQLFORM but under request.vars. how do i get the little red b

[web2py] Re: how to limit query fields for grid

2016-07-09 Thread Alex Glaros
am still not understanding a couple of the concepts the grid query is result of join so I assume I run one of these [setattr] lines for each table that needs to have fields non-readable? The below code doesn't remove unwanted fields query = ((db.strategic_goal.transparency_level_fk == 1) & (d

[web2py] running web2py module from terminal takes long time

2016-07-09 Thread 黄祥
i have a code : *controllers/install.py* import test_install_insert def index(): if db(db.auth_permission).isempty() and db(db.auth_membership).isempty(): test_install_insert session.flash = T('Installation Done') redirect(URL('default', 'index') ) *modules/test_install.py* import sys; sys.path

[web2py] AppConfig compatibility with previous versions

2016-07-09 Thread Marlysson Silva
Module AppConfig using appconfig.ini from private folder it's compatible with backaward versions that don't using this feature? Because I was used AppConfig and version of web2py shown that __init__ of Auth() don't use more of one argument; -- Resources: - http://web2py.com - http://web2py.com

[web2py] Re: how to limit query fields for grid

2016-07-09 Thread Anthony
On Saturday, July 9, 2016 at 4:07:43 PM UTC-4, Alex Glaros wrote: > > sorry, forgot to state that I tried the "fields = " parm which worked, > but then the extra, unwanted fields were visible from the default search > dropdown. Am I stuck having to write a long list of ".readable = False"? > Yes

[web2py] Re: running web2py module from terminal return AttributeError: 'thread._local' object has no attribute '

2016-07-09 Thread 黄祥
Thank you so much Anthony, it works well now. Best Regards, stifan -- 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

[web2py] Re: how to limit query fields for grid

2016-07-09 Thread Alex Glaros
sorry, forgot to state that I tried the "fields = " parm which worked, but then the extra, unwanted fields were visible from the default search dropdown. Am I stuck having to write a long list of ".readable = False"? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - h

[web2py] Re: how to handle boolean's tri states?

2016-07-09 Thread Alfonso Serra
> > Actually, the API for creating a custom field type is > http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Custom-Field-types--experimental-. > > Note, it isn't documented, but SQLCustomType also takes "validator", > "represent", "widget", and "_class" arguments,

[web2py] Re: running web2py module from terminal return AttributeError: 'thread._local' object has no attribute '

2016-07-09 Thread Anthony
If you want to run a Python script in a web2py environment, you must use web2py.py with command line arguments: python web2py.py -S yourapp -M -R /path/to/your/script.py If you don't create the web2py execution environment as above, the current object will not include the typical web2py API obj

[web2py] Re: how to limit query fields for grid

2016-07-09 Thread Anthony
It's in the book (hint, it's the second argument). On Saturday, July 9, 2016 at 4:57:12 AM UTC-4, Alex Glaros wrote: > > can someone please remind me of syntax for limiting fields in query for > grid? >

[web2py] Re: how to limit query fields for grid

2016-07-09 Thread Alex Glaros
the purpose is to reduce the amount of data that brought over, and reduce the number of .readable = False lines in controller for fields not wanted -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com

[web2py] how to limit query fields for grid

2016-07-09 Thread Alex Glaros
can someone please remind me of syntax for limiting fields in query for grid? Below correctly works to create SQL query, not data query = db((db.strategic_goal.transparency_level_fk == 1) & (db.strategic_goal.organization_fk == db.Organization.id))._select(db.strategic_goal.strategic_goal_titl