[web2py] urllib2.urlopen(url) – creating exception in GAE, if the url points to an app of the same web2py deployment

2012-01-30 Thread sabbir
Hi All, I have two app in the same gae deployment. Inter app communication I planned to do through httpget as always, for its simplicity. While implementing this I have noticed that I can fetch any url except of my own deployments. --- Code sample url =

[web2py] table service component help

2012-01-30 Thread Manuele Pesenti
Hi! I would like to realize a little component for my web2py app to load some data I got in arrays (lists or dictionaries) in tables , in this way, always coherent throug the site. I thought to use the jQuery dataTable class but a little after I thought that it would be nice to use the same

[web2py] Re: Redbean-like ORM in web2py

2012-01-30 Thread Chnrxn
It brings in the power of NoSQL. On my part, having used SQLObject, SQLAlchemy, DAL, and RedBean, I find that Redbean does a wonderful job of removing obstacles, no doubt many might deem them to be insignificant, during development. It does make a big difference for me, especially during

Re: [web2py] Many apps but only one needs https.

2012-01-30 Thread Alexandre Andrade
its a non-documented function (in the book); request.requires_https() You can see the thread here: http://groups.google.com/group/web2py-developers/browse_thread/thread/dd7638d6e0691203/26fba7696c2cd3b0?lnk=raotpli=1 Em 29 de janeiro de 2012 18:31, António Ramos ramstei...@gmail.comescreveu:

[web2py] Default nginx install script : bug (?)

2012-01-30 Thread Benjamin
Hello all, There is something weird in the default nginx install script setup- web2py-nginx-uwsgi-ubuntu.sh. After install, trying to log to the admin panel from the welcome page raise the dreaded admin deactivated because of unsecured channel, whereas the nginx script DOES create an ssl

[web2py] Re: urllib2.urlopen(url) – creating exception in GAE, if the url points to an app of the same web2py deployment

2012-01-30 Thread sabbir
For any one novice with Web2py like me :) here are some time saver: 1. In app-engine - urllib2.urlopen(url) can only allow access to outside url. anything within the app will give exception 2. I guess same thing might be applied to service (e.g. XMLRPC), have not tested though. 3. You can not

[web2py] Re: Mobile OTP authentication (motp) plugin for web2py

2012-01-30 Thread whowhywhat
Thanks for the suggestions Alan. There is a CRYPT helper object of web2py that can be instanitated with different options. It is used for standard authentication. (I am not sure if if can be of use for AES)http://web2py.com/examples/static/epydoc/web2py.gluon.validators.CRYP... I do not

[web2py] Re: New in trunk - disabling menu items

2012-01-30 Thread Alan Etkin
+1

[web2py] Disable button in /admin

2012-01-30 Thread Alexandre Andrade
While it can be a little obvious what it can do, the button 'Disable' in /admin/site has no documentation at book. The main doubt is what happens if i disable, if I will be able to enable easily again. So its interesting append it to the book. -- Atenciosamente Alexandre Andrade

[web2py] Re: table service component help

2012-01-30 Thread Alan Etkin
The .grid data input is a query. I think that the css style is defined inside the SQLFORM class grid() method http://web2py.com/examples/static/epydoc/web2py.gluon.sqlhtml-pysrc.html#SQLFORM.grid You could create the table in the way you posted and add the css reference used by grid in the tags

[web2py] Re: hollywoodr.js

2012-01-30 Thread Ross Peoples
LOL. At first, I wasn't sure where this was going until I read the last line of the README.

[web2py] Re: Default nginx install script : bug (?)

2012-01-30 Thread Alan Etkin
I think that the problem is not the welcome app since the admin url is constucted with the URL helper. Some request object value has to be misconfigured so the welcome app creates the wrong url. On 30 ene, 08:02, Benjamin benjamin.aguet...@gmail.com wrote: Hello all, There is something weird

[web2py] Re: help with js issue

