[web2py] Possible bug in IS_UPLOAD_FILENAME validator?

2010-08-12 Thread Lisandro Rostagno
Hi everyone. First, sorry for my english. Well, I'm using the validator IS_UPLOAD_FILENAME, in this way: form = SQLFORM.factory(Field('novedad', 'upload', requires=IS_UPLOAD_FILENAME(filename='novedad'))) The file I'm trying to upload is called "NOVEDAD.SEQ" If I try to upload the file "anythin

[web2py] Re: "Last Saved On" field displays "communication error" using HTTPS on Apache2, OpenSSL 0.98k, mod_wsgi, python 2.6.5

2010-06-07 Thread Lisandro Rostagno
Hi. First, sorry about my english, I'm from Argentina. I'm a user from the group of spanish users. I've written in that group, but I did't get any answer. My problem is "exactly" the same that the one reported by Salvor Hardin. I'm using Ubuntu 9.10, with the last version of web2py (Version 1.79.

Re: [web2py] Re: "Last Saved On" field displays "communication error" using HTTPS on Apache2, OpenSSL 0.98k, mod_wsgi, python 2.6.5

2010-06-07 Thread Lisandro Rostagno
I'll add the fact that the version 1.78.3 works fine in Ubuntu 9.10. 2010/6/7 Salvor Hardin > Good suggestion. I tried this, restarted web2py, and the > "communication error" in "Last Saved On" field still appears when > clicking Save button. > > So far, this is what I know about this problem:

[web2py] Re: "Last Saved On" field displays "communication error" using HTTPS on Apache2, OpenSSL 0.98k, mod_wsgi, python 2.6.5

2010-06-08 Thread Lisandro Rostagno
Thanks! I tried installing python-setuptools and simplejson, and it worked! (I was having the problem on Ubuntu 9.10, with the development server). I only executed this commands: sudo aptitude install python-setuptools sudo easy_install simplejson And now everything works just fine. Thanks again!

[web2py] Problem with two forms in one page(one post, other get)

2010-06-14 Thread Lisandro Rostagno
I have tried this: def mytest(): form_one = SQLFORM.factory() form_two = SQLFORM.factory() if form_one.accepts(request.vars, session, formname='one'): response.flash = 'Form one' if form_two.accepts(request.vars, session, formname='two'): response.flash = 'Form tw

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

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

Re: [web2py] ¿How to hide app, controller and function from url?

2014-07-13 Thread Lisandro Rostagno
Thanks for the answer. I should've clarified that I knew that I had to use routes, but I'm having difficult to find the regular expression that works for this case. I suppose I have to use pattern based system, because in addition, I still want to handle "init" as the default application, "default"

Re: [web2py] ¿How to hide app, controller and function from url?

2014-07-15 Thread Lisandro Rostagno
Thanks! It worked. Every day I get even more surprised about web2py features :) I have though one more doubt. In my case, I put this on routes.py: BASE = dict(\ default_application = 'init', \ default_controller = 'default', \ default_function = 'store', \ functions = ['index', 'contact'])

Re: [web2py] ¿How to hide app, controller and function from url?

2014-07-15 Thread Lisandro Rostagno
Thank you very much for the help! I finally decided to keep using parameter-based rewrite setup, as it's easier for me to understand, and it allows me to achieve what I need. So I'm using "index" as the default function, that renders the index.html if there is no arg (that is, the home page of my

Re: [web2py] Re: OAuth2.0 and Facebook (as from the book)

2013-10-29 Thread Lisandro Rostagno
Thanks for the answer. The problem is that I really need a valid email address, because in my site I use that email to send important notifications to the user. I already tried with "facebook mail", that is, joining the user name with "@ facebook.com". But it didn't work. When I send an email to a

Re: [web2py] Re: OAuth2.0 and Facebook (as from the book)

2013-10-29 Thread Lisandro Rostagno
over inconsistency or problems like this :/ 2013/10/29 Michele Comitini > this is what they say: > > https://www.facebook.com/help/224049364288051 > > facebook documentation for developers is incomplete, so to say, on many > occasions... > > mic > > > > >

Re: [web2py] Re: auth.messages.verify_email html template

2013-10-29 Thread Lisandro Rostagno
Thanks for the tip! I thought it would be more difficult, but apparently nothing is too difficult with web2py ;) For those interested in doing that, is just as simple as instantiating Auth class and overwriting wanted methods, for example, I overwrited "register" and "email_reset_password" methods

Re: [web2py] Re: Web2py's included connection pooling VS external pooling software

2014-11-28 Thread Lisandro Rostagno
Mmm... I see. That was my understanding in the first place. At that time I did the maths, I had 10 apps, each one using a pool_size of 3. In postgresql.conf max_connections was set to 80. However this morning, with those numbers, almost every of my websites was throwing intermitent HTTP 500 errors,

Re: [web2py] Re: Web2py's included connection pooling VS external pooling software

