[web2py] Re: need help with query

2014-03-13 Thread Bastiaan
Thanks you almost had it, max = db.track_trace.created_on.max() having = (db.track_trace.id_status == 11) rij = db().select(db.track_trace.id_reparaties, db.track_trace.id_status, max, groupby=~db.track_trace.id_reparaties,having=(db.track_trace.id_status == 11)) The above code is working and

[web2py] nginx and uwsgi: upstream sent too big header while reading response header from upstream

2014-03-13 Thread Johann Spies
This error is giving met a lot of trouble. I have read about solutions using something like fastcgi_buffers 8 256k; fastcgi_buffer_size 128k; where nginx is using fastcgi, but I am working with uwsgi and this does not help me. Am I the only web2py user with this problem? I will be glad to hear

Re: [web2py] nginx and uwsgi: upstream sent too big header while reading response header from upstream

2014-03-13 Thread Roberto De Ioris
> This error is giving met a lot of trouble. > > I have read about solutions using something like > > fastcgi_buffers 8 256k; > fastcgi_buffer_size 128k; > > where nginx is using fastcgi, but I am working with uwsgi and this does > not > help me. > > Am I the only web2py user with this problem? >

Re: [web2py] nginx and uwsgi: upstream sent too big header while reading response header from upstream

2014-03-13 Thread Johann Spies
Thanks. Regards Johann On 13 March 2014 13:22, Roberto De Ioris wrote: > > > This error is giving met a lot of trouble. > > > > I have read about solutions using something like > > > > fastcgi_buffers 8 256k; > > fastcgi_buffer_size 128k; > > > > where nginx is using fastcgi, but I am working

[web2py] GAE deployment problem with gluon.settings

2014-03-13 Thread Francisco García
Hello all, I am trying to upload a Web2py application to GAE, as I use to do with other web2py apps (without problems). I find the following error in GAE logs: : 'module' object has no attribute 'settings' Traceback (most recent call last): File "/base/data/home/apps/s~proy1/1.37438895196618

[web2py] Re: Images not showed on linux

2014-03-13 Thread jldistefano
LightDot, you were right. The name of the image is Ok.ico, not ok.ico. What a fool. Thanks. > -- 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 rece

[web2py] differents troubles with extract_pgsql_models

