Re: [web2py] Re: How much memory does web2py need on Unix

2010-02-20 Thread Thadeus Burgess
I have presented hard evidence. Your right, as to the results, lighttpd can achieve approx. 10MB lesser ram usage than apache. For a 64MB ram system as discussed in this thread this is an important matter to squeeze every KB out of the usage. -Thadeus On Sun, Feb 21, 2010 at 1:23 AM, John He

[web2py] Re: How much memory does web2py need on Unix

2010-02-20 Thread John Heenan
This has gone way off topic and personal, however I suppose I should try and do something to repair the ill feeling. I acknowledge Thadeus is a valuable and talented contributor. I don't have the time or inclination to address anything that does not specifically address relevant topics and doing

[web2py] Re: url quote in web2py development server

2010-02-20 Thread mdipierro
Thank you. I emailed your patch to the author. I'd rather not mantain a fork, besides we are moving to Rocket web2 server in a couple of weeks. Massimo On Feb 20, 11:47 pm, "Xie&Tian" wrote: > In gluon/wsgiserver.py, web2py's development http server will split and > unquote url path, as in lin

[web2py] Re: Using rpy2 with web2py does not work

2010-02-20 Thread mdipierro
I do not know what to say. web2py is just a python program. if you can import them from python you can import them from web2py. try print sys.path and make sure pry2 is installed in a folder that is the path. I cannot now but I have used rpy in the past and I will try rpy2 as soon as I can. On

[web2py] Re: Bug and fix about languages.py (i18n)

2010-02-20 Thread Iceberg
During my translation process, I found something tricky, probably a bug: 1. Open a tab in my Chrome to do the translate-submit-translate-submit cycle 2. Open another tab, do something, such as testing another web2py app. 3. Switch back to tab #1, do a submit. Oops, all language pairs are messed up

[web2py] Re: Using rpy2 with web2py does not work

2010-02-20 Thread Dutch opera
It looks like it I start web2py on my test machine using python web2py.py. Version is 2.6. I dont have 2.5. On Feb 20, 10:52 pm, mdipierro wrote: > Are you sure you have only one python installed? > > On Feb 20, 6:07 am, Dutch opera wrote: > > > On my local linux machine I can run R using

[web2py] Re: something happened to web2py.com

2010-02-20 Thread Brian
No, Linode doesn't have automatic backups. The Rackspace cloud servers may be an alternative. They have full image backups that are currently free although that might change: http://www.rackspacecloud.com/cloud_hosting_products/servers/pricing --Brian On Feb 20, 11:36 pm, mdipierro wrote: >

[web2py] [patch] url quote in web2py development server

2010-02-20 Thread
In gluon/wsgiserver.py, web2py's development http server will split and unquote url path, as in line 434: 426 427 # Unquote the path+params (e.g. "/this%20path" -> "this path"). 428 # http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2 429 # 430 # Bu

Re: [web2py] Re: something happened to web2py.com

2010-02-20 Thread Thadeus Burgess
No http://www.linode.com/faq.cfm#do-you-offer-backups For comparative purposes, slicehost does, for a couple dollars extra a month. -Thadeus On Sat, Feb 20, 2010 at 11:36 PM, mdipierro wrote: > Brian, > > do they provide automatic backup? VPS.net have been having major > problems in the la

[web2py] Re: something happened to web2py.com

2010-02-20 Thread mdipierro
Brian, do they provide automatic backup? VPS.net have been having major problems in the last few days. Massimo On Feb 20, 9:06 pm, Brian Schinazi wrote: > I am very pleased with Linode, I have used them for three years without issue. > > On Sat, Feb 20, 2010 at 7:58 PM, Kevin Bowling > wrote:

[web2py] Re: How to deploy my first app

2010-02-20 Thread Brian M
Al, Yes, stunnel needs both a client and a server. The general public should not need to use a stunnel connection to access your web2py application though - they should just be using good old http://your_server.com. My suggestion was that *you* could use stunnel when you need to get remote access

Re: [web2py] Re: something happened to web2py.com

2010-02-20 Thread Brian Schinazi
I am very pleased with Linode, I have used them for three years without issue. On Sat, Feb 20, 2010 at 7:58 PM, Kevin Bowling wrote: > You should move to Linode.com.  It usually recieves the highest praise > on reddit.  I've never had a problem with my instance and the support > is fantastic. >

Re: [web2py] Re: How much memory does web2py need on Unix

2010-02-20 Thread Thadeus Burgess
You need to change your tone of voice John. If anyone has been have crying foul, and won't accept test results. It is you. I have shown you a valid apache configuration that is comparable to lighttpd, for the sake of this thread it is important to show that apache can too have a low memory footpr