2014-11-30 Thread Lisandro Rostagno
Yes in deed. I've restarted the webserver and the database server. Recently I've tried setting pool_size to 1 for every app, that is, for every website. Restarted postgresql and webserver (lighttpd). And then I used this SQL statement to check the total count of connections for every database (or w

Re: [web2py] Re: Web2py's included connection pooling VS external pooling software

2014-12-01 Thread Lisandro Rostagno
es, > 2xn where n is the number of cores is a safe choice. > > 2014-11-30 20:04 GMT+01:00 Michele Comitini : > >> pool_size==number of threads in a web2py process. >> I suggest to work around the problem by setting the number of threads to >> 1 in you flup server

Re: [web2py] Re: Web2py's included connection pooling VS external pooling software

2014-12-01 Thread Lisandro Rostagno
cs[lighttpd] * num_applications[lighttpd]). > > About pgbouncer, IMHO you should use it only if you have n client and m > max postgresql connections, and you have n > m. To speedup things you can > use memcache/redis and/or a more complex setup with pgpoolII and multiple > pos

Re: [web2py] Re: Web2py's included connection pooling VS external pooling software

2014-12-03 Thread Lisandro Rostagno
le Comitini : > Everything ok with your plan. One note, instead of playing with the > max-procs in lighttpd you can use the fastcgi server parameters. btw don't > use flup use this: > https://github.com/momyc/gevent-fastcgi > and arrange the num_workers parameter. > to do that dif

Re: [web2py] Re: Web2py's included connection pooling VS external pooling software

2014-12-04 Thread Lisandro Rostagno
rver resources used by every app (that is, accordingly to the "plan" every client has paid for his app). I've already limited network bandwidth for every app, and recently I was able to limit the connections to the database for every app. So, if I assign more spare children to an app, ¿

Re: [web2py] Re: Web2py's included connection pooling VS external pooling software

2014-12-06 Thread Lisandro Rostagno
Thank you very much Michele for your answer. I understand that assigning different priorities to each web app is a complex problem. I mean, it's "complex" in the sense that it involves many different areas. But I think that with the information I have and the configuration variables I know, I alrea

Re: [web2py] Re: Is it possible to append content to a block from multiple included files?

2014-12-11 Thread Lisandro Rostagno
Thank you very much for your answers. For what I need, I will have to go with Massimo's approach. That's because I need to include several files (file1.html, file2.html, file3.html, etc...) from index.html. The "ugly" thing is that I will end up with several {{block ..}} in the layout.html file, b

Re: [web2py] Re: Daily task on production: scheduler or cron?

2014-12-29 Thread Lisandro Rostagno
Thanks Niphlod for your tips. The idea of having a separate db for the scheduler crossed my mind when I noticed the "db" parameter for the Scheduler constructor; however, in my case, I have **multiple instances of web2py** (instead of a single instance with multiple apps), like this: /var/www/web2

Re: [web2py] Re: Daily task on production: scheduler or cron?

2015-01-12 Thread Lisandro Rostagno
Sorry for the delay (I was on vacations). Thanks Niphlod, I actually forgot that I would finally have to use OS cron to keep the scheduler running, so, taking into account all the tips and suggestions, I will use OS cron to start the scheduler every half hour, and I will instantiate the scheduler

Re: [web2py] Re: How to get host and scheme from a scheduled task?

2015-03-01 Thread Lisandro Rostagno
I understand. thank you very much for the answer. I guess I will add a global variable to set the main domain and use it in those cases. 2015-03-01 16:37 GMT-03:00 Niphlod : > uhm... the host is different from the hostname and from the "domain". > Usually, the pretty thing about the request e

Re: [web2py] Re: Remember me with custom or alternate login?

2015-03-20 Thread Lisandro Rostagno
Thank you very much Mark for your comments! I digged in a little more, I opened the gluon/tools.py file, and did a search of "expiration" and "remember" to see where the code makes use of that variables. And I found out that I was reffering to session.auth.remember but the correct way was session.a

Re: [web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-21 Thread Lisandro Rostagno
Thank you Massimo, I will try that, I think I'm going to "play" a little on a testing server and then go to production. One thing that I was concerned about was the assignment of resources. Considering that our clients choose a "plan", I need to limit resources per every website accordingly to the

Re: [web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-26 Thread Lisandro Rostagno
2015-03-21 18:19 GMT-03:00 Niphlod : > This last post is a dream come true for my boss. > > Glossary: > - "developer" --> someone that can create logics in programs, coding in some > programming language > - "sysop" --> someone who knows inside out every bit of the pieces the > "developer" uses to

Re: [web2py] Re: Need advice/help with url rewrite: multiple domains, multiple apps, two apps per domain

2015-04-15 Thread Lisandro Rostagno
Thanks for your time Massimo. I didn't know about multi-tenancy in web2py, I've just read a little about that. However I think it's not what I need in this case (but I've just read about multi-tenancy). Let me give some additional details of my case regarding databases (I realised that I didn't me

Re: [web2py] Re: Problem importing modules from other app (having symlinked models and modules)

2015-06-18 Thread Lisandro Rostagno
I wasn't complaining about restarting uwsgi, I was wondering about what was causing the error after an update, even when the update only involved just static files like css. First I thought it could be the modules folder being symlinked from one app to another, so I removed the symlink and copy the