[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain
the file served wrong come from cloudflare though 1. cache-control: public, max-age=3600 2. cf-cache-status: MISS 3. cf-ray: 1d0249f0f33c0e24-MXP 4. content-type: http_x_forwarded_proto 5. date: Wed, 01 Apr 2015 06:38:02 GMT 6. expires: Wed, 01 Apr 2015 07:38:02 GMT 7. last-modified: Thu, 26 Mar 2015 22:32:44 GMT 8. pragma: cache 9. server: cloudflare-nginx 10. status: 200 OK 11. strict-transport-security: max-age=63072000; includeSubDomains 12. vary: Accept-Encoding 13. version: HTTP/1.1 14. x-content-type-options: nosniff 15. x-powered-by: web2py -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: 2.10.1 / Windows errors / cache
Straight from Peter Pan “Everytime a user says 'I can't clean the cache,' there's a a little developer somewhere that falls down dead muahhaha. We'd need a regression test for it. On Wednesday, April 1, 2015 at 7:01:20 AM UTC+2, Kiran Subbaraman wrote: Just cloned the repo, and noticed the 2.10.2 tag. Tried this again, in this codebase, and the errors remain. Please note, I have highlighted two issues that occur: - Install the sample app, view the default page. The page comes up just fine. Click page-refresh, and you see the first error: type 'exceptions.IOError' [Errno 13] Permission denied - Go to the Admin page, and select clean, for this app. The second error: type 'exceptions.WindowsError' [Error 32] The process cannot access the file because it is being used by another process Kiran Subbaramanhttp://subbaraman.wordpress.com/about/ On Wed, 01-04-2015 8:58 AM, Massimo Di Pierro wrote: 2.10.2 fixes it as Leonel suggested. On Tuesday, 31 March 2015 19:15:00 UTC-5, Leonel Câmara wrote: Awww dammit we forgot to update the admin module. I attached an admin.py file you can replace the one in the gluon with to get this to work until we make a proper fix. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: websocket messaging VS scheduler
start processes separately: you can't launch daemon processe within a web2py action, for pete's sake :P web2py.py -a yourpassword #--the webserver web2py.py -K yourappname#-- the scheduler gluon/contrib/websocket_messaging.py -k yourkey -p #-- message dispatcher On Wednesday, April 1, 2015 at 5:19:42 AM UTC+2, Carlos Costa wrote: I would like to use scheduler with a task sends websocket messages but it looks like they conflict with each other. I am able to run only one of them. If I start scheduler first, websocket freezes web2py. If I start websocket first scheduler do not run any worker. I start we2py with web2py.py -K app -a password -X -D15 In some action I do this to start the websocket import subprocess subprocess.call(python gluon/contrib/websocket_messaging.py -k mykey -p .split(' ')) but this freezes everything. If I start websocket from shell manually both things work but I would like my app to guarantee that things are running. Some idea why this is not possible? Running 2.9.12 with python 2.7 on Ubuntu 14.10 -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: idea: new helpers
hell no! On Wednesday, April 1, 2015 at 7:51:26 AM UTC+2, Dmitry Ermolaev wrote: DIV( _class='row my_class') = ROW(_class='my_class') DIV( _class='col-sm-4 my_class') = COL4(_class='my_class') -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: web2py 2.10.1 is OUT
Hi Massimo, The realease is not tagget in git. Could you tag it? Thank you! 2015-04-01 0:27 GMT+02:00 Massimo Di Pierro massimo.dipie...@gmail.com: Also. Thanks to Kathy and Luca for all your GAE tests! On Tuesday, 31 March 2015 17:26:18 UTC-5, Massimo Di Pierro wrote: - welcome app defaults to Bootstrap 3 - DAL - pyDAL (thanks Giovanni, Niphlod, Paolo) - new modular dal - fixed problems with GAE support - moved to full NDB support - improved connection pooling logic - optional cache.ram.max_ram_utilization = 90 (experimental) - improved cache.disk logic (thanks Niphlod and Leonel) - lots of pep8 improvements, thanks Richard - added support for email attchments when auth.settings.server='gae' - fixed app.yaml.example for GAE - fixed many small issues - many many more tests (thanks Giovanni, Niphlod, Paolo) - upgrading static libraries (bootstrap, codemirror, jquery, etc) -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Profile: http://it.linkedin.com/in/compagnucciangelo -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Web2py 2.10.1 error: define_table argument is not a Field or Table
Hi, i get this error with Web2py 2.10.1 on all applications: syntaxError: define_table argument is not a Field or Table: no table. is_active Don't know how to fix it. Best, kristjan -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py 2.10.1 is OUT
*When I create new simple application, i get this error:* SyntaxError: define_table argument is not a Field or Table: no table.is_active On Wednesday, 1 April 2015 00:26:18 UTC+2, Massimo Di Pierro wrote: - welcome app defaults to Bootstrap 3 - DAL - pyDAL (thanks Giovanni, Niphlod, Paolo) - new modular dal - fixed problems with GAE support - moved to full NDB support - improved connection pooling logic - optional cache.ram.max_ram_utilization = 90 (experimental) - improved cache.disk logic (thanks Niphlod and Leonel) - lots of pep8 improvements, thanks Richard - added support for email attchments when auth.settings.server='gae' - fixed app.yaml.example for GAE - fixed many small issues - many many more tests (thanks Giovanni, Niphlod, Paolo) - upgrading static libraries (bootstrap, codemirror, jquery, etc) -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Web2py 2.10.1 error: define_table argument is not a Field or Table
Same error here. Oss. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Web2py 2.10.1 error: define_table argument is not a Field or Table
well, what you can try is to get the latest web2py version, unzip it and then copy your apps in your new web2py instance. It might be something wrong with the update process. miercuri, 1 aprilie 2015, 15:25:58 UTC+3, Najtsirk a scris: It's not working for me. On Wednesday, 1 April 2015 13:28:38 UTC+2, rif wrote: I fixed this by deleting the welcome app and replacing it with the one from the latest version. miercuri, 1 aprilie 2015, 13:29:24 UTC+3, Najtsirk a scris: Hi, i get this error with Web2py 2.10.1 on all applications: syntaxError: define_table argument is not a Field or Table: no table. is_active Don't know how to fix it. Best, kristjan -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py 2.10.1 is OUT
It looks there is something else that does not get updated properly. Moving the apps in a freshly unzipped web2py instance fixes this issue. miercuri, 1 aprilie 2015, 14:30:19 UTC+3, rif a scris: If you performed an update make sure you have the latest welcome app code. miercuri, 1 aprilie 2015, 12:22:37 UTC+3, Najtsirk a scris: *When I create new simple application, i get this error:* SyntaxError: define_table argument is not a Field or Table: no table.is_active On Wednesday, 1 April 2015 00:26:18 UTC+2, Massimo Di Pierro wrote: - welcome app defaults to Bootstrap 3 - DAL - pyDAL (thanks Giovanni, Niphlod, Paolo) - new modular dal - fixed problems with GAE support - moved to full NDB support - improved connection pooling logic - optional cache.ram.max_ram_utilization = 90 (experimental) - improved cache.disk logic (thanks Niphlod and Leonel) - lots of pep8 improvements, thanks Richard - added support for email attchments when auth.settings.server='gae' - fixed app.yaml.example for GAE - fixed many small issues - many many more tests (thanks Giovanni, Niphlod, Paolo) - upgrading static libraries (bootstrap, codemirror, jquery, etc) -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Web2py 2.10.1 error: define_table argument is not a Field or Table
It's not working for me. On Wednesday, 1 April 2015 13:28:38 UTC+2, rif wrote: I fixed this by deleting the welcome app and replacing it with the one from the latest version. miercuri, 1 aprilie 2015, 13:29:24 UTC+3, Najtsirk a scris: Hi, i get this error with Web2py 2.10.1 on all applications: syntaxError: define_table argument is not a Field or Table: no table. is_active Don't know how to fix it. Best, kristjan -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Python 101
The 2nd example is bullet proof. However the 1st example should work also because if i print temp1 before append temp1 to the temp var i see it like {'a': 0, 'c': 0, 'b': 0} {'a': 1, 'c': 1, 'b': 1} {'a': 2, 'c': 2, 'b': 2} temp=[] temp1={'a':0,'b':0,'c':0} for x in range(3): temp1['a']=x temp1['b']=x temp1['c']=x *print temp1* temp.append(temp1) print temp Still dont get it 2015-04-01 12:47 GMT+01:00 Leonel Câmara leonelcam...@gmail.com: The difference is that in the second example you're creating the dictionary inside the loop. In the first example you create the dictionary outside so each step of the loop is modifying the same dictionary and then you put that same dictionary 3 times in the list. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Web2py 2.10.1 error: define_table argument is not a Field or Table
That works!Tnx! On Wednesday, 1 April 2015 14:31:28 UTC+2, rif wrote: well, what you can try is to get the latest web2py version, unzip it and then copy your apps in your new web2py instance. It might be something wrong with the update process. miercuri, 1 aprilie 2015, 15:25:58 UTC+3, Najtsirk a scris: It's not working for me. On Wednesday, 1 April 2015 13:28:38 UTC+2, rif wrote: I fixed this by deleting the welcome app and replacing it with the one from the latest version. miercuri, 1 aprilie 2015, 13:29:24 UTC+3, Najtsirk a scris: Hi, i get this error with Web2py 2.10.1 on all applications: syntaxError: define_table argument is not a Field or Table: no table. is_active Don't know how to fix it. Best, kristjan -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain
you're serving static files with no versioning and with web2py ... 1. x-powered-by: web2py On Wednesday, April 1, 2015 at 4:43:52 AM UTC+2, weheh wrote: I'm getting a 200 status on the css files that aren't being transferred correctly. Also, on Chrome Firebug I can't find the same Net tab and view you describe, so I can't find that X-Powered-By line. On Tuesday, March 31, 2015 at 2:09:53 PM UTC-7, Niphlod wrote: You need to activate the Net tab ... you're probably inspecting a 304 response, which doesn't carry the header: hit ctrl+f5 to erase the cache and refresh the page. this is what it returns on my system Cache-ControlprivateConnectionkeep-aliveContent-Length117305Content-Typetext/css; charset=utf-8DateTue, 31 Mar 2015 21:06:50 GMTLast-ModifiedMon, 16 Mar 2015 07:42:10 GMTPragmacacheServerRocket 1.2.6 Python/2.7.8X-Powered-By web2py On Tuesday, March 31, 2015 at 10:54:09 PM UTC+2, Dave S wrote: On Tuesday, March 31, 2015 at 1:34:28 PM UTC-7, Niphlod wrote: web2py appends a X-Powered-By : web2py header. I'm thinking you are saying that is put into the css file's response header; what's the best way to see that? Firefox's developer tool doesn't show headers in the CSS tab, and in the network tab I see just Connection:, Content-Type:, Date:, and Server: (which is Rocket for my case). The httpserver.log file for my Web2Py instance does show GET requests for the CSS files. /dps still wet behind the ears On Tuesday, March 31, 2015 at 10:27:25 PM UTC+2, weheh wrote: How do I figure out whether web2py is serving the css files? On Tuesday, March 31, 2015 at 12:39:00 AM UTC-7, Niphlod wrote: aside from the fact that that config is uber-simple and not what web2py ships usually. who is serving css's ? apache or web2py ? On Tuesday, March 31, 2015 at 7:05:25 AM UTC+2, weheh wrote: Thanks, Brian. My page does have a lot of ajax calls. The problem seems to be that some of my css files aren't coming through. Firebug says they're being delivered as text/plain instead of text/css. Consequently, the page load incorrectly and users probably bail, causing the IO Error in mod_wsgi. Have you had the css file problem? Here's the actual Firebug error message: Resource interpreted as Stylesheet but transferred with MIME type text/plain: https://www.myapp.com/myapp/static/css/web2py.css;. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py 2.10.1 is OUT
If you performed an update make sure you have the latest welcome app code. miercuri, 1 aprilie 2015, 12:22:37 UTC+3, Najtsirk a scris: *When I create new simple application, i get this error:* SyntaxError: define_table argument is not a Field or Table: no table.is_active On Wednesday, 1 April 2015 00:26:18 UTC+2, Massimo Di Pierro wrote: - welcome app defaults to Bootstrap 3 - DAL - pyDAL (thanks Giovanni, Niphlod, Paolo) - new modular dal - fixed problems with GAE support - moved to full NDB support - improved connection pooling logic - optional cache.ram.max_ram_utilization = 90 (experimental) - improved cache.disk logic (thanks Niphlod and Leonel) - lots of pep8 improvements, thanks Richard - added support for email attchments when auth.settings.server='gae' - fixed app.yaml.example for GAE - fixed many small issues - many many more tests (thanks Giovanni, Niphlod, Paolo) - upgrading static libraries (bootstrap, codemirror, jquery, etc) -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Python 101
Please explain why this code temp=[] temp1={'a':0,'b':0,'c':0} for x in range(3): temp1['a']=x temp1['b']=x temp1['c']=x temp.append(temp1) print temp prints [{'a': 2, 'c': 2, 'b': 2}, {'a': 2, 'c': 2, 'b': 2}, {'a': 2, 'c': 2, 'b': 2}] instead of [{'a': 0, 'c': 0, 'b': 0}, {'a': 1, 'c': 1, 'b': 1}, {'a': 2, 'c': 2, 'b': 2}] i always did it like this temp=[] for x in range(3): *temp1={'a':0,'b':0,'c':0}* temp1['a']=x temp1['b']=x temp1['c']=x temp.append(temp1) print temp this prints it correctly but dont understand the diference Thank you António -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Python 101
The difference is that in the second example you're creating the dictionary inside the loop. In the first example you create the dictionary outside so each step of the loop is modifying the same dictionary and then you put that same dictionary 3 times in the list. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: idea: new helpers
I don't think we want helpers specific to particular front-end frameworks (at least not in the web2py core -- would be fine as a plugin). Anthony On Wednesday, April 1, 2015 at 1:51:26 AM UTC-4, Dmitry Ermolaev wrote: DIV( _class='row my_class') = ROW(_class='my_class') DIV( _class='col-sm-4 my_class') = COL4(_class='my_class') -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: idea: new helpers
Dmitry, you can create your own custom helpers and use them in your app. On Wed, Apr 1, 2015 at 8:30 AM, Niphlod niph...@gmail.com wrote: hell no! On Wednesday, April 1, 2015 at 7:51:26 AM UTC+2, Dmitry Ermolaev wrote: DIV( _class='row my_class') = ROW(_class='my_class') DIV( _class='col-sm-4 my_class') = COL4(_class='my_class') -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Web2py 2.10.1 error: define_table argument is not a Field or Table
I fixed this by deleting the welcome app and replacing it with the one from the latest version. miercuri, 1 aprilie 2015, 13:29:24 UTC+3, Najtsirk a scris: Hi, i get this error with Web2py 2.10.1 on all applications: syntaxError: define_table argument is not a Field or Table: no table. is_active Don't know how to fix it. Best, kristjan -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Python 101
Python is treating the dictionary as a pure object where the reference is maintained and whatever changes you do (other than redefining it) results in the same changes reflected in all the places where the object occurs. In the first set of code, you are not redefining the dictionary (temp1) and hence all three members of the temp end up referring to the temp1 at the end. In the second case, you are redefining the temp1. Look at the meaning of shallow copy and deep copy https://docs.python.org/2/library/copy.html in Python. Also there are similar questions in Stackoverflow. e.g.http://stackoverflow.com/questions/5244810/python-appending-a-dictionary-to-a-list-i-see-a-pointer-like-behavior In your first example, may be you can append a new dictionary with values from temp1: that is temp.append({'a':temp1['a'].}) Good luck. Sundar - On Wednesday, April 1, 2015 at 5:03:01 PM UTC+5:30, Ramos wrote: Please explain why this code temp=[] temp1={'a':0,'b':0,'c':0} for x in range(3): temp1['a']=x temp1['b']=x temp1['c']=x temp.append(temp1) print temp prints [{'a': 2, 'c': 2, 'b': 2}, {'a': 2, 'c': 2, 'b': 2}, {'a': 2, 'c': 2, 'b': 2}] instead of [{'a': 0, 'c': 0, 'b': 0}, {'a': 1, 'c': 1, 'b': 1}, {'a': 2, 'c': 2, 'b': 2}] i always did it like this temp=[] for x in range(3): *temp1={'a':0,'b':0,'c':0}* temp1['a']=x temp1['b']=x temp1['c']=x temp.append(temp1) print temp this prints it correctly but dont understand the diference Thank you António -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Python 101
temp1 object exist only once. temp1 variable is a reference to that object. In temp.append(temp1) you add the reference as item to the list, so finally you have list with 3 items: 3 references to the same object. Now, when you change*) the object, it changes, and all variables referencing it, will show new (same) content. *)...and your last change is made in the last iteration of the cycle, where you set =2 into all elements (of the single existing dictionary object). In second case you create 3 different objects (dictionaries). You populate the first with 0, second with 1, third with 2. If you are not sure if you work with one object or more objects, use 'is' operator, or 'id()' function. 'id()' returns unique id for each (different) object, 'is' return True if both compared variables(or expressions) refer same object. In first code example: temp[0] is temp[1], id(temp[0])==id(temp[1]) --both True In second code example: temp[0] is temp[1], id(temp[0])==id(temp[1]) --both False - It is a little dificult properly understand Python, because he has 2 different assignments. Example: variable = variable-or-expression can do 2 different thinks. Maybe it would be better if there were 2 different operators, but it is just one: = In first case (if the right side is not the variable): object is created and reference to it saved to variable - Examples: dd=[1,2], ddd={}, stri=stri+'more-characters' In second case (if the right side is variable): reference to (already existing) object is saved to new variable - Examples: dd2=dd, stri2=stri, stri4=stri3='some-text' (I mean for the left assignment) If just one object exists, changing it using any of the variables (which link it), will 'inline change' the object, i.e. change the content for all variables. This is possible for mutable objects only. - Example: dd2.append() will change dd too But assign command never makes 'inline change', so with dd2=... you (link it to existing or new created object, but you) never change dd. Same happens when arguments are passed to function parameters. Same happens when function return result from return command. Plus you need know that default argument values for functions are created when function object (and function variable) is created, i.e. NOT with each call. If you 'inline change' such object, next call will start with changed value! -- So please fully understand what is here above. It is very difficult, but it is not lot of information - and it is base of Python behavior. Dne středa 1. dubna 2015 13:33:01 UTC+2 Ramos napsal(a): Please explain why this code temp=[] temp1={'a':0,'b':0,'c':0} for x in range(3): temp1['a']=x temp1['b']=x temp1['c']=x temp.append(temp1) print temp prints [{'a': 2, 'c': 2, 'b': 2}, {'a': 2, 'c': 2, 'b': 2}, {'a': 2, 'c': 2, 'b': 2}] instead of [{'a': 0, 'c': 0, 'b': 0}, {'a': 1, 'c': 1, 'b': 1}, {'a': 2, 'c': 2, 'b': 2}] i always did it like this temp=[] for x in range(3): *temp1={'a':0,'b':0,'c':0}* temp1['a']=x temp1['b']=x temp1['c']=x temp.append(temp1) print temp this prints it correctly but dont understand the diference Thank you António -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Python 101
Got it My confusion was why the three equal elements Now i see it clearly If i add the temp1 3 times to temp, when i change it for the last time inside the loop it changes all the 3 elements inside the full list temp. Thank you 2015-04-01 14:21 GMT+01:00 Anthony abasta...@gmail.com: In the first example, you have only a single dictionary (created outside the loop). You then append that single dictionary to a list multiple times. Each item in the list is still just that single dictionary (you are not creating separate copies of the dictionary). In the first loop, you are setting all the values to 0, so when you print, you see 0's. In the next loop, you set all the values to 1, so you then see 1's. But in the final loop, you set all the values to 2. So, when you finally print the full list (after the for loop), you are just printing the same dictionary of 2's three times. In the second example, you create a completely new dictionary within each iteration of the loop (which you happen to assign to the same variable name). In this case, you are building a list with three separate dictionaries, each of which contains different values. In both examples, replace the final line of the loop with: temp.append(id(temp1)) You will see in the first case that you get the same id three times (indicating it is the same dictionary object), but in the second case, you will get three different ids (indicating three different dictionary objects). Anthony On Wednesday, April 1, 2015 at 8:34:56 AM UTC-4, Ramos wrote: The 2nd example is bullet proof. However the 1st example should work also because if i print temp1 before append temp1 to the temp var i see it like {'a': 0, 'c': 0, 'b': 0} {'a': 1, 'c': 1, 'b': 1} {'a': 2, 'c': 2, 'b': 2} temp=[] temp1={'a':0,'b':0,'c':0} for x in range(3): temp1['a']=x temp1['b']=x temp1['c']=x *print temp1* temp.append(temp1) print temp Still dont get it 2015-04-01 12:47 GMT+01:00 Leonel Câmara leonelcam...@gmail.com: The difference is that in the second example you're creating the dictionary inside the loop. In the first example you create the dictionary outside so each step of the loop is modifying the same dictionary and then you put that same dictionary 3 times in the list. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Python 101
In the first example, you have only a single dictionary (created outside the loop). You then append that single dictionary to a list multiple times. Each item in the list is still just that single dictionary (you are not creating separate copies of the dictionary). In the first loop, you are setting all the values to 0, so when you print, you see 0's. In the next loop, you set all the values to 1, so you then see 1's. But in the final loop, you set all the values to 2. So, when you finally print the full list (after the for loop), you are just printing the same dictionary of 2's three times. In the second example, you create a completely new dictionary within each iteration of the loop (which you happen to assign to the same variable name). In this case, you are building a list with three separate dictionaries, each of which contains different values. In both examples, replace the final line of the loop with: temp.append(id(temp1)) You will see in the first case that you get the same id three times (indicating it is the same dictionary object), but in the second case, you will get three different ids (indicating three different dictionary objects). Anthony On Wednesday, April 1, 2015 at 8:34:56 AM UTC-4, Ramos wrote: The 2nd example is bullet proof. However the 1st example should work also because if i print temp1 before append temp1 to the temp var i see it like {'a': 0, 'c': 0, 'b': 0} {'a': 1, 'c': 1, 'b': 1} {'a': 2, 'c': 2, 'b': 2} temp=[] temp1={'a':0,'b':0,'c':0} for x in range(3): temp1['a']=x temp1['b']=x temp1['c']=x *print temp1* temp.append(temp1) print temp Still dont get it 2015-04-01 12:47 GMT+01:00 Leonel Câmara leonelcam...@gmail.com: The difference is that in the second example you're creating the dictionary inside the loop. In the first example you create the dictionary outside so each step of the loop is modifying the same dictionary and then you put that same dictionary 3 times in the list. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py 2.10.1 is OUT
What version were you upgrading from? -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py 2.10.1 is OUT
It was exactly the previous one. miercuri, 1 aprilie 2015, 16:45:09 UTC+3, Massimo Di Pierro a scris: What version were you upgrading from? -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py 2.10.1 is OUT
The releases from here https://github.com/web2py/web2py/releases look different from what we have, a little confusing. miercuri, 1 aprilie 2015, 16:45:09 UTC+3, Massimo Di Pierro a scris: What version were you upgrading from? -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain
Was just wondering if you were dealing with 64 bit. But that doesn't appear to be the issue. -Jim On Tuesday, March 31, 2015 at 8:55:56 PM UTC-5, weheh wrote: Thanks, Jim. 32-bit Apache Version 2.2.x mod-wsgi for python 2.7 On Tuesday, March 31, 2015 at 1:46:26 PM UTC-7, Jim S wrote: What versions of Apache and mod-wsgi? 32 bit or 64 bit? -Jim -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py 2.10.1 is OUT
I can't reproduce the issue using zipped releases from github. miercuri, 1 aprilie 2015, 17:00:59 UTC+3, rif a scris: The releases from here https://github.com/web2py/web2py/releases look different from what we have, a little confusing. miercuri, 1 aprilie 2015, 16:45:09 UTC+3, Massimo Di Pierro a scris: What version were you upgrading from? -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Servidor Web2py Modo Produção
Ahahah you probably should go to the Brazilian users group. I recommend nginx I have been very happy with it. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Best practices for external form submission?
Hi, I have a web2py app that sits as a WSGI application within a Wordpress site. All works well, but I need to have a form in the WP home page that submits to an (essentially identical) SQLFORM within the web2py app, and displays its errors as if submitted on the web2py page as opposed to the WordPress version. At the moment, the form submits, and I can see all the values in the request (including _formname, but excluding _formkey of course), but is not processed. Is there a straightforward and safe way to accept input from this external form on the home page and have it processed in the normal way, or am I better off scripting the input with validate_and_insert using the post_vars, and if necessary writing the errors out to form.errors so that they are displayed in the webb2py version? -- Regards, PhilK 'a bell is a cup...until it is struck' -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] rewrite url
Hi, I have installed web2py on a webserver with a other webapplication on it. Is it possible that web2py lives in a subdirectory. As example the legacy web application hat the url: http://www.my-fancy-server.com The web2py application should be reachable for evaluation on: http://www.my-fancy-server.com/web2py/app/contr/func/... I know how to gonfigure the webserver, but what and how must I configure in web2py? Many thanks, Kurt -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Please report here upgrading issues to web2py 2.10.2
Please report here upgrading issues to web2py 2.10.2 from which version? which os? which python version? what is the problem? complete traceback -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: rewrite url
using routes.py, something like routes_in = ( ('/web2py/$anything', '/$anything'), ) routes_out = [(x, y) for (y, x) in routes_in] should suffice I prefer being more conservative and allow only proper app names given you'd like to publish the app named myapp, it would be routes_in = ( ('/web2py/myapp/$anything', '/myapp/$anything'), ) routes_out = [(x, y) for (y, x) in routes_in] On Wednesday, April 1, 2015 at 6:02:22 PM UTC+2, Kurt Stieger wrote: Hi, I have installed web2py on a webserver with a other webapplication on it. Is it possible that web2py lives in a subdirectory. As example the legacy web application hat the url: http://www.my-fancy-server.com The web2py application should be reachable for evaluation on: http://www.my-fancy-server.com/web2py/app/contr/func/... I know how to gonfigure the webserver, but what and how must I configure in web2py? Many thanks, Kurt -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] rewrite url
Hi Kurt, On 01/04/15 13:44, Kurt Stieger wrote: Hi, I have installed web2py on a webserver with a other webapplication on it. Is it possible that web2py lives in a subdirectory. As example the legacy web application hat the url: http://www.my-fancy-server.com The web2py application should be reachable for evaluation on: http://www.my-fancy-server.com/web2py/app/contr/func/... I know how to gonfigure the webserver, but what and how must I configure in web2py? When you ay that you know how to configure the web-server, am I right in thinking that you are configuring the web2py app as a WSGI application? If so, you will probably want to consider the contents of routes.py and add a path_prefix corresponding to your WSGIScriptAlias. There is an example of this in this Stackoverflow post: - http://stackoverflow.com/questions/16183293/apache-config-for-php-and-web2py HTH -- Regards, PhilK 'a bell is a cup...until it is struck' -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py 2.10.1 is OUT
beware of the dog: since now pydal is a subrepo, releases on github don't carry the subrepo in it. On Wednesday, April 1, 2015 at 4:07:17 PM UTC+2, rif wrote: I can't reproduce the issue using zipped releases from github. miercuri, 1 aprilie 2015, 17:00:59 UTC+3, rif a scris: The releases from here https://github.com/web2py/web2py/releases look different from what we have, a little confusing. miercuri, 1 aprilie 2015, 16:45:09 UTC+3, Massimo Di Pierro a scris: What version were you upgrading from? -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Servidor Web2py Modo Produção
OLA GALERA, Gostaria de saber qual o servidor de aplicação python, mas recomendado para rodar aplicação de grande porte feito em web2py -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: manually update password
Hello Niphlod *Because I've *modified* the presentation of the form (I use check boxes to represent multiselect box) and save another variables that they aren't part of the form.* All I need is to know how to recover the password value and save if this changed. Regards. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Difference between response.files.insert() and URL(), and congratulations on v2.10
(First--congrats on v2.10 and thanks to all you contributors for an incredible framework.) What's the difference between these two lines of code? response.files.insert(1,URL('static','adminlte/bootstrap/css/bootstrap.min.css')) link href={{=URL('static','adminlte/bootstrap/css/bootstrap.min.css')}} rel=stylesheet type=text/css / -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: New modular DAL!
The functionality/API hasn't changed. The DAL has simply been moved to its own repository (so it can more easily be used outside of web2py), and it has been divided up into separate modules instead of being one big file. Anthony On Wednesday, April 1, 2015 at 11:37:33 PM UTC-4, Ron Chatterjee wrote: Hello all, I am looking at the changelog for 2.10.1 and it says, new modular dal Can someone give me a simple example of what new modular dal is as oppose to regular DAL that we are used to, like db.define_table('table_name',Field('field_name',...))? -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Difference between response.files.insert() and URL(), and congratulations on v2.10
On Wednesday, April 1, 2015 at 7:45:10 PM UTC-4, Tom Campbell wrote: (First--congrats on v2.10 and thanks to all you contributors for an incredible framework.) What's the difference between these two lines of code? response.files.insert(1,URL('static','adminlte/bootstrap/css/bootstrap.min.css')) link href={{=URL('static','adminlte/bootstrap/css/bootstrap.min.css')}} rel=stylesheet type=text/css / Assuming the first line is at some point followed by response.include_files(), there is no difference. 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: 2.10.1 / Windows errors / cache
https://lh3.googleusercontent.com/-QAQ1YDNk2YU/VRzHg651DCI/EnU/DBGqOyey1zI/s1600/admin-cleanup.png Here is the screenshot of the message I see, when I try to clean the app, via the admin app. This is not something that I see all the time, but does occur frequently enough. On Thursday, April 2, 2015 at 10:03:08 AM UTC+5:30, Kiran Subbaraman wrote: Leonel, Thank you for trying to replicate the issue - am guessing you replicated the cleaning up of the cache issue, and not the issue while using the cache itself? I went ahead and refreshed the web2py repo (with your latest PR in it), and tried to test for these issues. I can confirm that the cleaning issue seems to be sorted out, except once in a while I see a message on the admin screen, while trying to clean the app, that some files were not removed / cleaned. I do not have screenshot, will share the next time I come across it. The issue with the usage of the cache itself is now an issue that I have raised on github: https://github.com/web2py/web2py/issues/895 Please let me know if any more information will help in sorting out this issue. I'll see if I can take a look at the code, today, to track down this issue. On Wednesday, April 1, 2015 at 11:01:14 PM UTC+5:30, Leonel Câmara wrote: Kiran I had some trouble replicating with 2.10.2 but after putting 6 tabs auto refreshing in the initial page and another tab in the admin cleaning I started seeing the error both with the cache and session. I patched app_cleanup so it would not throw an error when it encountered locked files as these are files that are being used by other processes and cannot be deleted, it's not a problem anyway since fileutils/w2p_pack ignores these directories. Can you verify that this also fixes stuff for you: https://github.com/web2py/web2py/pull/891 -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] web2py Complete Reference Manual
I like hard copy books.. If the new web2py Complete Reference Manual is ever updated to the 6th edition for hard copy publication, please consider making the book larger. Make the pages longer and make the pages wider, so the book will not be so thick and will have the tendency to stay open and lay flat. Thanks for a great software product.. Take care, be good to yourself and have fun, -- Joe Simpson “Reasonable people adapt themselves to the world. Unreasonable people attempt to adapt the world to themselves. All progress, therefore, depends on unreasonable people.” George Bernard Shaw -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] New modular DAL!
Hello all, I am looking at the changelog for 2.10.1 and it says, new modular dal Can someone give me a simple example of what new modular dal is as oppose to regular DAL that we are used to, like db.define_table('table_name',Field('field_name',...))? -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: 2.10.1 / Windows errors / cache
Leonel, Thank you for trying to replicate the issue - am guessing you replicated the cleaning up of the cache issue, and not the issue while using the cache itself? I went ahead and refreshed the web2py repo (with your latest PR in it), and tried to test for these issues. I can confirm that the cleaning issue seems to be sorted out, except once in a while I see a message on the admin screen, while trying to clean the app, that some files were not removed / cleaned. I do not have screenshot, will share the next time I come across it. The issue with the usage of the cache itself is now an issue that I have raised on github: https://github.com/web2py/web2py/issues/895 Please let me know if any more information will help in sorting out this issue. I'll see if I can take a look at the code, today, to track down this issue. On Wednesday, April 1, 2015 at 11:01:14 PM UTC+5:30, Leonel Câmara wrote: Kiran I had some trouble replicating with 2.10.2 but after putting 6 tabs auto refreshing in the initial page and another tab in the admin cleaning I started seeing the error both with the cache and session. I patched app_cleanup so it would not throw an error when it encountered locked files as these are files that are being used by other processes and cannot be deleted, it's not a problem anyway since fileutils/w2p_pack ignores these directories. Can you verify that this also fixes stuff for you: https://github.com/web2py/web2py/pull/891 -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: 2.10.1 / Windows errors / cache
Kiran I had some trouble replicating with 2.10.2 but after putting 6 tabs auto refreshing in the initial page and another tab in the admin cleaning I started seeing the error both with the cache and session. I patched app_cleanup so it would not throw an error when it encountered locked files as these are files that are being used by other processes and cannot be deleted, it's not a problem anyway since fileutils/w2p_pack ignores these directories. Can you verify that this also fixes stuff for you: https://github.com/web2py/web2py/pull/891 -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py 2.10.1 is OUT
I reproduced the issue and opened a ticket on github. miercuri, 1 aprilie 2015, 17:44:39 UTC+3, Niphlod a scris: beware of the dog: since now pydal is a subrepo, releases on github don't carry the subrepo in it. On Wednesday, April 1, 2015 at 4:07:17 PM UTC+2, rif wrote: I can't reproduce the issue using zipped releases from github. miercuri, 1 aprilie 2015, 17:00:59 UTC+3, rif a scris: The releases from here https://github.com/web2py/web2py/releases look different from what we have, a little confusing. miercuri, 1 aprilie 2015, 16:45:09 UTC+3, Massimo Di Pierro a scris: What version were you upgrading from? -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain
On Wednesday, April 1, 2015 at 1:39:09 PM UTC-7, Massimo Di Pierro wrote: it works for me. What page exactly is spinning endlessly? default/download eventually stopped spinning and issued a ticket: Ticket issued: init/216.174.116.238.2015-04-01.20-25-51.8c0f2117-b0bb-4947-abf0-a1c06d0c572e http://www.web2py.com/admin/default/ticket/init/216.174.116.238.2015-04-01.20-25-51.8c0f2117-b0bb-4947-abf0-a1c06d0c572e URL:http://www.web2py.com/books/default/chapter/29/13/deployment-recipes eventually stopped spinning (while I was at lunch) and then displayed; it seems to be normally rendered. /dps On Wednesday, 1 April 2015 15:21:11 UTC-5, Dave S wrote: On Wednesday, April 1, 2015 at 1:09:44 PM UTC-7, Niphlod wrote: The whole set of tricks to deploy web2py in production is DEEPLY covered in the book, so I'll leave up to you the document myself part. I'm not getting the PythonAnywhere error page today, but web2py.com is spinning endlessly. If weheh has hardcopy or has saved the PDF, he can still look this up, though. /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) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain
On Wednesday, April 1, 2015 at 2:39:07 PM UTC-7, Dave S wrote: On Wednesday, April 1, 2015 at 1:39:09 PM UTC-7, Massimo Di Pierro wrote: it works for me. What page exactly is spinning endlessly? default/download eventually stopped spinning and issued a ticket: Ticket issued: init/216.174.116.238.2015-04-01.20-25-51.8c0f2117-b0bb-4947-abf0-a1c06d0c572e http://www.web2py.com/admin/default/ticket/init/216.174.116.238.2015-04-01.20-25-51.8c0f2117-b0bb-4947-abf0-a1c06d0c572e URL:http://www.web2py.com/books/default/chapter/29/13/deployment-recipes eventually stopped spinning (while I was at lunch) and then displayed; it seems to be normally rendered. Well, almost. There's still some pieces loading /dps On Wednesday, 1 April 2015 15:21:11 UTC-5, Dave S wrote: On Wednesday, April 1, 2015 at 1:09:44 PM UTC-7, Niphlod wrote: The whole set of tricks to deploy web2py in production is DEEPLY covered in the book, so I'll leave up to you the document myself part. I'm not getting the PythonAnywhere error page today, but web2py.com is spinning endlessly. If weheh has hardcopy or has saved the PDF, he can still look this up, though. /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) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: open source GIS components
On Wednesday, February 18, 2015 at 3:58:02 PM UTC-8, Serbulent Ocal wrote: Hello, I am new in web2py. Could someone guide me about how to use open source GIS components (geoserver, openlayers, postgresql) with web2py? I would like to develop a web based GIS app with web2py and open source components. This post seems to have been missed (was still marked unread in my view-port), but for anybody browsing it, maybe this other thread will help: URL:https://groups.google.com/d/topic/web2py/GWVFPAldB4w/discussion /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) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: how to display foreign language symbols
they handle foreign files with https://docs.python.org/2/library/codecs.html as it's supposed to be ^_^ On Wednesday, April 1, 2015 at 11:08:42 PM UTC+2, Alex Glaros wrote: wait I closed and opened Excel and question marks are there. Probably not web2py's fault then. So updated question is how do most people take tab delimited table and convert to CSV so web2py can import? -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Is there any example or plugin for threaded comments?
Maybe I do not use the right expresion. I want that users can be able to reply on comments and that this is shown in kind of a indented layout. In the redidclone there is a self-referencing field, but there is no implementation in terms of output. I was looking db().select().as_trees() implementation, and I can get righ, but I have problem with nested layout (I'm using Semantic UI). def show(row,n=0): return 'div class=commentdiv class=contentdiv class=metadataspan class=date'+row.created_on.strftime(%d. %m. %Y ob %H:%M)+'/span/divdiv class=text'+row.comment+'/divdiv class=actions/div/div/div'+'div class=comments'.join(show(c,n+1) for c in row.children)+'/div' ### in model db.define_table('comment', Field('comment','text', label='Comment'), Field('question_id','reference question', readable=False, writable=False), Field('parent_id','reference comment'), auth.signature, redesine=True ) def comments(): db.comments.question_id.default = request.args(0) form = SQLFORM(db.comment, _class='ui form').process() form.custom.submit['_class'] = 'ui button' comments = db(db.comment.question_id==request.args(0)).select().as_trees() result = '' for c in comments: result+='div class=comments'+show(c)+'/div' return dict(form=form,result=result) On Wednesday, 1 April 2015 22:37:32 UTC+2, Massimo Di Pierro wrote: Not as I would do it today but this old app had threaded comments: https://github.com/mdipierro/web2py-appliances/tree/master/RedditClone On Wednesday, 1 April 2015 15:18:26 UTC-5, Najtsirk wrote: HI, I am searching for the best solution for threaded comments. Do anybody of you have plugin or at least example of implementation? Best, Kristjan -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain
On Wednesday, April 1, 2015 at 9:58:21 PM UTC+2, weheh wrote: I'm not sure if this is a problem or not? let's just say it's not a config I'd deploy in production. The whole point of static files is that you don't need any python to ship them, and given you have apache.. using web2py to send them is just a waste of performances. Moreover, you're not exploiting static versioning, that IMHO is even more useful if you're behind a caching-something like yourself (cloudflare). The whole set of tricks to deploy web2py in production is DEEPLY covered in the book, so I'll leave up to you the document myself part. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain
On Wednesday, April 1, 2015 at 1:09:44 PM UTC-7, Niphlod wrote: The whole set of tricks to deploy web2py in production is DEEPLY covered in the book, so I'll leave up to you the document myself part. I'm not getting the PythonAnywhere error page today, but web2py.com is spinning endlessly. If weheh has hardcopy or has saved the PDF, he can still look this up, though. /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) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Is there any example or plugin for threaded comments?
Not as I would do it today but this old app had threaded comments: https://github.com/mdipierro/web2py-appliances/tree/master/RedditClone On Wednesday, 1 April 2015 15:18:26 UTC-5, Najtsirk wrote: HI, I am searching for the best solution for threaded comments. Do anybody of you have plugin or at least example of implementation? Best, Kristjan -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] how to display foreign language symbols
when importing table of world cities http://download.geonames.org/export/dump/cities1000.zip http://download.geonames.org/export/dump/cities1000.zip appadmin seems to have lost foreign symbols, e.g originally looked like this: Ordino,ao er di nuo,orudino jiao qu,Ордино,オルディノ教区,奥尔迪诺 they are still intact in excel CSV on my desktop how to import or display? In web2py they appear as: Ordino,ao er di nuo,orudino jiao qu,??,???, thanks, Alex Glaros -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: how to display foreign language symbols
wait I closed and opened Excel and question marks are there. Probably not web2py's fault then. So updated question is how do most people take tab delimited table and convert to CSV so web2py can import? -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain
I'm not sure if this is a problem or not? On Tuesday, March 31, 2015 at 11:39:07 PM UTC-7, Niphlod wrote: you're serving static files with no versioning and with web2py ... 1. x-powered-by: web2py On Wednesday, April 1, 2015 at 4:43:52 AM UTC+2, weheh wrote: I'm getting a 200 status on the css files that aren't being transferred correctly. Also, on Chrome Firebug I can't find the same Net tab and view you describe, so I can't find that X-Powered-By line. On Tuesday, March 31, 2015 at 2:09:53 PM UTC-7, Niphlod wrote: You need to activate the Net tab ... you're probably inspecting a 304 response, which doesn't carry the header: hit ctrl+f5 to erase the cache and refresh the page. this is what it returns on my system Cache-ControlprivateConnectionkeep-aliveContent-Length117305Content-Typetext/css; charset=utf-8DateTue, 31 Mar 2015 21:06:50 GMTLast-ModifiedMon, 16 Mar 2015 07:42:10 GMTPragmacacheServerRocket 1.2.6 Python/2.7.8X-Powered-By web2py On Tuesday, March 31, 2015 at 10:54:09 PM UTC+2, Dave S wrote: On Tuesday, March 31, 2015 at 1:34:28 PM UTC-7, Niphlod wrote: web2py appends a X-Powered-By : web2py header. I'm thinking you are saying that is put into the css file's response header; what's the best way to see that? Firefox's developer tool doesn't show headers in the CSS tab, and in the network tab I see just Connection:, Content-Type:, Date:, and Server: (which is Rocket for my case). The httpserver.log file for my Web2Py instance does show GET requests for the CSS files. /dps still wet behind the ears On Tuesday, March 31, 2015 at 10:27:25 PM UTC+2, weheh wrote: How do I figure out whether web2py is serving the css files? On Tuesday, March 31, 2015 at 12:39:00 AM UTC-7, Niphlod wrote: aside from the fact that that config is uber-simple and not what web2py ships usually. who is serving css's ? apache or web2py ? On Tuesday, March 31, 2015 at 7:05:25 AM UTC+2, weheh wrote: Thanks, Brian. My page does have a lot of ajax calls. The problem seems to be that some of my css files aren't coming through. Firebug says they're being delivered as text/plain instead of text/css. Consequently, the page load incorrectly and users probably bail, causing the IO Error in mod_wsgi. Have you had the css file problem? Here's the actual Firebug error message: Resource interpreted as Stylesheet but transferred with MIME type text/plain: https://www.myapp.com/myapp/static/css/web2py.css;. -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain
it works for me. What page exactly is spinning endlessly? On Wednesday, 1 April 2015 15:21:11 UTC-5, Dave S wrote: On Wednesday, April 1, 2015 at 1:09:44 PM UTC-7, Niphlod wrote: The whole set of tricks to deploy web2py in production is DEEPLY covered in the book, so I'll leave up to you the document myself part. I'm not getting the PythonAnywhere error page today, but web2py.com is spinning endlessly. If weheh has hardcopy or has saved the PDF, he can still look this up, though. /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) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: SQLite: select within transaction
OK, it's clear! I have to organise semaphore I've done something like this while not db((db.table.id == x) (db.table. http://db.table.id/hidden == False)).update(hidden=True) : sleep(some time) db.commit() to imitate record locking. Many thanks! On Wednesday, April 1, 2015 at 12:35:14 AM UTC+2, Niphlod wrote: you're basically asking for a select ... for update, that isn't supported on many backends. Asking for it in SQLite means locking THE ENTIRE table . usually you'd mimick what you want (without hurting performances so much) with an additional field. db(db.table.id == x).update(hidden=True) db.commit() rec = db.table(x) and then rec.anotherfield = f(rec.field) rec.hidden = False rec.update_record() db.commit() #or db(db.table.id == x).update(anotherfield=f(rec.field), hidden=False) db.commit() On Wednesday, April 1, 2015 at 12:27:34 AM UTC+2, Val K wrote: Hi! Here is controller's logic: 1. Get field value: fld_v= db.table[i].any_field 2. Evaluate new value depending on existing one: new_fld_v=fun(fld_v) 3. Update record with new value: db(db.table.id==i).update(any_field=new_fld_v) The problem: After first step (i.e. after SELECT) just a SHARED lock is acquired (see SQLite docs). Thus, any other request can call the same controller and get the same field's value and etc. How can I allow sequential calls only to prevent any other's SELECT until UPDATE? I know about BEGIN DEFERRED/IMMEDIATE/EXCLUSIVE, also I know web2py enclose all request/controller's calls in something like BEGIN/COMMIT, but SQLite doesn't support nested BEGIN/COMMIT (except SAVEPOINT). What is default isolation_level/locking_mode is realized during web2py request process? Is there safe solution or I worry for nothing? -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain
I researched a bug in Apache/wsgiserver and my ISP installed a newer version. The problem went away, so it appears to have been a bug in that layer of the stack. On Tuesday, March 31, 2015 at 11:40:50 PM UTC-7, Niphlod wrote: the file served wrong come from cloudflare though 1. cache-control: public, max-age=3600 2. cf-cache-status: MISS 3. cf-ray: 1d0249f0f33c0e24-MXP 4. content-type: http_x_forwarded_proto 5. date: Wed, 01 Apr 2015 06:38:02 GMT 6. expires: Wed, 01 Apr 2015 07:38:02 GMT 7. last-modified: Thu, 26 Mar 2015 22:32:44 GMT 8. pragma: cache 9. server: cloudflare-nginx 10. status: 200 OK 11. strict-transport-security: max-age=63072000; includeSubDomains 12. vary: Accept-Encoding 13. version: HTTP/1.1 14. x-content-type-options: nosniff 15. x-powered-by: web2py -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Is there any example or plugin for threaded comments?
HI, I am searching for the best solution for threaded comments. Do anybody of you have plugin or at least example of implementation? Best, Kristjan -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: how to display foreign language symbols
Niphold, I don't know how to apply that information to this web2py upload project. avoiding Excel, I edited with vi editor (replaced commas with semicolons, then replaced tabs with commas) that worked and web2py imported symbols correctly but now I get this error: field larger than field limit (131072) did not get it from Excel-created file Error occurs around row 130,747 in a 144,000 row table. Tried deleting 3 rows above and 3 rows below several times in case it was one bad record but error persists. What other tools to people use convert tab delimited to CSV? thanks, Alex -- 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 subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Cloning SQLlite into PostgreSQL
Here is the link he was referring to: https://groups.google.com/forum/#!searchin/web2py-developers/sqlite$20postgres/web2py-developers/QxeJNByj6qc/cpBHsa1ymUkJ On Tuesday, March 31, 2015 at 3:25:29 PM UTC-4, Willoughby wrote: I was referring to the script from Alan Etkin in your first post. It logs every step - what did the log steps say when you ran it? On Tuesday, March 31, 2015 at 3:19:13 PM UTC-4, Gael Princivalle wrote: I'm sorry Willoughby but I don't understand your question. With this csv export/import the problem is that id's change. For example if you take a look to the auth_user table in my previous post, table auth_membership will have wrong auth_user id's: auth_membership.id auth_membership.user_id https://dev.tasko.it/mompala/appadmin/select/db?orderby=auth_membership.group_id1 3 (John) 2 7 (Sally) And in each application that I have most of them are in relation, so that's a problem. I've take a look to pgloader but it seems complicated to make a migration. If someone have a detailed example it could be useful. Il giorno martedì 31 marzo 2015 20:52:18 UTC+2, Willoughby ha scritto: Well it has a bunch of log statements, were all of those OK? On Tuesday, March 31, 2015 at 2:19:41 PM UTC-4, Gael Princivalle wrote: Thanks Ron but:with CSV export: auth_user_iduser 3 John 7 Sally And then you import your CSV file you will have: auth_user_iduser 1 John 2 Sally And so all relations between tables will be broken. Someone have a solution? Il giorno martedì 31 marzo 2015 15:10:53 UTC+2, Ron Chatterjee ha scritto: As an alrenative. you can upload a csv file into web2py. Not a solution if you want to do things dynamically and all the time. But you can use the csv option. On Tuesday, March 31, 2015 at 4:11:18 AM UTC-4, Gael Princivalle wrote: Hello. Like a lot of users I need to clone an existing SQLlite db to new PostgreSQL db. I've read this post in web2py-developers by Alan Etkin: https://groups.google.com/forum/#!searchin/web2py-developers/sqlite$20postgres/web2py-developers/QxeJNByj6qc/cpBHsa1ymUkJ However I've tried to use this script and my PosgreSQL db still empty. My db: dbsq = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=[ 'all']) dbpg = DAL('postgres://user:pass@localhost:5432/postg_myapp', pool_size=1,check_reserved=['all']) My controller: def migrate_to_pg(): migrate(dbsq, dbpg) return dict() def disable_triggers(pgdb): for tablename in pgdb.tables(): pgdb.executesql(ALTER TABLE %s DISABLE TRIGGER ALL; % \ tablename) def enable_triggers(pgdb): for tablename in pgdb.tables(): pgdb.executesql(ALTER TABLE %s ENABLE TRIGGER ALL; % \ tablename) def migrate(sqlitedb, pgdb): Transfer data to PostgreSQL Arguments: sqlitedb: the Sqlite db source connection pgdb: the PostgreSQL db target connection import logging setval = select setval('%s'::regclass setval += , (SELECT MAX(%s) FROM %s)); logging.debug(Disabling pg triggers temporarily) disable_triggers(pgdb) for table in pgdb.tables: logging.debug(copying %s % table) query = pgdb[table]._id 0 rows = pgdb(query).select() colnames = [k[k.index(.)+1:] for k in rows.colnames] logging.debug(pgdb._lastsql) logging.debug(colnames) rows = sqlitedb.executesql(pgdb._lastsql) # clean up table pgdb.executesql(TRUNCATE %s % table) for i, row in enumerate(rows): logging.debug(inserting, i, len(rows)) sql = INSERT INTO %s (%s) VALUES (%s) % ( table, ','.join(colnames), ','.join([%s for k in colnames]), ) logging.debug(sql) pgdb.executesql(sql, row) # update serials sequence = pgdb[table]._sequence_name if sequence in [, None]: sequence = %s_%s_seq % (table, colnames[0]) pgdb.executesql(setval % (sequence, colnames[0], table)) logging.debug(Re-enabling pg triggers) enable_triggers(pgdb) pgdb.commit() logging.debug(Migration done) When I run migrate_to_pg I don't have any kind of error but the PosgreSQL db still empty. Someone can give me a help, or another solution for this migration? I think it's necessary for web2py having a tool for this migration, giving an easy way for fresh web2py users like me that understand that they must migrate some existing applications to PostgreSQL to do it without headaches.