Re: [web2py] Re: something happened to web2py.com

2010-02-20 Thread Thadeus Burgess
Or slicehost. I run 3 servers currently on slicehost and never have a problem, A+ support. I also know a client who is using rackspace cloudservers, it is also an A+ service. Rackspace owns slicehost, so it really depends on how much you want to pay. -Thadeus On Sat, Feb 20, 2010 at 7:58 PM,

[web2py] Re: autocompletion

2010-02-20 Thread mr.freeze
Here's another option: http://www.web2pyslices.com/main/slices/take_slice/24 On Feb 20, 9:20 pm, weheh wrote: > I'm in the middle of doing my first autocompletion. I've read and > reread doc v2 example. But I've also gone to the jQuery site and > looked at their example. > > Q1) Does anyone have

[web2py] autocompletion

2010-02-20 Thread weheh
I'm in the middle of doing my first autocompletion. I've read and reread doc v2 example. But I've also gone to the jQuery site and looked at their example. Q1) Does anyone have any experience with both and can you recommend which method to use? The doc v2 example sure looks a lot more complicated

[web2py] Re: something happened to web2py.com

2010-02-20 Thread Kevin Bowling
You should move to Linode.com. It usually recieves the highest praise on reddit. I've never had a problem with my instance and the support is fantastic. On Feb 20, 6:09 pm, Massimo Di Pierro wrote: > web2py.com is down. The problem is that vps.net management console is   > not working either.

[web2py] Re: trying to set default value in form [SOLVED]

2010-02-20 Thread weheh
OK, actually, I really need both: INPUT(_name='title',_value=session.data['title']), ... and form.accepts(... keepvalues=True ...) Now that combo really works like a charm. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group,

[web2py] Re: Bug and fix about languages.py (i18n)

2010-02-20 Thread mdipierro
Go to http://127.0.0.1:8000/admin/default/design/admin mind of what you do. On Feb 20, 7:08 pm, Iceberg wrote: > The latest fix to language.py is fine. And your fix to zh-cn.py > reminds me one more trick, how about changing one more line of > read_dict() like this? > >     try: >         retur

Re: [web2py] something happened to web2py.com

2010-02-20 Thread Massimo Di Pierro
It does not show the restart buttons. They contacted me and told me they are having issues with the cloud. It is not a problem with our specific machine. Let's wait and see. Massimo On Feb 20, 2010, at 7:19 PM, Alex Fanjul wrote: You can restart it from "My VPS"..."Graceful restart"... wi

[web2py] Re: trying to set default value in form [SOLVED]