2012-01-30 Thread Ross Peoples
Just wanted to add that this happens to me too, but it actually does stop. Sometimes it takes 20 seconds, sometimes it takes a minute or two, but it eventually stops without needing to kill -9. So there could be a timeout issue somewhere.

Re: [web2py] Web2py in large web scenarios

2012-01-30 Thread Anthony
I also noted best performance directly rendering the templates and caching views where it can be cached. just replacing return dict() with return response.render(filename, context) Is there documentation about this? How do you code the view differently in such a case? There's

Re: [web2py] Re: help with js issue

2012-01-30 Thread Jonathan Lundell
On Jan 30, 2012, at 7:19 AM, Ross Peoples wrote: Just wanted to add that this happens to me too, but it actually does stop. Sometimes it takes 20 seconds, sometimes it takes a minute or two, but it eventually stops without needing to kill -9. So there could be a timeout issue somewhere. I

Re: [web2py] Web2py in large web scenarios

2012-01-30 Thread Johann Spies
On 30 January 2012 15:51, Anthony abasta...@gmail.com wrote: There's an example at the end of the section on caching: http://web2py.com/books/default/chapter/29/4#cache. response.render() is briefly mentioned here: http://web2py.com/books/default/chapter/29/4#response. Note, if you leave

Re: [web2py] Re: help with js issue

2012-01-30 Thread Ross Peoples
Usually if I start and immediately stop, then it quits quickly. But after using the app (database activity, logout/login, etc) for a few minutes, then I start to notice the problem.

Re: [web2py] Re: help with js issue

2012-01-30 Thread Ross Peoples
Also, I am running this: python web2py.py -a password -i 0.0.0.0 -p 8001 -N I have to use -N, otherwise I get a web2py cron error in the terminal every 15 to 30 minutes.

[web2py] Re: Problem with the audio tag, web2py and Firefox

2012-01-30 Thread Anthony
On Sunday, January 29, 2012 9:51:52 PM UTC-5, Massimo Di Pierro wrote: You have to tell web2py what do to with the file. If the file is in static and served by web2py you should download it with http:///filename?attachment if it is served by your controller you must set the

[web2py] Insert/Retrieve data to/form Google Spreadsheet

2012-01-30 Thread Sonal_b
I would like to know if it is possible to insert/retrieve data to/from Google Spreadsheet using Web2Py framework. In case yes, what all changes are required to be done at the code level. Also any specific configurations required to achieve the same?

[web2py] Re: [w2py-dev] model less apps (a blog example)

2012-01-30 Thread Ross Peoples
Bruno, This is a good article. I have done something like this before. My approach was a bit different. I was using the singleton pattern, but I think it accomplishes the same goal. I would for example have a module like this: from gluon import * class MyModel(object): instance = None

[web2py] Re: Insert/Retrieve data to/form Google Spreadsheet

2012-01-30 Thread Anthony
Are you saying you want to access a Google spreadsheet via the web2py DAL as if it were a database? I suppose you'd need to write a custom DAL adapter for that: http://web2py.com/books/default/chapter/29/6#Note-on-new-DAL-and-adapters. If you just want to access Google spreadsheets via its

Re: [web2py] Re: help with js issue

2012-01-30 Thread Ross Peoples
I was able to reproduce this a few times by doing this: Start web2py: python web2py.py -a password -i 0.0.0.0 -N Navigate to the admin app from another computer (important): http://192.168.1.10:8000/admin You will get the admin is disabled message. Now try to Control + C web2py. For me, it

Re: [web2py] Re: help with js issue

2012-01-30 Thread Jonathan Lundell
On Jan 30, 2012, at 8:07 AM, Ross Peoples wrote: Also, I am running this: python web2py.py -a password -i 0.0.0.0 -p 8001 -N I have to use -N, otherwise I get a web2py cron error in the terminal every 15 to 30 minutes. What error do you get from cron? Can you reproduce the error with a

