[web2py] Re: database queries

2019-04-24 Thread learthurjoly
Thank you dave for those answers. I don’t have a lot of time at the moment to move forward on this as I would like, but I will take your comments into account as I move forward. I’ll keep you informed. Thank you again Arthur! Le mercredi 17 avril 2019 00:17:25 UTC+2, Dave S a écrit : > > > > O

[web2py] Re: record representation format that refer to another table and that table is refer to another table

2019-04-24 Thread Ray (a.k.a. Iceberg)
I know I'm late to the party, but I have to write to thank Anthony for sharing such a wonderful trick! One more thing, I happen to also discover that we do not have to use lambda. The following form is less verbose, more intuitive. db.define_table('room', Field('room_no'), Field('catego

[web2py] Re: How to create js function before web2py.js send data to server?

2019-04-24 Thread Константин Комков
It's a good instrument for web2py take developers validate form on client. Maybe add it in web2py? -- 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 r

[web2py] Hiding menu when on a certain page

2019-04-24 Thread mostwanted
Is there a way to hide menu entirely when in a certain page? I know when I wanna hide menu before login its MENU if auth.is_logged_in (): response.menu = [options ] else: response.menu = [] but i wanna be able to hide menu when i go to another page. Regards; Mostwanted -- Res

[web2py] Re: Unable to edit grid record if I add @auth.requires_signature() to action. Is this normal?

2019-04-24 Thread Anthony
> > My though in replacing the @auth.requires_login() with > @auth.requires_signature() (I believe @auth.requires_signature() also > requires login, correct?) was adding another security layer, but with the > limitation you explained, I think I will not do it. > What is your opinion on this? >

[web2py] ExporterCSV fails if virtual field included in fields=[... in SQLFORM.grid

2019-04-24 Thread dgmanns
my SQLFORM.grid includes a virtual field in fields[]. Displays perfectly in the grid, but CSV button using (ExporterCSV, ...) fails (I'm using web2py 2.18.5 Python 2.7): Ticket ID 127.0.0.1.2019-04-24.11-28-41.edaaa1f3-2035-4402-bc95-4ff9a74097fb 'Name' Version web2py™ Version 2.18.5-stable+

[web2py] Re: How to create js function before web2py.js send data to server?

2019-04-24 Thread Dave S
On Wednesday, April 24, 2019 at 5:25:00 AM UTC-7, Константин Комков wrote: > > It's a good instrument for web2py take developers validate form on client. > Maybe add it in web2py? > Client-side validation has value, but the server should never trust data that is client-side validated ... too

[web2py] Re: How to create js function before web2py.js send data to server?

2019-04-24 Thread Константин Комков
I use two validation (client and server). Web2py has good mechanism, which block submit button and change text with considering translate another languages. I need validate form when button was pushed and in that case I can't use onblur, becouse web2py.js has own handler on that button. It's whe

[web2py] Re: Hiding menu when on a certain page

2019-04-24 Thread 黄祥
perhaps can use conditonal if to check the controller or the function *e.g.* if not 'test' in request.controller and request.function == 'index' : response.menu = [options ] else: response.menu = [] best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (

Re: [web2py] Re: Web2py binaries

2019-04-24 Thread Nico Zanferrari
Hello, I'm happy to say that I've gained the Win version, too! So, now we have a working web2py binary made with PyInstaller with python 3.7.3 or 2.7.16 - for MacOs or Windows. Also, the current web2py version (2.18.5) should be easily updated in the future by changing the gluon folder inside th

[web2py] Re: Duplicates in SQLgrid

2019-04-24 Thread Jacob
Thank you this was very helpful and pointed me in the right direction! On Monday, April 15, 2019 at 7:42:24 PM UTC+1, João Matos wrote: > > My bad. distinct only works in select. But a grid doesn't accept a select > only a query. > > I see 3 options: > 1. Don't use the grid and you can use the di

[web2py] Radio Buttons basic inline editing in SQLFORM.grid

2019-04-24 Thread Jacob
Hello I'm still new to web2py and I'm currently working on an a grid which utilises basic inline editing using the example from http://www.web2pyslices.com/slice/show/1928/basic-inline-editing-in-sqlformgrid-no-plugin-no-javascript When I change the options widget to a radio widget for some r

[web2py] How to build onvalidation routine for unique within location

2019-04-24 Thread Jim S
Give the following table: db.define_table('brix_test', Field('id', 'id', readable=False), Field('site', 'reference site', requires=IS_IN_DB(self.db, 'site', '%(siteNumber)s - %(name)s', zero='..')), Field('mixer_tech', '

[web2py] Re: Hiding menu when on a certain page

2019-04-24 Thread mostwanted
thanks Stifan On Wednesday, April 24, 2019 at 8:50:27 PM UTC+2, 黄祥 wrote: > > perhaps can use conditonal if to check the controller or the function > *e.g.* > if not 'test' in request.controller and request.function == 'index' : > response.menu = [options ] > else: > response.menu =