[web2py] Re: getting a dynamic total for a smartgrid

2013-11-01 Thread Derek
You can try using a datatable... http://datatables.net/release-datatables/examples/advanced_init/footer_callback.html On Friday, November 1, 2013 4:24:16 PM UTC-7, Derek wrote: > > Smartgrid won't do that. You have to program it yourself. > > On Friday, November 1, 2013 12:13:18 PM UTC-7, Evan Ca

[web2py] Re: getting a dynamic total for a smartgrid

2013-11-01 Thread Derek
Smartgrid won't do that. You have to program it yourself. On Friday, November 1, 2013 12:13:18 PM UTC-7, Evan Caldwell wrote: > > I am new to web2py so please excuse any obvious questions. I have the > following table: > db.define_table('timeclock', > Field('project','string', required=True,

Re: [web2py] restfull need to api/id/1 or /api/1

2013-11-01 Thread Ricardo Pedroso
On Fri, Nov 1, 2013 at 11:53 AM, António Ramos wrote: hello i dont get it about restfull > > > I read the book and using the book example i should get my record with id > 1 just by "Get" > > > http://127.0.0.1:8000/angular/default/api/person/1 > > however i get > > *no matching patterns* > > if i

[web2py] jQuery autocomplete not working.

2013-11-01 Thread raferbop
Good day days guys, I implemented the following code below to enable auto-complete in a text field, but it doesn't work, can someone please tell me where I am going wrong; # Model Files # db.define_table( 'location', Field('street_address', type='string', label=T('Street Addre

Re: [web2py] Re: How to render a csv file without using template

2013-11-01 Thread Michele Comitini
To avoid redirect and use ajax see this thread: https://groups.google.com/d/msg/web2py/HQU5kD0tGag/LGtjlikzWdsJ mind that there is a penalty due to base64 encoding, that implies that the benefit depends on how large the data to be trasmitted is. 2013/11/1 Niphlod > yep. > check response.strea

Re: [web2py] Re: Internal Error - Ticket unknown - only over HTTPS?!

2013-11-01 Thread Michele Comitini
Great you found the problem and the solution! You should not need 777 permissions though. Just set the owner and/or the group of your web2py app dir to the same user as the apache user (web-user as I see in your mail). As a side note I see you use WSGIDaemonProcess web2py user=web-user group=w

[web2py] Re: 2.7.4 update leaves admin interface rendering strangely

2013-11-01 Thread LightDot
The admin app now uses response.static_version so your solution is not the most optimal one. If you need a quick fix, I suggest deleting or commenting out the line 48 from current applications/admin/models/0.py, rather than moving the files: https://github.com/web2py/web2py/blob/master/applicat

[web2py] 2.7.4 update leaves admin interface rendering strangely

2013-11-01 Thread REM
Well, it's surprising that there's no other report of this, but here goes: I just upgraded to 2.7.4 in the same way I always do: * Tarball the old web2py dir * download the new web2py_src.zip & unzip elsewhere * Copy the new web2py dir straight over the old one * chown it as www-data & check perm

[web2py] Re: How to render a csv file without using template

2013-11-01 Thread Niphlod
yep. check response.stream http://web2py.com/books/default/chapter/29/04/the-core?search=response.stream On Friday, November 1, 2013 8:24:11 PM UTC+1, San L wrote: > > We would like to allow use user to download a csv file when clicking a > button on a page (not redirect or pop up a new window)

[web2py] Re: Internal Error - Ticket unknown - only over HTTPS?!

2013-11-01 Thread AbrahamLinksys
Also -- I'm pretty sure all the tickets turned to unknown/unrecoverable because the errors directory was also unwritable, hence the inability to see the actual error messages (which probably referred to the database most of the time... ) So a good way to check for that early on when receiving s

[web2py] Re: Internal Error - Ticket unknown - only over HTTPS?!

