[web2py] Re: Passing a Variable into a Query

2014-03-01 Thread Tim Richardson
observation: db_name is a table name. What do you expect to be returned by .select(db_field)? it is a list of rows, where row is a DAL object. usually written like this: rows = db(query).select() It seems you haven't noticed this yet since your code uses a singular form db_record. You then take

[web2py] DAL ignoring accents

2014-03-01 Thread Wonton
Hello! Is there any way to do searches with DAL (sqlite database) ignoring accents? Thank you very much in advance! Wonton. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

Re: [web2py] pg8000 driver that comes with web2py 2.8.2 is not supporting JSON field type?

2014-03-01 Thread Joe Barnhart
Hi Mariano -- I'd like to encourage you to keep making pg8000 a viable alternative for web2py. I started with it but had to change to psycopg2 because of some issues that postgres handled better under the psy driver. But I think pypy could be the future of python and it won't support a

[web2py] Re: run web2y scheduler instances on 2 or more servers

2014-03-01 Thread Niphlod
On Friday, February 28, 2014 10:04:59 PM UTC+1, Andrey K wrote: Thank Niphlod for your answer. it is already great if it is possible even theoretically! it does even in the real world :-P Regarding implementation. Correct me please if I am wrong in following understanding - am I

[web2py] Re: SQLFORM.grid to update page

2014-03-01 Thread horridohobbyist
type 'exceptions.TypeError' redirect() got an unexpected keyword argument 'vars' On Friday, 28 February 2014 18:34:54 UTC-5, Tim Richardson wrote: In my slice on inline-editable grid ( http://www.web2pyslices.com/slice/show/1928/basic-inline-editing-in-sqlformgrid-no-plugin-no-javascript )

[web2py] Re: Passing a Variable into a Query

2014-03-01 Thread Anthony
Assuming by db_name you really mean the table name, maybe you want something like this: def db_query(tablename, fieldname): query = (db[tablename].Financial_Institution == auth.user.id) (db[ tablename].Completed == 1) return db(query).select(db[tablename][fieldname]).first()[fieldname]

[web2py] Re: SQLFORM.grid to update page

2014-03-01 Thread Anthony
Notice in Tim's example, vars is an argument of URL(). On Saturday, March 1, 2014 7:40:36 AM UTC-5, horridohobbyist wrote: type 'exceptions.TypeError' redirect() got an unexpected keyword argument 'vars' On Friday, 28 February 2014 18:34:54 UTC-5, Tim Richardson wrote: In my slice on

[web2py] Re: parse_as_rest combined with accessible_query

2014-03-01 Thread Rob Mayhue
I've been looking at parse_as_rest(...) myself lately for use as a REST api for AngularJS and after studying the code in DAL I've discovered there are some undocumented features to the parse_as_rest method(...). I'm guessing they are undocumented because it is still considered as experimental

[web2py] Re: SQLFORM.grid to update page

2014-03-01 Thread horridohobbyist
Okay, then, I see another issue... Right now, I'm trying to execute the function by using a link: links=[lambda row: A('Add',_href=URL('add',args=[db.videos,row.id,user_id]))], But this means a new request in the Add function. I really should execute a function *in-place* on the current

[web2py] Date format and date picker

2014-03-01 Thread Gael Princivalle
Hello all. I'm a little bit disappointed by the date format and datepicker. First my field was like that: Field('concert_date', type='date'), On Firefox no problem. It give me automaticly the possibility to put in the field the local %d/m/%Y format, and this format was accepted by the DAL.

[web2py] current trunk using memdb results in crash

2014-03-01 Thread Bas Ti
The current trunk does not support using memcache as session store on GAE: session.connect calls memdb.Table.__call__(recordid, unique_key=unique_key) however unique_key is not supported by memdb.Table, it is only supported by dal.Table -- Resources: - http://web2py.com -

[web2py] help with jsonrpc

2014-03-01 Thread Trevor Overman
So I'm trying to connect an android application to my web2py website back end database by using json remote procedure calls. Currently, I am trying to make a simple test function to remotely add entries in the db. Additionally, I am running on GAE. What I have right now is: db.py

[web2py] Re: help with jsonrpc

2014-03-01 Thread Anthony
db.testing.insert(numer_sum=sum) Shouldn't the above be number_sum? On Saturday, March 1, 2014 2:46:59 PM UTC-5, Trevor Overman wrote: So I'm trying to connect an android application to my web2py website back end database by using json remote procedure calls. Currently, I am trying to make

[web2py] google docs viewer rendered size issue

2014-03-01 Thread sasogeek
{{=XML(expand_one( 'http://www.official-notebook.com/notebook/default/download/'+str(update[ 'file']),cache.ram('mycache',lambda:dict(),3600)))}} update['file'] is a file uploaded to my app with a .docx extension which means that it's supposed to open in a google docs viewer. That works fine,

[web2py] Re: help with jsonrpc

2014-03-01 Thread Trevor Overman
ah you're right.. x.x... unfortunately, I am still receiving the same error. Another thing, when I try accessing the url with a specific port, ex. http://domain:port/app/default/call/run/test_add?a=3b=4http://domain/app/default/call/run/test_add?a=3b=4GAE is sending me a timeout error. hmm...

Re: [web2py] help with jsonrpc

2014-03-01 Thread Jonathan Lundell
On 1 Mar 2014, at 11:46 AM, Trevor Overman trover...@gmail.com wrote: So I'm trying to connect an android application to my web2py website back end database by using json remote procedure calls. Currently, I am trying to make a simple test function to remotely add entries in the db.

Re: [web2py] help with jsonrpc

2014-03-01 Thread Trevor Overman
Finally got things working. For anyone out there reading this, I fixed the problem by utilizing urlfetch in GAE. @service.jsonrpc def test_add(a,b): number_sum = a+b db.testing.insert(number_sum=number_sum) return a+b def test(): from gluon.contrib.simplejsonrpc import

[web2py] Bug in request_reset_password

2014-03-01 Thread pepper_bg
Not sure how to report this so posting here, please let me know if there is a separate bug tracking system. Just upgraded an existing web2py installation to 2.8.2-stable+timestamp.2013.11.28.13.54.07 using the 'Check for upgrades' button in Admin. Works fine so far except

[web2py] Re: SQLFORM.grid to update page

2014-03-01 Thread Tim Richardson
I'm probably not following you, but if you want the server to do something resulting in new content on the page, you either instigate a new request via a URL (which I think is known as the REST method), or use AJAX to fetch data from the server (and then use javascript to update part of the

[web2py] Re: Bug in request_reset_password

2014-03-01 Thread Tim Richardson
On Sunday, 2 March 2014 14:49:24 UTC+11, pepper_bg wrote: Not sure how to report this so posting here, please let me know if there is a separate bug tracking system. This is supposed to help : reporting bugs:

[web2py] Re: Bug in request_reset_password

2014-03-01 Thread Tim Richardson
I assume you see this for a specific app. Is this app configured for login via usernames or via email addresses? -- 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

[web2py] Re: Date format and date picker

2014-03-01 Thread Tim Richardson
I try to consider that a field defined as Date is a Date in the python sense, not a string representation. In some backends it may be a stored as a string, but I consider that the private business of the database. The DAL gives back a Date. (If it was stored as a string I would hope that it