Re: [web2py] Re: mouse scrolling problem on web2py pages with (ubuntu 14.04) firefox 44.0.2

2016-04-01 Thread Hrobjartur Thorsteinsson
Yes, the pages are now scrolling fine. Probably Pierro fixed it here: https://github.com/web2py/web2py/commit/197b01853444b4b279764f5048de128be730d557 Thanks! Strange that incorrect args to Font-weight would affect scrolling in Firefox. On Tue, Mar 29, 2016 at 2:05 AM, Dave S wrote: > > > On Sun

[web2py] Re: Not to show submit button using formfactory

2016-04-01 Thread Dave S
On Friday, April 1, 2016 at 11:13:41 PM UTC-7, rajjm...@gmail.com wrote: > > Can't seem to find the answer in the forum. A trivial question guys... How > not to show submit button. > > form = SQLFORM.factory(Field('search_string',requires=IS_NOT_EMPTY()), > submit_button= 'Submit') > form.

[web2py] Re: create single row of field names without values or None values?

2016-04-01 Thread Dave S
On Friday, April 1, 2016 at 8:12:55 PM UTC-7, lucas wrote: > > "If that import fails in the web2py environment, you may have bigger > problems than instantiating a Row. ;-)" > > what do you mean by that? lucas > It is likely to mean your environment is messed up, because gluon is pretty centr

[web2py] Re: Record version query

2016-04-01 Thread Dave S
On Friday, April 1, 2016 at 6:25:02 PM UTC-7, Jeff Riley wrote: > > So sorry. I found it. I did not realize current_record was what I was > looking for. > Better to ask and answer yourself than to never ask. /dps > > On Friday, April 1, 2016 at 8:12:10 PM UTC-5, Jeff Riley wrote: >> >> All,

[web2py] Re: Unable to update to new version old: 2.4.5 new: 2.13.4 (latest available at web2py site)

2016-04-01 Thread Dave S
On Friday, April 1, 2016 at 12:45:07 PM UTC-7, Dave S wrote: > > On Friday, April 1, 2016 at 12:13:30 PM UTC-7, Mohan Paliwal wrote: >> >> Can any one please help me in updating the web2py version from: 2.4.5 to >> new: 2.13.4 (latest available at web2py site), or which support google >> OAuth 2

[web2py] Not to show submit button using formfactory

2016-04-01 Thread rajjmatthur
Can't seem to find the answer in the forum. A trivial question guys... How not to show submit button. form = SQLFORM.factory(Field('search_string',requires=IS_NOT_EMPTY()), submit_button= 'Submit') form.element(_type='submit').update(_value=None) This don't seem to work. I believe SQL fo

[web2py] Re: Can't "keepvalues" for read-only boolean fields in SQLFORM factory

2016-04-01 Thread Anthony
For the record, I believe the problem is that because disabled form elements do not get submitted with the form, submission of a disabled boolean checkbox is interpreted the same as an unchecked boolean checkbox -- so even though SQLFORM.__init__ creates the widget with _checked=True, the FORM.

[web2py] Re: Can't "keepvalues" for read-only boolean fields in SQLFORM factory

2016-04-01 Thread Anthony
Looks like a bug (please open a Github issue). In the meantime, see http://stackoverflow.com/a/36369012/440323. Anthony On Friday, April 1, 2016 at 2:31:11 PM UTC-4, Jeremy Martin wrote: > > I have a simple piece of code: > > form = SQLFORM.factory(Field("readonly_field", writable=False, default

[web2py] Re: create single row of field names without values or None values?

2016-04-01 Thread lucas
"If that import fails in the web2py environment, you may have bigger problems than instantiating a Row. ;-)" what do you mean by that? lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/

[web2py] Re: Record version query

2016-04-01 Thread Jeff Riley
So sorry. I found it. I did not realize current_record was what I was looking for. On Friday, April 1, 2016 at 8:12:10 PM UTC-5, Jeff Riley wrote: > > All, So I have out smarted myself. I want to return all versions of a > specific sheet from sheet_archive. Sheet_archive is a Web2py record

[web2py] Record version query

2016-04-01 Thread Jeff Riley
All, So I have out smarted myself. I want to return all versions of a specific sheet from sheet_archive. Sheet_archive is a Web2py record version table. I was expecting the archive table to have the sheet.id column, but it appears it does not. So I am wondering how I would return all archi

[web2py] Re: how to find and reference field names in tables

2016-04-01 Thread Anthony
Just access the .default attribute of each field. Anthony -- 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 are subsc

[web2py] Re: create single row of field names without values or None values?

2016-04-01 Thread Dave S
On Friday, April 1, 2016 at 2:23:25 PM UTC-7, lucas wrote: > > i think i figured it out. should be: > > try: > from dal import Row > have_row = True > except: > have_row = False > > If that import fails in the web2py environment, you may have bigger problems than instantiating a Row.