Re: [web2py] Re: help with js issue

2012-01-30 Thread Jonathan Lundell
On Jan 30, 2012, at 8:30 AM, Ross Peoples wrote: I was able to reproduce this a few times by doing this: Start web2py: python web2py.py -a password -i 0.0.0.0 -N Navigate to the admin app from another computer (important): http://192.168.1.10:8000/admin You will get the admin is

Re: [web2py] Re: help with js issue

2012-01-30 Thread Ross Peoples
In reference to the cron error, I posted this a couple days ago: https://groups.google.com/forum/#!searchin/web2py/ross$20peoples$20cron%7Csort:date/web2py/q4qoTTuu6zw/jo-H1LPjWB4J Also, I should mention that for the stopping problem: It's not just Mac. The previous message with instructions

[web2py] Re: Redbean-like ORM in web2py

2012-01-30 Thread Massimo Di Pierro
You can create schemas on the fly with web2py (web2py will do the alter table). It would be possible to allow redefining a table within the same http request but why? you can also do this: def associate(t1, t2, *fields): db = t1._db f1 = t1._tablename+'_id' f2 =

[web2py] Re: Mobile OTP authentication (motp) plugin for web2py

2012-01-30 Thread Alan Etkin
To address the user field issue, one way would be to accept a field optional argument in the motp_auth constructor and query the db data using the optional argument or a default value. motp_auth(..., userfield=email) And in the custom authentication code's query: db(db.auth_user[userfield] ==

[web2py] Re: Removing need for first and last name in auth

2012-01-30 Thread Anthony
On Sunday, January 29, 2012 7:36:07 PM UTC-5, HittingSmoke wrote: I'd like to use auth with only a username instead of first and last name. I defined my own tables without a first and last name but it still causes issues throughout the app. For instance, when I try to use appadmin to add

Re: [web2py] Usage errors printed to console

2012-01-30 Thread Jonathan Lundell
On Jan 28, 2012, at 7:31 PM, Ross Peoples wrote: I pulled from trunk a week or so ago and ever since, I've been getting this every few minutes printed to the console: WARNING:web2py.cron:WEB2PY CRON Call returned code 2: -J is reserved for Jython usage: /usr/bin/python [option] ... [-c

[web2py] Re: email updates not recd for this group

2012-01-30 Thread Alan Etkin
No changes, still having to visit the groups page to see the messages or look for pending messages. I cannot find a way of reporting the problem in Groups, because the QA page desn't seem to allow posting it. On 26 ene, 14:29, howesc how...@umich.edu wrote: i also have not received the digest

[web2py] Re: Redbean-like ORM in web2py

2012-01-30 Thread Anthony
On Monday, January 30, 2012 9:37:29 AM UTC-5, Massimo Di Pierro wrote: You can create schemas on the fly with web2py (web2py will do the alter table). I think in RedBean you don't have to define the schema at all. With the DAL, it would look something like: db.define_table('person')

[web2py] Re: email updates not recd for this group

