[web2py] Re: Form field manipulation questions

2017-01-09 Thread Dave S
Now I'm trying to use jQuery("fieldx").blur(function {jQuery("fieldy").focus()}); to control which field in the form the user goes to after completing fieldx. This works great unless I try to set a blur function on fieldy; it thinks fieldy is blurring as soon as I set focus on it. Annoying, t

[web2py] Re: Form field manipulation questions

2017-01-09 Thread Dave S
On Tuesday, January 3, 2017 at 1:35:51 AM UTC-8, Dave S wrote: > > 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

[web2py] Re: Store value in input field in a table

2017-01-09 Thread Joe Lwe
Hi.. I have the same challange, did u get a solution.. if yes kindly share.. but I guess the coordinates have to be stored in location field of the table. Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https:

Re: [web2py] Selecting booleans from sqlite3 database

2017-01-09 Thread Marco Mansilla
El Mon, 9 Jan 2017 12:17:19 -0800 (PST) LoveWeb2py escribió: > Hello, > > > I'm trying to do a simple query against a sqlite3 database where the > values are stored as 0's and 1's > > All i want to do is select all values that are True or False > > According to the book this should work: > >

[web2py] Re: auth on GAE 'unable to send email'

2017-01-09 Thread David Manns
I don't agree. Other emails from elsewhere using mail.send() in the application go out just fine. This despite the 'allow insecure apps' option being off on the email account used. Only the emails generated by the auth() registration and password reset processes are affected. There must be some

[web2py] Re: Help needed simplifying creation of response.menu 4-tuple

2017-01-09 Thread Dave S
On Monday, January 9, 2017 at 7:46:42 AM UTC-8, Anthony wrote: > > On Monday, January 9, 2017 at 2:54:52 AM UTC-5, Dave S wrote: >> >> I think you have to have something for the 4th value; if there is no >> submenu, try putting None in that spot. >> > > No, the fourth item is optional. > > Ant

Re: [web2py] Re: Selecting booleans from sqlite3 database

2017-01-09 Thread Austin Taylor
I'll give that a try. I did try porting the database over from django so I'm guessing that's probably the issue. On Mon, Jan 9, 2017 at 3:49 PM, Niphlod wrote: > did you try dropping the databae and letting web2py recreate it ? sqlite > doesn't go well with fields altering their type "afterwards

[web2py] Re: Issues with record versioning

2017-01-09 Thread Anthony
> > record = db(db.table_x.id == row_id).select().first() > record['name'] = 'something else' > record.update_record() > > That's the one way you cannot do it. The problem is when you call .update_record() with no arguments, it takes all the existing fields in the record and uses them in the dat

Re: [web2py] Re: Help needed simplifying creation of response.menu 4-tuple

2017-01-09 Thread Anthony
On Monday, January 9, 2017 at 12:14:02 PM UTC-5, Terrence Brannon wrote: > > > On Mon, Jan 9, 2017 at 10:55 AM, Anthony wrote: > >> Does response.menu have any pre-existing values, >> > Yes it does. Here is a link to the full source code of models/menu.py > https://github.com/metaperl/trustnet/blo

[web2py] Re: Help needed simplifying creation of response.menu 4-tuple

2017-01-09 Thread Anthony
On Sunday, January 8, 2017 at 3:04:07 PM UTC-5, Terrence Brannon wrote: > > I attempted to simplify creation of the response.menu list of tuples by > the following function: > > > def menu_item(menu_item_text, url, sub_menu=None, ignore=False): > # First element of tuple is the text of the men

[web2py] Re: Selecting booleans from sqlite3 database

2017-01-09 Thread Niphlod
did you try dropping the databae and letting web2py recreate it ? sqlite doesn't go well with fields altering their type "afterwards" (i.e. maybe you created it as a string and then turned into a boolean) On Monday, January 9, 2017 at 9:17:19 PM UTC+1, LoveWeb2py wrote: > > Hello, > > > I'm tryi

Re: [web2py] response.flash or session.flash with dict instead of string???

2017-01-09 Thread LoveWeb2py
How did you implement this Ramos? I ended up writing a toastr function in a model file and using that when I needed the flash. Did you just modify the javascript? On Monday, January 9, 2017 at 5:00:50 AM UTC-5, Ramos wrote: > > nice ;) > > 2017-01-08 23:18 GMT+00:00 Anthony >: > >> Try it and se