[web2py] Re: create single row of field names without values or None values?

2016-04-01 Thread Dave S
On Friday, April 1, 2016 at 2:40:28 PM UTC-7, Dave S wrote: > > > > On Friday, April 1, 2016 at 2:23:25 PM UTC-7, lucas wrote: >> >> i think i figured it out. should be: >> >> from dal import Row >> ... >> >> row = Row() >> >> i know basic, but sometimes it is hard what modules to import when >

[web2py] Re: bug? menu v2.14.3

2016-04-01 Thread Dave S
On Friday, April 1, 2016 at 2:37:11 PM UTC-7, lucas wrote: > > yeah probably, cuz when i upgraded an app, i usually kept the same css and > js and such. so i thought i would over write them from example after i > copied my old app over. not a good idea. > > so really, are we getting rid of more

[web2py] get field default value?

2016-04-01 Thread lucas
ok cool, so now we know how to iterate through the fields of a table. how can we grab or get the db.py default value for each field also? thanx lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.googl

[web2py] Re: create single row of field names without values or None values?

2016-04-01 Thread Dave S
On Friday, April 1, 2016 at 2:23:25 PM UTC-7, lucas wrote: > > i think i figured it out. should be: > > from dal import Row > ... > > row = Row() > > i know basic, but sometimes it is hard what modules to import when reading > the API docs. lucas > I think it is >>> from pydal.objects impor

[web2py] Re: bug? menu v2.14.3

2016-04-01 Thread lucas
yeah probably, cuz when i upgraded an app, i usually kept the same css and js and such. so i thought i would over write them from example after i copied my old app over. not a good idea. so really, are we getting rid of more than 2 levels in the menu? or is that just temporary? lucas -- R

[web2py] Re: how to find and reference field names in tables

2016-04-01 Thread lucas
ok cool, so now we know how to iterate through the fields of a table. how can we grab or get the db.py default value for each field also? thanx lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.googl

[web2py] Re: create single row of field names without values or None values?

2016-04-01 Thread lucas
i think i figured it out. should be: from dal import Row ... row = Row() i know basic, but sometimes it is hard what modules to import when reading the API docs. lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

[web2py] Re: create single row of field names without values or None values?

2016-04-01 Thread lucas
ok, so how do i instantiate a Row() object. please include the proper import syntax. thanx lucas -- 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 re

[web2py] Re: create single row of field names without values or None values?

2016-04-01 Thread Niphlod
BTW: a single Row full of None(s) is really just a Storage with field names as keys and None as values. On Friday, April 1, 2016 at 10:05:55 PM UTC+2, Dave S wrote: > > On Friday, April 1, 2016 at 12:46:24 PM UTC-7, lucas wrote: >> >> hello one and all, >> >> i have to create a mock or dummy row

[web2py] Re: Shell - reload record from server

2016-04-01 Thread Niphlod
can you try to do a db.commit() in the shell AFTER the succesfull update on mysql's console and BEFORE fetching the record in the shell the second time ? On Friday, April 1, 2016 at 10:07:20 PM UTC+2, Marcello wrote: > > Example: > > In [1]: k = db.konsulta(3514998) > > In [2]: k.ok > Out[2]: 1L

[web2py] Re: bug? menu v2.14.3

2016-04-01 Thread Dave S
On Friday, April 1, 2016 at 12:47:37 PM UTC-7, lucas wrote: > > still no one to weigh in on this one? am i the only one? i feel so > lonely and i am not sure what to do with myself. sorry, just kidding. > lucas > There were some bootstrap changes where nested menus were no longer supported

[web2py] Re: Shell - reload record from server

