[web2py] Re: make your app name show first

2017-01-03 Thread 黄祥
in python anywhere console Copy routes to web2py folders cp web2py/examples/routes.parametric.example.py web2py/routes.py edit default_application='welcome' into or whatever application you want default_application='jbtus', go to web2py admin page and hit "reload routes" button best regards, sti

[web2py] how to make a set object from a list object

2017-01-03 Thread Alex Glaros
is this correct way to make a set object from a list object? all_roles = db(db.Role.id.belongs(aggregateRoleData)).select(db.Role.ALL) here is the set aggregateRoleData: [22L, 23L, 24L, 25L, 26L, 320L, 321L, 230L, 138L, 139L, 140L, 141L, 213L, 143L, 144L, 145L, 147L, 148L, 12L, 13L, 14L, 15L, 1

[web2py] Re: make your app name show first

2017-01-03 Thread David Shavers
I hadn't tried that previously, but after you recommended it. Tried it and it was still the same result. Also, my app is named JBTUS and that's the name that i used in routes.py as well. Should it be lower case? On Tuesday, January 3, 2017 at 5:50:32 PM UTC-6, 黄祥 wrote: > > had you already hit

[web2py] Re: make your app name show first

2017-01-03 Thread 黄祥
had you already hit "reload routes" button in web2py admin app? 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 me

[web2py] Re: make your app name show first

2017-01-03 Thread David Shavers
I posted this: routers = dict( BASE = dict( default_application='MyApp', ) ) into routes.py that i created in Applications/web2py/. I changed MyApp to the name of my app and i also am hosted on python anywhere. i saved the file and reloaded my domain bye pressing the green

Re: [web2py] Re: make your app name show first

2017-01-03 Thread David Shavers
Thanks! That was exaclty what i was looking for! but what if i have multiple web2py websites? For instance, one app will be on jbtus.com and Another app will have a domain of jbtus2.com Should i just copy the whole web2py program and make two different routes.py? On Tuesday, January 3, 2017

Re: [web2py] Re: homebrew python not working with web2py

2017-01-03 Thread Mark Graves
Those are the best kinds of bugs =) Happy New Year On Tuesday, January 3, 2017 at 9:11:31 AM UTC-6, lyn2py wrote: > > It is working now. O.O Sorry for the noise and thank you for your time > Mark. > > I blew a fuse in the house and then it worked. Prior to that I restarted > the computer and it

[web2py] Re: DAL how to select only rows of a string column of only a specified length, or minimum or maximum?

2017-01-03 Thread Anthony
db((db.mytable.myfield.len() >= lower) & (db.mytable.myfield.len() <= upper )).select() Anthony On Tuesday, January 3, 2017 at 8:32:19 AM UTC-5, lucas wrote: > > hey one and all, > > how to select only rows of a string column of only a specified length, or > minimum or maximum length? > > thanx

[web2py] Re: Problem while integrating Sweet Alert with web2py in a component

2017-01-03 Thread Anthony
The browser's DOM inspector will show the DOM within each component once it has loaded -- just right-click on any element within the component and choose "Inspect element" to jump to that point in the inspector (perhaps you were instead using "View source", which simply shows the source code of

[web2py] Re: Problem while integrating Sweet Alert with web2py in a component

2017-01-03 Thread Bernardo Leon
When using the component in isolation everything works fine (the parameters are passed fine) but I have this problem when running the parent page that LOADs several instances of this component. I have printed the values of vuelo.id and preorden_vuelo.pedido on my template and, while they are pr

[web2py] Re: DAL how to select only rows of a string column of only a specified length, or minimum or maximum?

2017-01-03 Thread Dave S
On Tuesday, January 3, 2017 at 5:32:19 AM UTC-8, lucas wrote: > > hey one and all, > > how to select only rows of a string column of only a specified length, or > minimum or maximum length? > > thanx in advance, lucas > How would you do it in SQL? /dps -- Resources: - http://web2py.com - htt

[web2py] Re: URL in flash

2017-01-03 Thread 'Annet' via web2py-users
Hi Dave, Thanks for your reply. > Wrap the A() with a CAT() ? > > I had to wrap the whole message in CAT() response.flash = CAT('Please contact admin to report the issue using the ', A('contact form', _href=URL('init', 'util', 'contactform'))) Kind regards, Annet -- Resources: - http://

[web2py] Re: How to add Expression as (Virtual) Field to grid?

2017-01-03 Thread Anthony
On Tuesday, January 3, 2017 at 1:37:34 AM UTC-5, Jurgis Pralgauskis wrote: > > Hi, > > I guess, SQLFORM.grid is in sqlhtml.py, so this is not pydal stuff? > https://github.com/web2py/pydal/search?utf8=%E2%9C%93&q=grid > > so I submitted to web2py repo > https://github.com/web2py/web2py/issues/155

[web2py] Re: grid exportclasses not work in recent version