[web2py] Selecting booleans from sqlite3 database

2017-01-09 Thread LoveWeb2py
Hello, I'm trying to do a simple query against a sqlite3 database where the values are stored as 0's and 1's All i want to do is select all values that are True or False According to the book this should work: db(db.table.field==True).select() and that would return rows however, it's return

[web2py] Re: Column export to txt

2017-01-09 Thread yarecki wr
Silly newby mistake :) Now works perfect. I read it only to check that the content is actually there as the goal is to somehow get the file to another server that requires authentication (Windows). -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/w

[web2py] Re: auth on GAE 'unable to send email'

2017-01-09 Thread Leonel Câmara
This is not a problem with web2py, this is a problem with gmail SMTP which doesn't allow normal SMTP protocol anymore unless you allow what they call "insecure apps". See: https://support.google.com/accounts/answer/6010255?hl=en -- Resources: - http://web2py.com - http://web2py.com/book (Docum

Re: [web2py] Re: Help needed simplifying creation of response.menu 4-tuple

2017-01-09 Thread Terrence Brannon
On Mon, Jan 9, 2017 at 10:55 AM, Anthony wrote: > Does response.menu have any pre-existing values, > Yes it does. Here is a link to the full source code of models/menu.py https://github.com/metaperl/trustnet/blob/master/models/menu.py > and does this happen with the public or logged in menu? >

[web2py] Re: Connecting new table to mysql db on Pythonanywhere

2017-01-09 Thread Anthony
Is there a *.table file in your /databases folder corresponding to the table in question? If so, you probably created that table on another system or with a previous version of the database and copied/retained the *.table file. This leads web2py to think the table already exists, so web2py will

[web2py] Re: Help needed simplifying creation of response.menu 4-tuple

2017-01-09 Thread Anthony
Does response.menu have any pre-existing values, and does this happen with the public or logged in menu? Maybe try inspecting the menu using a web2py shell or print the menu to see what it contains. Note, your "ignore" argument defaults to False, so all of your menu items will be ignored by the

[web2py] Re: Help needed simplifying creation of response.menu 4-tuple

2017-01-09 Thread Anthony
On Monday, January 9, 2017 at 2:54:52 AM UTC-5, Dave S wrote: > > I think you have to have something for the 4th value; if there is no > submenu, try putting None in that spot. > No, the fourth item is optional. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

[web2py] Re: Issues with record versioning

2017-01-09 Thread Ricardo Oliveira
I activated query logging but the only thing I can see is that when a change is made, the insert in the archive table has both the values (modified_on, modified_by) set to NULL. Anyone else have any other ideas? How can I further troubleshoot this issue? TIA, Ricardo. -- Resources: - http://w

[web2py] Re: Installed applications

2017-01-09 Thread Anthony
On Sunday, January 8, 2017 at 7:50:45 PM UTC-5, new2py wrote: > > Hi, > > This may be a dumb question, but I have saved/installed apps on my web2py > account, but when I login from another computer, my apps are no longer > there ( only when I login from my home computer (which they were created

[web2py] Re: Column export to txt

2017-01-09 Thread Anthony
On Monday, January 9, 2017 at 3:55:23 AM UTC-5, yarecki wr wrote: > > > the function is just as below >> > def csv_file(): > mycsv=os.path.join(request.folder, 'static', '/tmp/items.csv') > db(db.mytable).select(db.mytable.Items).export_to_csv_file(open(mycsv, > 'wb', write_colnames=False)

Re: [web2py] response.flash or session.flash with dict instead of string???

2017-01-09 Thread António Ramos
nice ;) 2017-01-08 23:18 GMT+00:00 Anthony : > Try it and see. ;-) > > -- > 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 mess

[web2py] Re: Column export to txt

2017-01-09 Thread yarecki wr
> the function is just as below > def csv_file(): mycsv=os.path.join(request.folder, 'static', '/tmp/items.csv') db(db.mytable).select(db.mytable.Items).export_to_csv_file(open(mycsv, 'wb', write_colnames=False)) data=open(mycsv).read() return data Then it's being read by a standar