2014-03-13 Thread jm
hi, i want to get the data model from a legacy database ; i ve got some troubles : - Data Type not supported: {'data_type': 'oid',... - Data Type not supported: {'data_type': 'ARRAY', ... - Data Type not supported: {'data_type': 'timestamp with time zone', - sometimes inside view ; is it by

[web2py] Problem with web2py on Heroku

2014-03-13 Thread Chris DeGroot
Hello; I have tried everything I could think of to solve this problem, but I just can't find a solution. I am trying to deploy my application to Heroku, following the instructions in the web2py manual. The welcome app works fine, so I think generally I have deployed the app properly. The ap

[web2py] Re: Bootstrap3 package - help to test

2014-03-13 Thread Dmitry Rodetsky
Found an issue when trying to use bs3.form() and have a placeholder In the following scenario if you have something like this in your db.py to modify your field to use an HTML5 placeholder: *db.table_name.row_name.widget = lambda field, value: SQLFORM.widgets.string.widget(field, value, _placeh

[web2py] Re: web2py on heroku getting "InternalError: current transaction is aborted..." Ticket

2014-03-13 Thread Chris DeGroot
Did you solve this problem? I have the same issue and the links at then end don't help. On Friday, December 27, 2013 11:45:24 PM UTC-5, Ismael Serratos wrote: > > Hello everybody, today I tried to push my application to Heroku by using > the setup-web2py-heroku.sh script. It works fine, but whe

[web2py] Re: About SQLFORM.grid

2014-03-13 Thread sujin870814
Yes~~ I wanna control th elements. Just making smaller column is what I want. Contents which are in header of grid is long.. so it make grid wider. That's why I used style="word-break:break-word" on table thead th but it didnt work thanks 2014년 3월 13일 목요일 오전 9시 45분 37초 UTC+9, Dave S 님의 말: > >

Re: [web2py] Re: jsonrpc2? can't get book example working

2014-03-13 Thread Michele Comitini
Anyway just remind: @service.jsonrpc def action(...): covers both v1 and v2 of the protocol. This is not in the manual, while it should be. 2014-03-13 2:46 GMT+01:00 Massimo Di Pierro : > Thank you Tim! > > > On Wednesday, 12 March 2014 20:28:40 UTC-5, Tim Richardson wrote: >> >> I patched it

[web2py] Re: GAE deployment problem with gluon.settings

2014-03-13 Thread Massimo Di Pierro
I made a change in trunk about this. Can you please check it? On Thursday, 13 March 2014 06:56:32 UTC-5, Francisco García wrote: > > > Hello all, > > I am trying to upload a Web2py application to GAE, as I use to do with > other web2py apps (without problems). > > I find the following error in GA

Re: [web2py] Custom widget and keepvalue

2014-03-13 Thread Thomas Bellembois
Update: this is a session problem. Adding session.forget() at the beginning of a controller function using my widget solves the issue. I have to find exactly why. Le mercredi 12 mars 2014 à 14:23 -0400, Richard Vézina a écrit : > Thomas, > > > What this widget does exactly, I don't have time to

[web2py] Re: Problem with web2py on Heroku

2014-03-13 Thread Massimo Di Pierro
Is this is a problem that worked before and then stopped working? Have you changed anything on the database side? Do you have data that you need to recovered. If at all an option, try delete the database and make a new one. Somehow there is a problem with the web2py_filesystem table where web2

[web2py] Re: Problem with web2py on Heroku

2014-03-13 Thread Chris DeGroot
The Heroku logs might also help (password removed): 2014-03-13T01:37:17.022191+00:00 heroku[web.1]: Starting process with command `python web2py/web2py.py -a '{PASSWORD}' -i 0.0.0.0 -p 35330` 2014-03-13T01:37:20.361879+00:00 app[web.1]: web2py Web Framework 2014-03-13T01:37:20.361879+00:00 app[

Re: [web2py] Re: web2py on heroku getting "InternalError: current transaction is aborted..." Ticket

2014-03-13 Thread Ismael Serratos
Nope, in fact I switched to ror :S because I needed to run on heroku ASAP. But I still getting the error on every web2py application I try to deploy on heroku. If I use postgres locally everything works just fine. > On 12/03/2014, at 18:31, Chris DeGroot wrote: > > Did you solve this problem?

[web2py] about encoding problem when I try exporting to csv with SQLFORM.grid

2014-03-13 Thread sujin870814
As the title, when I tried exporting SQLFORM.grid to csv by the button below the grid, the file is broken(I mean, I'm using Korean so, the part of Korean is broken). I think I need encoding option encoding it to euckr or utf8. Do you guys know about it? Thanks a lot! -- Resources: - http://w

[web2py] Re: Problem with web2py on Heroku

2014-03-13 Thread Chris DeGroot
Hi Massimo, This application worked until I switched to the Postgresql database, so it is definitely a database problem. Originally I was using the default database, which I guess is file-based, so the data would be lost about once a day when Heroku cleaned out its files. That was fine for te

[web2py] autocomplete widget for a field referencing a table

2014-03-13 Thread Peter Renkel
Hello, I have two table, one references another: db.define_table('table_a', Field('field_a_1'), format='%(field_a_1)s') db.define_table('table_b', Field('field_b_1'),'reference table_a', Field('field_b_2')) When using SQLFORM.grid edit, I don't want to have the drop down menu for t

[web2py] Problems - Changes on SQLTABLE? Upgraded to 2.9.4-stable

2014-03-13 Thread Fcosqui
Hi ! I have 2.9.4-stable version on my Server1 and 2.8.2-stable version on my Server2. the same Application and query on Server1 and Server2: rows = SQLTABLE(db(db.info).select(db.info.name, db.registros_chile.number.count(), orderby=db.info.number, groupby=db.info.number)) Server2 : Correc

[web2py] Re: Problem with web2py on Heroku

2014-03-13 Thread Chris DeGroot
I am looking again at the Heroku logs, specifically the line ERROR:web2py.dal:Could not retrieve applications/CaeSuite/databases/ 9e6a7c1bb77d791a89631de258057aed_web2py_session_CaeSuite.table Why is it looking for a file in */databases? Chris On Thursday, March 13, 2014 10:14:32 AM UTC-4, Mas

[web2py] Re: about encoding problem when I try exporting to csv with SQLFORM.grid

2014-03-13 Thread Massimo Di Pierro
which web2py version. How is the file broken? Can you give us more details? On Thursday, 13 March 2014 09:21:21 UTC-5, sujin...@gmail.com wrote: > > As the title, when I tried exporting SQLFORM.grid to csv by the button > below the grid, the file is broken(I mean, I'm using Korean so, the part of

[web2py] Re: Problems - Changes on SQLTABLE? Upgraded to 2.9.4-stable

2014-03-13 Thread Massimo Di Pierro
Do you have a longer traceback? On Thursday, 13 March 2014 10:49:01 UTC-5, Fcosqui wrote: > > Hi ! > > I have 2.9.4-stable version on my Server1 and 2.8.2-stable version on my > Server2. > > the same Application and query on Server1 and Server2: > > rows = SQLTABLE(db(db.info).select(db.info.na

[web2py] Re: Bootstrap3 package - help to test

2014-03-13 Thread Brando
Just found this Post. Thanks Paolo. I'll move my app over to this template and report any issues I find. On Monday, December 23, 2013 12:20:48 PM UTC-8, Paolo Caruccio wrote: > > I just completed a package that applies the bootstrap3 style to some > web2py elements - the current version cov

[web2py] Re: Want to use Bootstrap 3. Should I wait? Timeframe?

2014-03-13 Thread Brando
I just found Paolo's post about bootstrap3 here. https://groups.google.com/forum/#!topic/web2py/oSABtjmnYM0 I'll give that a try. On Wednesday, March 12, 2014 1:30:01 PM UTC-7, Brando wrote: > > I'm about to start changing my styles to use Bootstrap 3, but I don't know > if i should just w

Re: [web2py] Re: web2py on heroku getting "InternalError: current transaction is aborted..." Ticket

2014-03-13 Thread Chris DeGroot
That's unfortunate to hear that you haven't resolved it. I am having the exact same problem. Locally everything is fine, on Heroku, nothing. On Thursday, March 13, 2014 11:06:51 AM UTC-4, Ismael Serratos wrote: > > Nope, in fact I switched to ror :S because I needed to run on heroku ASAP. > > B

[web2py] web2py dal week query

2014-03-13 Thread 黄祥
hi, i'm interest in web2py dal query about year, month, day, hour, minutes, seconds but i can't see for week query. is it possible to do the query for the week? e.g. this work for year and month (db.sale_order_header.sale_order_date.year() == request.now.year) (db.sale_order_header.sale_order_dat

[web2py] Re: web2py dal week query

2014-03-13 Thread Massimo Di Pierro
No because the database engines do not support week(..). Are you looking for something like all Tuesdays? On Thursday, 13 March 2014 11:16:49 UTC-5, 黄祥 wrote: > > hi, > > i'm interest in web2py dal query about year, month, day, hour, minutes, > seconds > but i can't see for week query. is it pos

[web2py] Re: Need help rewriting url so that "http://mydomain.com/myapp" looks like "http://myapp.mydomain.com/"

2014-03-13 Thread Dan Feeney
You shouldn't need regex for this. Try using the *domains* key instead of *default_application* in routes.py: routers = dict( BASE = dict( domains = {'guide.mydomain.com': 'guide', 'mydomain.com': 'init', } ) ) hth On Wednesday, March 12, 2014 2:19:3

[web2py] Re: web2py dal week query

2014-03-13 Thread 黄祥
pardon, not sure what do you mean with all Tuesdays. what i want to achieve is to get week number, something like in python : isocalendar() strftime("%U") ref: http://stackoverflow.com/questions/2600775/how-to-get-week-number-in-python how to achieve it using web2py method? thanks and best rega

Re: [web2py] Re: web2py dal week query

2014-03-13 Thread Richard Vézina
Did you try what suggested in the ref you post? If it works with datetime it should work with web2py date, since it a datetime object... But maybe you want something else like Python Calendar... Hard to say with knowing what you want to do... Richard On Thu, Mar 13, 2014 at 1:14 PM, 黄祥 wrote:

Re: [web2py] Re: web2py dal week query

2014-03-13 Thread 黄祥
yes, already tried but got an error traceback. what i want to achieve is something like example below, but when i've tested it, i got an error traceback. any idea how to achieve it in web2py? e.g. import datetime (db.sale_order_header.sale_order_date.strftime("%U") == request.now.strftime("%U")

Re: [web2py] Re: web2py dal week query

2014-03-13 Thread Richard Vézina
I see you want to make a query but why you want to make that? Also, more experienced user correct me if I am wrong, but personnally I never had good result doing what you are doing, I mean I don't remember having it working correctly (even in SQL)... In : (db.sale_order_header.sale_order_date.iso

Re: [web2py] Re: web2py dal week query

2014-03-13 Thread Richard Vézina
db.table(1).field.isocalendar()[1] will works because you have a record selected... But you don't have access to any field value in context of where clause db(** where clause **).select() Richard On Thu, Mar 13, 2014 at 2:17 PM, Richard Vézina wrote: > I see you want to make a query but why y

[web2py] Verbatim Tag

2014-03-13 Thread David Simmons
Hi All I'm starting to look at Web2py and Angularjs. As many people have noted they clash with the use of the delimiter {{ and }}. I know I can change them in both Angular and Web2py but how difficult would it be to have a verbatim tag (command) so that I could write. {{= Verbatim}} {{ some

[web2py] Re: Verbatim Tag

2014-03-13 Thread Leonel Câmara
You can change web2py delimiters. For instance if you put this in your model: response.delimiters = ('') You can use php style delimiters. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2

Re: [web2py] Re: Need help rewriting url so that "http://mydomain.com/myapp" looks like "http://myapp.mydomain.com/"

2014-03-13 Thread Lisandro Rostagno
Thank you very much. So simple and clean solution. One more question: ¿is there any way to test this in localhost with web2py development server? 2014-03-13 14:09 GMT-03:00 Dan Feeney : > You shouldn't need regex for this. Try using the *domains* key instead of > *default_application* in routes.

[web2py] Python Performance Issue

2014-03-13 Thread horridohobbyist
I have a rather peculiar Python performance issue with web2py. I'm using pyShipping 1.8a (from http://pydoc.net/Python/pyShipping/1.8a/). The standalone program from the command line works quickly. However, after I've incorporated the code into my web2py application, the same pyShipping code ta

Re: [web2py] Python Performance Issue

2014-03-13 Thread Jonathan Lundell
On 13 Mar 2014, at 12:48 PM, horridohobbyist wrote: > I have a rather peculiar Python performance issue with web2py. I'm using > pyShipping 1.8a (from http://pydoc.net/Python/pyShipping/1.8a/). The > standalone program from the command line works quickly. However, after I've > incorporated the

[web2py] Re: Verbatim Tag

2014-03-13 Thread David Simmons
Hi Leonel. I know you can change the web2py delimters but that means views that uses extends has to be modified. If you simply switch of the interpretation of {{ for a block of html then you could mix and match angularjs and web2py. cheers Dave -- Resources: - http://web2py.com - http://web2

Re: [web2py] Python Performance Issue

2014-03-13 Thread horridohobbyist
Yes, same machine, same installation. All I did was move the module from my test directory to web2py's site-packages folder. Then I copied the main program into my default application controller. *The same code is executing* . Just to be sure I'm not going out of mind, I printed out the elapsed

[web2py] Re: Update textarea when dropdown changes

2014-03-13 Thread backseat
I did a pretty poor job of explaining my problem. I'll post again and try to make it clearer. -- 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 receive

[web2py] How to use AJAX within a SQLFORM.grid 'add' form

2014-03-13 Thread backseat
My SQLFORM.grid is based on a table that includes a field defined as a textarea. When I add a new record using the grid 'Add' button, I want to update that textarea using AJAX. My test view looks like this: {{extend 'layout.html'}} {{=' '.join(x.capitalize() for x in request.function.split('_'

Re: [web2py] Python Performance Issue

2014-03-13 Thread Jonathan Lundell
On 13 Mar 2014, at 1:38 PM, horridohobbyist wrote: > Yes, same machine, same installation. All I did was move the module from my > test directory to web2py's site-packages folder. Then I copied the main > program into my default application controller. The same code is executing. > > Just to be

[web2py] Re: Admin and tickets broken after upgrade to 2.9.4

2014-03-13 Thread shapovalovdenis
Thanks, just did it, unzipped http://www.web2py.com/examples/static/web2py_src.zip on top of web2py old install, now it says: [Thu Mar 13 23:49:54 2014] [error] [client ] from sqlhtml import SQLFORM, SQLTABLE [Thu Mar 13 23:49:54 2014] [error] [client ] File "/home/www-data/web2py/gluon/

[web2py] Re: Problem with web2py on Heroku

2014-03-13 Thread Massimo Di Pierro
web2py stores metadata about DB tables which have been created. This is necessary for migrations. Normally this metadata is store in *.table files. Heroku has a strange filesystem that gets wiped up at random times. For this reason the *.table files are not in the "normal filesystem". Web2py cr

[web2py] Re: Admin and tickets broken after upgrade to 2.9.4

2014-03-13 Thread Massimo Di Pierro
Another user has reported a similar problem on google app engine and it was due to a circular reference. Strangely I could not reproduce it. Anyway, it is fixed. My suggestion is try unzip in a different (new) folder and check if it works. On Thursday, 13 March 2014 16:55:10 UTC-5, shapova..

[web2py] Re: Verbatim Tag

2014-03-13 Thread David Simmons
Hi All (again). I did some digging around with the web2py source code and came up with this. https://gist.github.com/shortly-portly/9538005 The usage is pretty straight forward. You can use normal Web2py tags {{ and }}. When you want to drop down into Angular, surround your stuff with {{

[web2py] Re: Admin and tickets broken after upgrade to 2.9.4

2014-03-13 Thread shapovalovdenis
Your suggestion just did the trick. But now I'm curious - what was the problem then?? On Friday, March 14, 2014 12:14:11 AM UTC+2, Massimo Di Pierro wrote: > > Another user has reported a similar problem on google app engine and it > was due to a circular reference. Strangely I could not reprodu

Re: [web2py] Python Performance Issue

2014-03-13 Thread Michele Comitini
Other things to look for are related to concurrency: - Table, record locks - concurrent threads - long db transactions one thing you should try first is to stop web2py completely and see if using a single process from the commandline makes any difference. I mean using command line like: $ python

Re: [web2py] Re: web2py dal week query

2014-03-13 Thread 黄祥
actually i wan to create a chart from that query : e.g. for year and month is work this way *views/default/index.html* {{sum_sale_order = db.sale_order_header.total.sum() }} {{query_yearly_sale_order = (db.sale_order_header.sale_order_date.year() == request.now.year) }} {{sum_yearly_sale_order =

Re: [web2py] Re: web2py dal week query

2014-03-13 Thread Michele Comitini
>From postgresql manual: http://www.postgresql.org/docs/current/static/functions-datetime.html SELECT EXTRACT(WEEK FROM TIMESTAMP '2001-02-16 20:38:40'); Not supported by DAL expressions, but you can use executesql... 2014-03-14 0:26 GMT+01:00 黄祥 : > actually i wan to create a chart from that

[web2py] Re: Problems - Changes on SQLTABLE? Upgraded to 2.9.4-stable

2014-03-13 Thread drayco
We use extensive SQLTABLE and in this moment we have a lot of errors similar to File "/home/drayco/web2py/gluon/sqlhtml.py", line 2929, in __init__ columns = ['.'.join(sqlrows.db._adapter.REGEX_TABLE_DOT_FIELD.match(c).groups()) for c in sqlrows.colnames] AttributeError: 'NoneType' object h