2017-01-03 Thread Anthony
On Tuesday, January 3, 2017 at 11:02:22 AM UTC-5, Andrea Fae' wrote: > > What does it mean exactly? > > I have this but in the view export is exposed totally... why? > What do you mean "export is exposed totally"? What problem are you having? -- Resources: - http://web2py.com - http://web2py.com

[web2py] Re: Problem while integrating Sweet Alert with web2py in a component

2017-01-03 Thread Anthony
Using the browser's DOM inspector, confirm that the URL in the following code has the expected value of pid: ajax('', [], target=null If so, what happens when you click the action button? Does the browser make an Ajax request to that exact URL, and does your pedir() function then receive the p

[web2py] Problem while integrating Sweet Alert with web2py in a component

2017-01-03 Thread Bernardo Leon
Hi, I have a component which has a button that performs an action when clicked but I want the user accept some terms before executing that action. I found Sweet Alert (http://t4t5.github.io/sweetalert/) so I am trying to use their confirm dialog between the click and the action. Since Sweet Aler

[web2py] Re: grid exportclasses not work in recent version

2017-01-03 Thread Andrea Fae'
What does it mean exactly? I have this but in the view export is exposed totally... why? grid = SQLFORM.smartgrid(db.sede,linked_tables=['uo'],fields=[db.sede.nome,db.uo.nome],headers={'sede.nome':'Nome Struttura'},details=True, editable=True, deletable=False, maxtextlength=40,csv=True, export

Re: [web2py] Re: homebrew python not working with web2py

2017-01-03 Thread lyn2py
It is working now. O.O Sorry for the noise and thank you for your time Mark. I blew a fuse in the house and then it worked. Prior to that I restarted the computer and it still didn't work. This is crazy and not reproducible... YMMV... On Tuesday, January 3, 2017 at 10:54:35 PM UTC+8, lyn2py w

Re: [web2py] Re: homebrew python not working with web2py

2017-01-03 Thread lyn2py
No, did not try the zip. It doesn't have to do with the release, rather it is the version of python that was installed by homebrew. I read somewhere that it is unstable, I don't know why that would be the case. While we are on the topic, did you try the python installation by homebrew? Is web2py

[web2py] DAL how to select only rows of a string column of only a specified length, or minimum or maximum?

2017-01-03 Thread lucas
hey one and all, how to select only rows of a string column of only a specified length, or minimum or maximum length? thanx in advance, lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/w

Re: [web2py] Re: homebrew python not working with web2py

2017-01-03 Thread Mark Graves
Also, under each please list the output of: import os print os.environ['PYTHONPATH'] import sys print sys.path On Tue, Jan 3, 2017 at 3:58 AM, Mark Graves wrote: > Wait wait, whats the output of > > which python > > On Tue, Jan 3, 2017 at 3:43 AM, Mark Graves wrote: > >> did you try the downl

Re: [web2py] Re: homebrew python not working with web2py

2017-01-03 Thread Mark Graves
Wait wait, whats the output of which python On Tue, Jan 3, 2017 at 3:43 AM, Mark Graves wrote: > did you try the downloaded via zip version? > > On Mon, Jan 2, 2017 at 9:01 AM, lyn2py wrote: > >> Nope :) >> >> On Monday, January 2, 2017 at 10:55:59 AM UTC+8, Mark Graves wrote: >>> >>> Is it in

Re: [web2py] Re: homebrew python not working with web2py

2017-01-03 Thread Mark Graves
did you try the downloaded via zip version? On Mon, Jan 2, 2017 at 9:01 AM, lyn2py wrote: > Nope :) > > On Monday, January 2, 2017 at 10:55:59 AM UTC+8, Mark Graves wrote: >> >> Is it in a virtual environment? >> >> -Mark >> >> On Sun, Jan 1, 2017 at 8:37 PM, lyn2py wrote: >> >>> First, it is a

[web2py] Re: URL in flash

2017-01-03 Thread Dave S
On Tuesday, January 3, 2017 at 1:32:25 AM UTC-8, Annet wrote: > > I want to add a link to a flash message, something like: > > response.flash = 'Please contact admin to report the issue using the ' + > A('contact form', _href=URL('init', 'util', 'contactform')) > > This does not work for you can

[web2py] Form field manipulation questions

2017-01-03 Thread Dave S
I have an SQLFORM where I wanted the value of field 3 to depend on the value of field 2, sort of like cascading autocompletes, but not quite. Field 3 was going to be populated with the length of the string in Field 2, so I tried adding to my view jQuery(document).ready(function(){ jQuery('

[web2py] URL in flash

2017-01-03 Thread 'Annet' via web2py-users
I want to add a link to a flash message, something like: response.flash = 'Please contact admin to report the issue using the ' + A('contact form', _href=URL('init', 'util', 'contactform')) This does not work for you cannot concatenate a string with the A helper. KInd regards, Annet -- Reso