2010-02-20 Thread weheh
Yup, form.accepts(... keepvalues=True ...) works like a charm! Case closed. On Feb 20, 8:22 pm, weheh wrote: > Thanks DenesL, I had tried that already and it doesn't really work > properly. If I fill in the form repeatedly, it gets out of synch. > Next, I'm going to try form.accepts(...keepvalues

[web2py] Re: trying to set default value in form

2010-02-20 Thread weheh
Thanks DenesL, I had tried that already and it doesn't really work properly. If I fill in the form repeatedly, it gets out of synch. Next, I'm going to try form.accepts(...keepvalues=True). I'll let you know how it went. -- You received this message because you are subscribed to the Google Groups

Re: [web2py] something happened to web2py.com

2010-02-20 Thread Alex Fanjul
You can restart it from "My VPS"..."Graceful restart"... without the need to get into console Alex El 21/02/2010 2:09, Massimo Di Pierro escribió: web2py.com is down. The problem is that vps.net management console is not working either. It is not allowing me to restart it and it does not show

[web2py] Re: Bug and fix about languages.py (i18n)

2010-02-20 Thread Iceberg
The latest fix to language.py is fine. And your fix to zh-cn.py reminds me one more trick, how about changing one more line of read_dict() like this? try: return dict((k,v) for k,v in eval(lang_text).items() if v) # to strip empty translation except: ... By th

[web2py] Re: How much memory does web2py need on Unix

2010-02-20 Thread John Heenan
Round and round we go with more diversionary smokescreens. I have provided a quick 'bang you are there' approach for setting up an accepted and proven web server, Lightttpd, that tests show beats the pants off Apache. Apache fans cry foul and won't accept test results. They blame users for poor c

[web2py] Re: application path in module

2010-02-20 Thread Iceberg
Not sure I understand your question, but you can always deploy your lib as a normal python lib, then all web2py app can import it, provided you are running web2py from source version. Or you can just deploy your lib in web2py/applications/yourapp/ modules. Just go ahead, nothing special here. On

[web2py] Re: read file in GAE?

2010-02-20 Thread mdipierro
Let us know what else you find out. On Feb 20, 3:18 pm, reyelts wrote: > Massimo, You're correct that, though a better approach, switching to > os.path.join() didn't have any effect. > > According to appcfg.py, my files are uploaded: > >    2010-02-20 12:20:39,608 INFO appcfg.py:1426 Processing f

[web2py] Re: ajax

2010-02-20 Thread mdipierro
Now I am very puzzled. Can you email me the entire app? Massimo On Feb 20, 12:52 pm, Jose wrote: > On 20 feb, 18:45, mdipierro wrote:> I see. I do not > think this has anything to do with the ajax_create > > function. > > we need to isolate the problem. > > > comment everything related to the

[web2py] Re: trying to set default value in form

2010-02-20 Thread DenesL
INPUT(_name='title',_value=session.data['title']) On 20 feb, 17:36, weheh wrote: > I'm trying to set the default value of a form ... something like this: > > form=FORM(T('Title: '), >       INPUT(_name='title',default=session.data['title']), >       INPUT(_type='submit',_value='Set')) > > But whe

[web2py] trying to set default value in form

2010-02-20 Thread weheh
I'm trying to set the default value of a form ... something like this: form=FORM(T('Title: '), INPUT(_name='title',default=session.data['title']), INPUT(_type='submit',_value='Set')) But when the form pops up in the view, the title field is blank, even though the session.data['title']

[web2py] Re: read file in GAE?

2010-02-20 Thread reyelts
Robin is correct... storing the files someplace other than 'static' works just fine. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web

[web2py] Re: application path in module

2010-02-20 Thread sherdim
OK, what I should import in my module? The module is supposed detouchable, developed for the extra web2py use also What a clever way to check web2py, to import only needed gluon.globals.Request and to resolve exception if any? Also: if I really need only some functions from my hypothetic modul

[web2py] Re: read file in GAE?

2010-02-20 Thread reyelts
Massimo, You're correct that, though a better approach, switching to os.path.join() didn't have any effect. According to appcfg.py, my files are uploaded: 2010-02-20 12:20:39,608 INFO appcfg.py:1426 Processing file 'applications/canyonezt/static/COMP_profile.xml' And I confirmed that with wge

[web2py] Toggle on/off editarea on startup

2010-02-20 Thread Alex
I have added DISPLAY parameter in web2py\applications\admin\models \0.py It helps to manage mode of web2py built in code editor on page startup. It is usefull with Its All Text Firefox plugin which allow to edit context of textareas in your favorite editor. UliPad for example) This plugin work well

[web2py] Re: Difficulty with a form

2010-02-20 Thread waTR
There is no link to them anywhere though. I found it only through google searching. It needs to be added in the book website under Other resources. On Feb 19, 3:20 am, selecta wrote: > > Also, I couldn't find a link to the epydocs ?  Where did that go?  It > > was really great! > > underhttp:

Re: [web2py] Re: class="python object" for gae StringListProperty

2010-02-20 Thread Wes James
Did you meant to take the class out? There is no class for that input field now. -wes On Fri, Feb 19, 2010 at 6:07 PM, mdipierro wrote: > gr.. this needs fixing. Tonight. > > On Feb 19, 3:31 pm, Wes James wrote: >> Massimo, >> >> I just looked at the of a StringListProperty inpuot on a ga

Re: [web2py] Re: class="python object" for gae StringListProperty

2010-02-20 Thread Wes James
what is the best way to test this? hg clone a copy then do I need to copy my yaml files and app over to the newer version? -wes On Fri, Feb 19, 2010 at 6:07 PM, mdipierro wrote: > gr.. this needs fixing. Tonight. > > On Feb 19, 3:31 pm, Wes James wrote: >> Massimo, >> >> I just looked at t

[web2py] Re: read file in GAE?

2010-02-20 Thread Robin B
Yes GAE supports read-only access to 'application' files in production, that is how the view loader works. GAE handles static and application files separately. When your app is uploaded, the static files are pushed to a static file server and your application files are pushed to an application se

[web2py] Re: ajax

2010-02-20 Thread Jose
On 20 feb, 18:45, mdipierro wrote: > I see. I do not think this has anything to do with the ajax_create > function. > we need to isolate the problem. > > comment everything related to the ajax_create function. Can you insert > records? > I commented: #def ajax_create and #db.person.organizati

[web2py] Re: ajax