2012-01-30 Thread Anthony
If you view the group via the forum interface (https://groups.google.com/forum/?fromgroups#!forum/web2py), at the far right of the topbar, there should be a gear icon -- if you click on that, there's a feedback option that allows you to report bugs (it will even take a screenshot of the

[web2py] Re: Problem with the audio tag, web2py and Firefox

2012-01-30 Thread Massimo Di Pierro
I added them. On Jan 30, 8:17 am, Anthony abasta...@gmail.com wrote: On Sunday, January 29, 2012 9:51:52 PM UTC-5, Massimo Di Pierro wrote: You have to tell web2py what do to with the file. If the file is in static and served by web2py you should download it with

Re: [web2py] Usage errors printed to console

2012-01-30 Thread Massimo Di Pierro
what does append('--') do?

[web2py] Re: Removing need for first and last name in auth

2012-01-30 Thread Massimo Di Pierro
Agree. I will take a patch On Jan 30, 8:51 am, Anthony abasta...@gmail.com wrote: On Sunday, January 29, 2012 7:36:07 PM UTC-5, HittingSmoke wrote: I'd like to use auth with only a username instead of first and last name. I defined my own tables without a first and last name but it still

Re: [web2py] Re: table service component help

2012-01-30 Thread Manuele Pesenti
Il 30/01/2012 13:50, Alan Etkin ha scritto: The .grid data input is a query. I think that the css style is defined inside the SQLFORM class grid() method http://web2py.com/examples/static/epydoc/web2py.gluon.sqlhtml-pysrc.html#SQLFORM.grid You could create the table in the way you posted and

Re: [web2py] Usage errors printed to console

2012-01-30 Thread Jonathan Lundell
On Jan 30, 2012, at 8:05 AM, Massimo Di Pierro wrote: what does append('--') do? It tells the command (python in this case) to stop processing command-line options for itself.

Re: [web2py] Usage errors printed to console

2012-01-30 Thread Jonathan Lundell
On Jan 30, 2012, at 8:27 AM, Jonathan Lundell wrote: On Jan 30, 2012, at 8:05 AM, Massimo Di Pierro wrote: what does append('--') do? It tells the command (python in this case) to stop processing command-line options for itself. man bash: --A -- signals the end of

[web2py] NetworkError: 500 INTERNAL SERVER ERROR

2012-01-30 Thread Vineet
I have a controller named get_prtgrpdata which serves 'json' output. This I use as 'sAjaxSource' in dataTables.net. It gives this error (traced in fireug)-- NetworkError: 500 INTERNAL SERVER ERROR - http://127.0.0.1:8000/crane/prtgrp/get_prtgrpdata?sEcho=1iColumns=3sColumns... etc. I

[web2py] Re: Usage errors printed to console

2012-01-30 Thread Massimo Di Pierro
ok adding --. The reason it does not fail when it does not find web2py.py is that (if I remember) this should work which binary distributions which do not have a web2py.py. On Jan 30, 8:52 am, Jonathan Lundell jlund...@pobox.com wrote: On Jan 28, 2012, at 7:31 PM, Ross Peoples wrote: I

Re: [web2py] Usage errors printed to console

2012-01-30 Thread Jonathan Lundell
On Jan 30, 2012, at 9:27 AM, Massimo Di Pierro wrote: ok adding --. The reason it does not fail when it does not find web2py.py is that (if I remember) this should work which binary distributions which do not have a web2py.py. I see. In that case, appending -- should be part of the if body

Re: [web2py] Usage errors printed to console

2012-01-30 Thread Jonathan Lundell
On Jan 30, 2012, at 9:43 AM, Jonathan Lundell wrote: On Jan 30, 2012, at 9:27 AM, Massimo Di Pierro wrote: ok adding --. The reason it does not fail when it does not find web2py.py is that (if I remember) this should work which binary distributions which do not have a web2py.py. I

[web2py] Re: First chapter that should be useful to some web2py users

2012-01-30 Thread villas
Hi Marco, I really like the style. And your testing approach is a lesson for all of us that think nothing should break during development :-)

[web2py] powertable website category example and edit row item

2012-01-30 Thread Jeremy
Hi all, I'm trying to reproduce the example category example found on the powertable website. Specifically, I want to get an edit link on one item on each row in the details table that shows up when the parent row is expanded. On the powertable website, there is a category example. When one

CTRL-C webpy hangs (was: Re: [web2py] help with js issue)

2012-01-30 Thread Ricardo Pedroso
On Sun, Jan 29, 2012 at 5:28 PM, Ricardo Pedroso rmdpedr...@gmail.com wrote: On Sun, Jan 29, 2012 at 4:27 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I used to be able to stop the server with CRTL+C but it does not work anymore on my mac. I now have to kill it. Why? I'm new to