2013-11-01 Thread AbrahamLinksys
Hi Michele, Thanks for your response. I actually managed to solve it. To review, thanks for the idea of looking at tickets -- unfortunately, part of the issue was that tickets were not being written for these errors, thus there is nothing to unpickle :( So, since the app was not generating err

[web2py] Alterar o rótulo de botões sqlform.grid (adicionar, excluir, etc)

2013-11-01 Thread Carlynhos77
Olá, bom dia ... Gostaria de saber como alterar o rótulo de botões sqlform.grid (adicionar, excluir, etc) ... como acessar o ID ou classe de cada objeto, uma vez que tudo é automático criado para nós ... obrigado! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - htt

[web2py] Alterar o rótulo de botões sqlform.grid (adicionar, excluir, etc)

2013-11-01 Thread Carlynhos77
Olá, bom dia ... Gostaria de saber como alterar o rótulo de botões sqlform.grid (adicionar, excluir, etc) ... como acessar o ID ou classe de cada objeto, uma vez que tudo é automático criado para nós ... obrigado! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - htt

[web2py] How to render a csv file without using template

2013-11-01 Thread San L
We would like to allow use user to download a csv file when clicking a button on a page (not redirect or pop up a new window). Is this doable in web2py? Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https:

[web2py] getting a dynamic total for a smartgrid

2013-11-01 Thread Evan Caldwell
I am new to web2py so please excuse any obvious questions. I have the following table: db.define_table('timeclock', Field('project','string', required=True, label='Project'), Field('work_date','date', required=True, label='Work Date'), Field('time_in','time', required=True, label='Time

Re: [web2py] form without errors and not accepted

2013-11-01 Thread Diogo Munaro
O Man!! I Solved!!! Was an extra field with radiobox... If I send by post SQLFORM don't get an error, but if I send by ajax post it's raising me a ticket. I removed the error and then the 2 post methods work. It should be a web2py bug? A bug on bug report? lol 2013/11/1 Richard Vézina > I

[web2py] Re: Override delete in smartgrid with links=

2013-11-01 Thread Massimo Di Pierro
Should be links = { 'person':[lambda row: A(T('Delete'),_href=URL("configure","delete",args=["delete", 'person', row.id]))], 'product':[lambda row: A(T('Delete'),_href=URL("configure","delete",args=["delete", product', row.id]))], 'purchase':[lambda row: A(T('Delet

[web2py] Re: can grid export represented values rather than raw db values?

2013-11-01 Thread Anthony
On Friday, November 1, 2013 12:05:56 PM UTC-4, weheh wrote: > Anthony, TSV works pretty well. Now I have to figure out how to get rid of > the html formatting I've put in, but I think TSV basically does the trick. > > It would work better if grid gave columns a class or id corresponding > to th

Re: [web2py] -p or --port from command line not seems to work

2013-11-01 Thread Richard Vézina
http://code.google.com/p/web2py/issues/detail?id=1760 Done! Thanks On Fri, Nov 1, 2013 at 1:55 PM, Richard Vézina wrote: > Maybe a old mistake of I miss understanding the doc... : > > > -M, --import_models auto import model files; default is False; should be > used wi

Re: [web2py] -p or --port from command line not seems to work

2013-11-01 Thread Richard Vézina
Maybe a old mistake of I miss understanding the doc... : -M, --import_models auto import model files; default is False; should be used with --shell option Richard On Fri, Nov 1, 2013 at 11:56 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > That's a sh

[web2py] Importing python modules from a "web2py module" in production environment

2013-11-01 Thread Kariloy Markief
I've been working on app for the last few months using the built-in wep2py rocket webengine. Since "all" was working fine so I decided to give it go and see if I could put up into production. So I've hosted it through apache, but my problem is actually that it fails on some python library (whi

Re: [web2py] form without errors and not accepted

2013-11-01 Thread Richard Vézina
I don't see you models for the differents dbs, so can't say how validation should occure. But, it should use the same requires as are the set on these dbs... Richard On Fri, Nov 1, 2013 at 12:50 PM, Diogo Munaro wrote: > Yes Richard, but it should be accepted or should take errors, right? >

[web2py] DAL new feature in trunk

2013-11-01 Thread Niphlod
Hi @all, there are some issues opened since a long time to support "quoting" in DAL. For the ones in need of: - accessing legacy tables with some funny names - use reserved keywords for table and field names - don't reveal real table names and general schema of the backend (for the ones sup

Re: [web2py] form without errors and not accepted

2013-11-01 Thread Diogo Munaro
Yes Richard, but it should be accepted or should take errors, right? 2013/11/1 Richard Vézina > You don't do redirection after accepted and you set default value to some > field, so you maybe just have the same form again and again... Also, with > SQLFORM.factory() you have to manage the data i

[web2py] Re: invalid table/column name "log" is a "ALL" reserved SQL/NOSQL keywor

2013-11-01 Thread Niphlod
It's an option because it's left to you to consider that. If you wish your app to be "multidb-friendly" than it's better be prudent. If you don't care, delete the check_reserved argument. On Friday, November 1, 2013 3:19:13 PM UTC+1, Rupesh Pradhan wrote: > > So, do you think it is better to avo

[web2py] Re: how to launch scheduler for a conditional model?

2013-11-01 Thread Niphlod
what's the usecase for this ? On Friday, November 1, 2013 3:34:28 PM UTC+1, Massimo Di Pierro wrote: > > Right now this is not supported. > > > On Friday, 1 November 2013 03:06:41 UTC-5, eyet...@gmail.com wrote: >> >> Hello, >> >> I'm using web2py 2.7.2. Is it possible to run a scheduler that's i

[web2py] Re: can grid export represented values rather than raw db values?

2013-11-01 Thread Niphlod
On Friday, November 1, 2013 5:05:56 PM UTC+1, weheh wrote: > > Anthony, TSV works pretty well. Now I have to figure out how to get rid of > the html formatting I've put in, but I think TSV basically does the trick. > > skip setting the representation if request.vars._export_type is there It w

[web2py] Re: Override delete in smartgrid with links=

2013-11-01 Thread kwebb
Ok, first I tried to make a dictionary: links = { 'db.person':[lambda row: A(T('Delete'),_href=URL("configure","delete",args=["delete", 'db.person', row.id]))], 'db.product':[lambda row: A(T('Delete'),_href=URL("configure","delete",args=["delete", 'db.product', row.id]))],

[web2py] Re: can grid export represented values rather than raw db values?

2013-11-01 Thread weheh
Anthony, TSV works pretty well. Now I have to figure out how to get rid of the html formatting I've put in, but I think it does the trick. On Friday, November 1, 2013 2:14:30 AM UTC+8, Anthony wrote: > > If you can live with tab-delimited instead of comma delimited, the TSV > format does exactly

Re: [web2py] -p or --port from command line not seems to work

2013-11-01 Thread Massimo Di Pierro
That's a shell bug. Please open a ticket so I do not forget to fix it. What does "auto" stand for? On Friday, 1 November 2013 10:09:56 UTC-5, Richard wrote: > > Hello, > > If start web2py from command line with this command : > > python web2py.py -a 'asdf' -i 127.0.0.1 -p 8001 -S myapp -M auto > >

[web2py] -p or --port from command line not seems to work

2013-11-01 Thread Richard
Hello, If start web2py from command line with this command : python web2py.py -a 'asdf' -i 127.0.0.1 -p 8001 -S myapp -M auto I am expecting that "request.env.http_host" to return : 127.0.0.1:8001 But I always get 8000, is something wrong with my command? I also try : python web2py.py -a 'as

Re: [web2py] form without errors and not accepted

2013-11-01 Thread Richard Vézina
You don't do redirection after accepted and you set default value to some field, so you maybe just have the same form again and again... Also, with SQLFORM.factory() you have to manage the data input by yourself... search the book with filter_field... You have to process you form after if form.pr

[web2py] form without errors and not accepted

2013-11-01 Thread Diogo Munaro
Hi again guys, I'm using SQLFORM.factory and the form returned without errors and without been accepted. *Controller*: def product(): db.product_inventory.researcher_id.default = researcher_id() form = SQLFORM.factory(db.item,db.item_image,db.product,db.product_inventory) if form.pro

[web2py] Re: how to launch scheduler for a conditional model?

2013-11-01 Thread Massimo Di Pierro
Right now this is not supported. On Friday, 1 November 2013 03:06:41 UTC-5, eyet...@gmail.com wrote: > > Hello, > > I'm using web2py 2.7.2. Is it possible to run a scheduler that's in a > conditional model file? For example I have this in > /models/special/scheduler.py > > """ > > def task():

[web2py] Re: Override delete in smartgrid with links=

2013-11-01 Thread Massimo Di Pierro
links = {'tablename':[lambda row: A(T('Delete'),_href=URL("configure","delete",args=["delete", 'tablename', row.id]))]} You can have one item for each tablename, On Friday, 1 November 2013 09:02:06 UTC-5, kw...@teradactyl.com wrote: > > I have a smartgrid example with delete button removed and

[web2py] how to launch scheduler for a conditional model?

2013-11-01 Thread eyeteajay
Hello, I'm using web2py 2.7.2. Is it possible to run a scheduler that's in a conditional model file? For example I have this in /models/special/scheduler.py """ def task(): ... return 1 from gluon.scheduler import Scheduler taskDB = DAL('sqlite://tasks.sqlite',pool_size=1,check_reser

[web2py] Re: invalid table/column name "log" is a "ALL" reserved SQL/NOSQL keywor

2013-11-01 Thread Rupesh Pradhan
So, do you think it is better to avoid using reserved words completely and avoid the headache afterwords? -- 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: invalid table/column name "log" is a "ALL" reserved SQL/NOSQL keywor

2013-11-01 Thread Niphlod
This is because AFTER creating the cookbook, the scaffolding app uses check_reserved=['all'] in the DAL call. It prevents users to use table and field names that are reserved keywords in all databases, so i.e. if you move from sqlite to mysql your app won't raise an error. On Friday, November 1

[web2py] Override delete in smartgrid with links=

2013-11-01 Thread kwebb
I have a smartgrid example with delete button removed and a links=links dictionary for delete: links=[lambda row: A(T('Delete'),_href=URL("configure","delete",args=["delete", db.person, row.id]))] For children in the smartgrid, the delete URL request args remains the parent table name (

[web2py] restfull need to api/id/1 or /api/1

2013-11-01 Thread António Ramos
hello i dont get it about restfull I read the book and using the book example i should get my record with id 1 just by "Get" http://127.0.0.1:8000/angular/default/api/person/1 however i get *no matching patterns* if i go to http://127.0.0.1:8000/angular/default/api/person/id/1

[web2py] Change the label of buttons sqlform.grid (add, delete, etc.)

2013-11-01 Thread Carlynhos77
Hello, good morning ... I wonder how to change the label of buttons sqlform.grid (add, delete, etc.) ... how to access the ID or CLASS of each object, since everything is automatic created for us ... thank you! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://

[web2py] Re: Ticket ID __init__() got an unexpected keyword argument 'default'

2013-11-01 Thread arutti
Thanks Massimo, In fact this is on a system provided by a ISP, so I don't know how to fix the problem. I will ask the ISP maintainers. Regards, Andre On Monday, October 28, 2013 5:24:25 AM UTC+1, arutti wrote: > > Hello, > > This is a json error which doesn't occur on my dev. system Windows 7,