2010-02-20 Thread mdipierro
I see. I do not think this has anything to do with the ajax_create function. we need to isolate the problem. comment everything related to the ajax_create function. Can you insert records? On Feb 20, 12:21 pm, Jose wrote: > On 20 feb, 17:49, mdipierro wrote: > > > I am not sure what you refer t

[web2py] Re: ajax

2010-02-20 Thread Jose
On 20 feb, 17:49, mdipierro wrote: > I am not sure what you refer to is a bug. I think that is the > workflow. Every time you submit the form you get a new empty form. > > Make sure the table definitions are models not controller and use > appadmin to see if the records are in the table. They sh

Re: [web2py] Re: How much memory does web2py need on Unix

2010-02-20 Thread Thadeus Burgess
As another added note.I can further reduce my memory footprint by using wsgi 3.X. 3.X has new directives, one called LazyInitialization, which does not initialize the python interpreter when apache starts, only when a request to the wsgi process is made. Along with this is a directive that tells

[web2py] Re: read file in GAE?

2010-02-20 Thread mdipierro
It remove only write access. You can still read the files and you should be able to check whether they are there. On Feb 20, 11:18 am, John Kirkham wrote: > The live GAE environment removes all filesystem access.  In order to access > something in your static directory you'll need to access it vi

[web2py] Re: ajax

2010-02-20 Thread mdipierro
I am not sure what you refer to is a bug. I think that is the workflow. Every time you submit the form you get a new empty form. Make sure the table definitions are models not controller and use appadmin to see if the records are in the table. They should be there. Massimo On Feb 20, 11:32 am, J

[web2py] Re: ajax

2010-02-20 Thread DenesL
On 20 feb, 11:38, mdipierro wrote: > Yes there are some trick in here. Everything happens in one line > Thanks. Tricky, yes! very!. It is hard to follow at first but I am getting it now. > db.person.organization.comment = ajax_create(db.person.organization) > > the function ajax_create serves a d

Re: [web2py] read file in GAE?

2010-02-20 Thread John Kirkham
The live GAE environment removes all filesystem access. In order to access something in your static directory you'll need to access it via http (construct its URL). Alternatively, you can dump some static content into the datastore or blob-store ( http://code.google.com/appengine/docs/python/blob

[web2py] Re: ajax

2010-02-20 Thread Jose
On 20 feb, 17:01, mdipierro wrote: > If I understand what you tell me. > You click on create and get the modal > add a new organization > submit it (does the modal close?) > go back to person form > there is nothing in the dropdown. No. I added the company, after you submit, it closes the modal

[web2py] Re: read file in GAE?

2010-02-20 Thread mdipierro
if the file is uploaded it should work. try replace fname =request.folder + "static/" + pname + ".xml" with fname =os.path.join(request.folder,"static",pname + ".xml") which is more portable, although I do not thing this is the problem. It is more likely the file is not being uploaded. On Feb

[web2py] read file in GAE?

2010-02-20 Thread reyelts
I'm trying to read a file from my static directory. I construct the name as follows: fname = request.folder + "static/" + pname + ".xml" logging.debug("profile " + fname) if os.path.exists(fname): # if we have a file # logging.debug(" file exists") else: loggin

[web2py] Re: SyntaxError: not enough information to build the url

2010-02-20 Thread reyelts
Aha... I was unaware of that mechanism. I created a favicon.ico and see it shows up in places like the URL field in Firefox. Thanks! -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To

[web2py] Re: ajax

2010-02-20 Thread mdipierro
If I understand what you tell me. You click on create and get the modal add a new organization submit it (does the modal close?) go back to person form there is nothing in the dropdown. correct? which browser? sounds like your browser is not executing the jQuery(...).html(...) part of the code.

[web2py] Re: ajax

2010-02-20 Thread mdipierro
Yes there are some trick in here. Everything happens in one line db.person.organization.comment = ajax_create(db.person.organization) the function ajax_create serves a double purpose: 1) it returns a helper instance that when you click on it it open a modal window that contains a LOAD component.

[web2py] Re: ajax

2010-02-20 Thread Jose
On 20 feb, 16:25, mdipierro wrote: > which version of web2py? > In windows the latest binary. In FreeBSD, the trunc version (1 hour ago) -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups

[web2py] Re: ajax

2010-02-20 Thread mdipierro
which version of web2py? On Feb 20, 9:23 am, Jose wrote: > On 20 feb, 14:54, mdipierro wrote: > > > What behavior do you see? Can I see the model? > > The behavior after the submit is normal, but when I go to see the > table person are not records. > Tested on FreeBSD and Windows > > The code co