[web2py] Rocket issue (was Re: CTRL-C web2py hangs)

2012-01-30 Thread Jonathan Lundell
On Jan 30, 2012, at 3:01 PM, Ricardo Pedroso wrote: On Sun, Jan 29, 2012 at 5:28 PM, Ricardo Pedroso rmdpedr...@gmail.com wrote: On Sun, Jan 29, 2012 at 4:27 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I used to be able to stop the server with CRTL+C but it does not work

Re: CTRL-C webpy hangs (was: Re: [web2py] help with js issue)

2012-01-30 Thread Massimo Di Pierro
Thanks ricardo. This really helps a lot. On Jan 30, 5:01 pm, Ricardo Pedroso rmdpedr...@gmail.com wrote: On Sun, Jan 29, 2012 at 5:28 PM, Ricardo Pedroso rmdpedr...@gmail.com wrote: On Sun, Jan 29, 2012 at 4:27 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I used to be able to

[web2py] Re: Removing need for first and last name in auth

2012-01-30 Thread HittingSmoke
Thank you. The issue has been submitted with a link back to this thread. On Jan 30, 6:51 am, Anthony abasta...@gmail.com wrote: On Sunday, January 29, 2012 7:36:07 PM UTC-5, HittingSmoke wrote: I'd like to use auth with only a username instead of first and last name. I defined my own tables

Re: CTRL-C webpy hangs (was: Re: [web2py] help with js issue)

2012-01-30 Thread Massimo Di Pierro
Progress. reverting this change makes the problem go away: http://code.google.com/p/web2py/source/diff?spec=svn9619eb054669ed5931f65f8815731f4c52857c5dr=9619eb054669ed5931f65f8815731f4c52857c5dformat=sidepath=/gluon/widget.py The problem is that the socket timeout was increased from 1 to 60 so

Re: CTRL-C webpy hangs (was: Re: [web2py] help with js issue)

2012-01-30 Thread Massimo Di Pierro
Specifically it waits for the socket timeout of 60 seconds here: rocket.py line 1063: # Wait until they pull the trigger for t in self.threads: if t.isAlive(): t.join() I feel it is ok to have the timeout set to 60secs but not here. I have not yet

[web2py] Re: Mobile OTP authentication (motp) plugin for web2py

2012-01-30 Thread whowhywhat
motp_auth(..., userfield=email) And in the custom authentication code's query: db(db.auth_user[userfield] == value)... Ahh yes :D .. will try that, thanks a lot!

[web2py] is there an easier way to do subtotals/grouping?

2012-01-30 Thread Andrew Thompson
Greetings, I am building a report that will have N sections that will each need to be subtotaled. What I'm doing now is not pretty... Does anyone have a pattern I can copy for this? Also, is it normal for a lot of grunt work to be in the view, or am I working at the wrong layers? Thanks.

[web2py] Re: Chunked downloads and corrupt files with Internet Explorer 8 (IE8)

2012-01-30 Thread nick name
Ok, the culprit is definitely ignoring exceptions raised in sendall. In my humble opinion this is serious enough to be on the 2.0 blocker list. How to reproduce: you have to have a wsgi worker, that produces output in parts (that is, returns a list or yields part as a generator). e.g: use

Re: [web2py] Re: Chunked downloads and corrupt files with Internet Explorer 8 (IE8)

2012-01-30 Thread nick name
On Saturday, January 28, 2012 10:22:58 AM UTC-5, Phyo Arkar wrote: its 2.7 as all my servers are (distro default) Sorry for the confusion. This is true for every version down to at least 2.3 and up to 2.7; At the time I posted, I wrote 2.6 because that was the only one I verified and did not

[web2py] Re: Nginx + uwsgi file download problem

2012-01-30 Thread nick name
Almost surely the same problem discussed in this thread: https://groups.google.com/d/msg/web2py/1_b63bhBeQs/sYFbXNJL8D4J