2016-04-01 Thread Marcello
Example: In [1]: k = db.konsulta(3514998) In [2]: k.ok Out[2]: 1L (I change the ok value of this record id DB in mysql's console (and committed it) for 2, for example. Then came back to my web2py shell and again: In [3]: k = db.konsulta(3514998) In [4]: k.ok Out[4]: 1L If I leave console and

[web2py] Re: create single row of field names without values or None values?

2016-04-01 Thread Dave S
On Friday, April 1, 2016 at 12:46:24 PM UTC-7, lucas wrote: > > hello one and all, > > i have to create a mock or dummy row from a table. so i want all of the > field name without values or None values. then i want to fill in a few of > the values and then pass it to a rather complex function f

[web2py] Re: Shell - reload record from server

2016-04-01 Thread Niphlod
please clarify. if you fetch it back isn't modified, so how can you tell the data is actually "modified in the DB" ? On Friday, April 1, 2016 at 6:21:46 PM UTC+2, Marcello wrote: > > Yes. Sure... the data is modified in the DB. > > > On Friday, April 1, 2016 at 12:14:51 PM UTC-3, Niphlod wrote: >

[web2py] Re: bug? menu v2.14.3

2016-04-01 Thread Niphlod
bootstrap since v3 doesn't support anything past the 2nd level menu. On Friday, April 1, 2016 at 9:47:37 PM UTC+2, lucas wrote: > > still no one to weigh in on this one? am i the only one? i feel so > lonely and i am not sure what to do with myself. sorry, just kidding. > lucas > -- Resour

[web2py] Does someone have a good idea of implementing chat using ajax in web2py? Please share.

2016-04-01 Thread Jacob Devin
There shouldn't be time lag between the chats being receieved by the users. -- 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 beca

[web2py] Re: bug? menu v2.14.3

2016-04-01 Thread lucas
still no one to weigh in on this one? am i the only one? i feel so lonely and i am not sure what to do with myself. sorry, just kidding. lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/

[web2py] create single row of field names without values or None values?

2016-04-01 Thread lucas
hello one and all, i have to create a mock or dummy row from a table. so i want all of the field name without values or None values. then i want to fill in a few of the values and then pass it to a rather complex function for its result. what is the best method to do this? thanx in advance,

[web2py] Re: Unable to update to new version old: 2.4.5 new: 2.13.4 (latest available at web2py site)

2016-04-01 Thread Dave S
On Friday, April 1, 2016 at 12:13:30 PM UTC-7, Mohan Paliwal wrote: > > Can any one please help me in updating the web2py version from: 2.4.5 to > new: 2.13.4 (latest available at web2py site), or which support google > OAuth 2 login. > > Issue I am facing is application not loading the data, jus

[web2py] Re: is that file there?

2016-04-01 Thread Dave S
On Friday, April 1, 2016 at 11:11:38 AM UTC-7, Leonel Câmara wrote: > > Well os.path.exists is a lot easier to remember. os.access also tests if > you have permission to access it so it's nice too, but it does have some > problems because the file may exist and you don't have permission and then

[web2py] Re: Empty strings stored as null in database

2016-04-01 Thread Raul Monares
I'm using Firebird 2.5.4 on Freebsd 10.2 On Friday, April 1, 2016 at 12:01:00 PM UTC-6, Dave S wrote: > > On Thursday, March 31, 2016 at 7:39:23 PM UTC-7, Raul Monares wrote: >> >> Hello >> I just updated to version 2.14.3 and noticed that empty strings are being >> stored as null in database fi

[web2py] Re: Can't "keepvalues" for read-only boolean fields in SQLFORM factory

2016-04-01 Thread Jeremy Martin
Dang it, my thread title is misleading. It's NOT really about the "keepvalues" flag, it's just about read-only boolean fields not showing the correct value after a failed form submission. On Friday, 1 April 2016 13:31:11 UTC-5, Jeremy Martin wrote: > > I have a simple piece of code: > > form =

[web2py] Can't "keepvalues" for read-only boolean fields in SQLFORM factory

2016-04-01 Thread Jeremy Martin
I have a simple piece of code: form = SQLFORM.factory(Field("readonly_field", writable=False, default="can't change") ,Field("some_field", requires=IS_LENGTH(10,5)) ,Field("some_flag", "boolean", writable=False, default=True)) if form.process().acce

[web2py] Re: is that file there?

2016-04-01 Thread Leonel Câmara
Well os.path.exists is a lot easier to remember. os.access also tests if you have permission to access it so it's nice too. Frankly I always use exists because it's a lot more readable and if I don't have permission to access the files I'm supposed to be accessing then it's going to be bad anyw

[web2py] Re: Empty strings stored as null in database

2016-04-01 Thread Dave S
On Thursday, March 31, 2016 at 7:39:23 PM UTC-7, Raul Monares wrote: > > Hello > I just updated to version 2.14.3 and noticed that empty strings are being > stored as null in database field. This didn't happened in 2.13.4. > > Is this the intended behavior ? > Which database engine are you using?

[web2py] is that file there?

2016-04-01 Thread Dave S
In the web2py environment, is there a reason to prefer os.path.exists(...) to os.access( ..,os.F_OK)? /dps -- 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: uploading a file to a new table referencing session from previous table

2016-04-01 Thread aetagothno
This is working, I am able to upload a file containing information from the session, but when I try displaying SQLFORM.grid in the next view, it says no records found..but the upload was successful because the file is in my uploads folder. So I think I am doing something wrong with my referencin

[web2py] Re: Shell - reload record from server

2016-04-01 Thread Marcello
Yes. Sure... the data is modified in the DB. On Friday, April 1, 2016 at 12:14:51 PM UTC-3, Niphlod wrote: > > sure the other process has commit()ed the changes ? that's what > transactions are for: until a change is commit()ed, no changes are visible. > > > BTW: mysql has the weirdest default s

[web2py] Re: uploading a file to a new table referencing session from previous table

2016-04-01 Thread aetagothno
EDIT: The example I described will upload a file, however it uploads 3 files instead of 1 file. The controller function looks like : def upfile(): vars = request.vars arrvars = [] //I populate and sort array //open a template file from static and write to it db.myfile.

[web2py] Re: Shell - reload record from server

2016-04-01 Thread Niphlod
sure the other process has commit()ed the changes ? that's what transactions are for: until a change is commit()ed, no changes are visible. BTW: mysql has the weirdest default setting of not allowing to see changes from OTHER processes until the process which reads commit()s itself (which may

[web2py] Re: Shell - reload record from server

2016-04-01 Thread Marcello
I tried it. It gives me the old value. I have to leave the shell and enter again to refresh it... This is my problem On Friday, April 1, 2016 at 11:53:52 AM UTC-3, Niphlod wrote: > > yep, you need to re-select it ... > > On Friday, April 1, 2016 at 3:26:39 PM UTC+2, Marcello wrote: >> >> Hello,

[web2py] Re: Shell - reload record from server

2016-04-01 Thread Niphlod
yep, you need to re-select it ... On Friday, April 1, 2016 at 3:26:39 PM UTC+2, Marcello wrote: > > Hello, > > I have a function that I call in a shell... > I load a record from a database and do some stuff.. > > Problem is that in the meantime the record may be modified in the server... > > Is th

[web2py] uploading a file to a new table referencing session from previous table

2016-04-01 Thread aetagothno
I am not sure if I worded my question correctly, sorry for confusion. Consider: db.define_table('form1', Field('number', 'integer'), Field('field1', 'string'), Field('field2', 'string), Field('field3', 'integer')) db.define_table('formfile', Field('number_id', db.form1),

[web2py] Shell - reload record from server

2016-04-01 Thread Marcello Parra
Hello, I have a function that I call in a shell... I load a record from a database and do some stuff.. Problem is that in the meantime the record may be modified in the server... Is there a way to reload the record from the database to track possible changes ?? (I'm using mysql) Thanks, Marce

[web2py] Re: Placeholder in SQLFORM factory

2016-04-01 Thread Anthony
Field('name', widget=lambda f, v: SQLFORM.widgets.string.widget(f, v, _placeholder='my placeholder text')) Be sure to use the correct widget for the field type (i.e., string, text, etc.). You could generalize with a special function: def widget(type='string', placeholder=''): return

[web2py] Re: How to install some module, say unirest into my web2py app?

2016-04-01 Thread Anthony
The best approach is to run web2py from source and install as you would install any other Python module. However, if you need to distribute the module along with your app, you can also just put it in the app's /modules folder. Finally, you could also stick it in the /web2py/site-packages folder

[web2py] How to install some module, say unirest into my web2py app?

2016-04-01 Thread Emmanuel Dsouza
I need to use apis for which I need unirest for a must. -- 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 are subscrib

[web2py] Placeholder in SQLFORM factory

2016-04-01 Thread Nick Michael
Hi there, I can't seem to find a way to add placeholder text using SQLFORM.factory. My table design is as follows: upload_folder = os.getcwd() + "/applications/" + request.application + "/uploads" form = SQLFORM.factory( Field('name', requires=db.user_items.name.requires), Field(

[web2py] Re: How did you implement chat system in your app? How's my idea?

2016-04-01 Thread Leonel Câmara
It's supported by android http://caniuse.com/#feat=websockets -- 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 are s

[web2py] Re: How did you implement chat system in your app? How's my idea?

2016-04-01 Thread Emmanuel Dsouza
But websocket is not supported by Android, right? Most of my users will use android , which will be best in that case? On Tuesday, March 29, 2016 at 12:07:00 AM UTC+5:30, Ron Chatterjee wrote: > > > https://www.toptal.com/tornado/simple-python-websocket-server?utm_campaign=blog_post_simple_python

[web2py] Re: Update multiple existing records with the same data from 1 form which is the second form on the page

2016-04-01 Thread drew Roberts
On Thursday, March 31, 2016 at 3:28:15 PM UTC-4, Dave S wrote: > > > > On Thursday, March 31, 2016 at 8:28:30 AM UTC-7, drew Roberts wrote: >> >> On Monday, March 21, 2016 at 9:53:36 PM UTC-4, drew Roberts wrote: >> >>> I have something like this in a controller: >>> >>> [...] >>> >> If I put so

[web2py] Re: How to upload files programmatically from file system?

2016-04-01 Thread Leonel Câmara
This is the usual way: filevalue = db.image.file.store(source_file, original_filename) db.image.insert(name=newname, file=filevalue) where in source_file you put a stream with the opened file, and in original_filename you put the file's name like 'apple.png' -- Resources: - http://web2py.com