Re: [web2py] Re: ajax

2010-02-20 Thread Kuba Kucharski
+1 -- Kuba -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at

[web2py] Re: ajax

2010-02-20 Thread DenesL
Aw crap! and here is little me thinking I know how to use web2py. This one requires some painfully detailed walk-through. Am I the only one?. On 20 feb, 02:39, mdipierro wrote: > En even better solution. > > Drop this code in your model somewhere: > > def ajax_create(field, >                 va

[web2py] Re: ajax

2010-02-20 Thread Jose
On 20 feb, 14:54, mdipierro wrote: > What behavior do you see? Can I see the model? > The behavior after the submit is normal, but when I go to see the table person are not records. Tested on FreeBSD and Windows The code corresponds to the last posted by you [1] [1] http://www.pastebin.com/m

[web2py] Re: ajax

2010-02-20 Thread mdipierro
What behavior do you see? Can I see the model? On Feb 20, 8:32 am, Jose wrote: > Thank Massimo, > > when inserted in company works well, but not in person. > > Jose -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send em

[web2py] Re: curd.create redirect to created item on success

2010-02-20 Thread mdipierro
The id is in form.vars.id On Feb 20, 6:18 am, selecta wrote: > ah thanks, but could I ask for one addition > how do I redirect to a record just created with crud? > > crud.create(db_method, onaccept = > redirect_parent(URL(request.application, 'plugin_restapidoc', > 'edit_method', args=[???]) > >

[web2py] Re: Using rpy2 with web2py does not work

2010-02-20 Thread mdipierro
Are you sure you have only one python installed? On Feb 20, 6:07 am, Dutch opera wrote: > On my local linux machine I can run R using rpy2 from python. > > When I take the same code and I use web2py I get this error > > ImportError: No module named rpy2.robjects > > I am trying to import the

[web2py] Re: application path in module

2010-02-20 Thread mdipierro
do not trust getcwd() because that depends on installation details. use request.folder On Feb 20, 3:40 am, sherdim wrote: > Hello,all! > > How to get application path inside module correctly? > > When using os.getcwd() for web2py root it is needed the application > path also. > > request is not

[web2py] Re: ajax

2010-02-20 Thread Jose
Thank Massimo, when inserted in company works well, but not in person. Jose -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+uns

[web2py] Not sure how stunnel works with web2py

2010-02-20 Thread Al
I managed to get stunnel working, though it is a lot more complicated than I thought originally. On the windows server, the stunnel.conf file is setup as server mode and redirect port 8443 to 8000. On the client side, I also have to set up another stunnel as client mode and redirect 127.0.0.1:80 to

[web2py] Re: curd.create redirect to created item on success

2010-02-20 Thread selecta
ah thanks, but could I ask for one addition how do I redirect to a record just created with crud? crud.create(db_method, onaccept = redirect_parent(URL(request.application, 'plugin_restapidoc', 'edit_method', args=[???]) On Feb 19, 1:39 pm, mdipierro wrote: > def redirect_parent(url): >     def

[web2py] Using rpy2 with web2py does not work

2010-02-20 Thread Dutch opera
On my local linux machine I can run R using rpy2 from python. When I take the same code and I use web2py I get this error ImportError: No module named rpy2.robjects I am trying to import the following into the default.py controller. import rpy2.robjects as ro import rpy2.rlike.container as

[web2py] Re: application path in module

2010-02-20 Thread selecta
did you try request.env.web2py_path+'/ applications/'+request.application ? On Feb 20, 10:40 am, sherdim wrote: > Hello,all! > > How to get application path inside module correctly? > > When using os.getcwd() for web2py root it is needed the application > path also. > > request is not available,

[web2py] application path in module

2010-02-20 Thread sherdim
Hello,all! How to get application path inside module correctly? When using os.getcwd() for web2py root it is needed the application path also. request is not available, is it? Vale! -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to

[web2py] Re: How much memory does web2py need on Unix

2010-02-20 Thread John Heenan
Done. Please see section 'Complete Minimalist Lighttpd Configuration File' at http://www.web2pyslices.com/main/slices/take_slice/57 I have also added in a section 'Using Lighttpd on port 80 for Secure Web2py admin Access' since it is important to emphasise there should only be one instance of Pyt

[web2py] Re: How much memory does web2py need on Unix

2010-02-20 Thread John Heenan
Great! I have modified the web2py slice at http://www.web2pyslices.com/main/slices/take_slice/57 and added in a complete minimalist lighttpd configuration file for use with web2py based on tests I have just completed with a new VPS. I have also showed how to enable SSL (provided you have necessar