Re: [web2py] web2py 2.15.1 is OUT

2017-07-11 Thread Ricardo Pedroso
I reported an issue (https://github.com/web2py/web2py/issues/1672) with the 2.15.0b1 that still exists in 2.15.1 I think it was this pydal commit: https://github.com/web2py/pydal/commit/fedd0c75ff1f84ce863a8785b31c762d9c3e55af#diff-68220c912f02a03fd8bce58415479334R1642 Ricardo On 7/10/17, Massim

Re: [web2py] Re: jquery-pjax

2016-08-02 Thread Ricardo Pedroso
On 8/2/16, António Ramos wrote: > any demo with web2py? I'm using it at http://missportuguesa.pt in a simple way. in my first model file: request.pjax = True if request.env.get('HTTP_X_PJAX') == 'true' else False In layout.html: (...) Home Some page (...) {{ block content }

[web2py] missportuguesa.pt powered by web2py

2016-07-31 Thread Ricardo Pedroso
I like to announce a site powered by web2py that was launched 3 weeks ago. It's in portuguese only. You can see it at: http://missportuguesa.pt Regards, Ricardo -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://

Re: [web2py] web2py 1.89.5

2016-06-03 Thread Ricardo Pedroso
On 6/3/16, Ricardo Pedroso wrote: > On 5/26/16, Roman Molotkovski wrote: >> >> I've been looking for old versions of python and but I can't find >> anything >> older than 2.0.2 (on github). >> A previous thread in this group mentioned this link : h &g

Re: [web2py] web2py 1.89.5

2016-06-03 Thread Ricardo Pedroso
On 5/26/16, Roman Molotkovski wrote: > > I've been looking for old versions of python and but I can't find anything > older than 2.0.2 (on github). > A previous thread in this group mentioned this link : h > ttp://code.google.com/p/web2py/source/list >

Re: [web2py] Re: Semantic UI instead of bootstap

2014-10-14 Thread Ricardo Pedroso
On 10/14/14, Massimo Di Pierro wrote: > I really like semantic ui. > > On Monday, 13 October 2014 09:19:34 UTC-5, Ramos wrote: >> >> is semantic UI a good frontend ? >> >> http://semantic-ui.com/ >> >> Regards >> > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation)

Re: [web2py] Response Stream Control

2014-09-22 Thread Ricardo Pedroso
On 9/22/14, Aldo Bassanini wrote: > Hello everyone. > Is there any way to control the final status of the response.stream > function? > > I need to serve a small file to a client application (the client app uses > wget, not a browser), but I wish to know if the client successfully > downloaded the

Re: [web2py] Re: request password generates an infite loop?

2014-09-12 Thread Ricardo Pedroso
I sent a pull request that, I think, fix this issue. You can try it by change line 3014 on gluon/tools.py if not key and len(request.args)>0: to if not key and len(request.args)>1: Ricardo On 9/12/14, Leonel Câmara wrote: > Ahh yes I see the problem. Tried to figure out what was goin

Re: [web2py] Can I create an RSS Reader like Techi in web2py?

2014-08-13 Thread Ricardo Pedroso
Next weekend I can share the code. I have to cleanning it a little bit. Ricardo On 8/11/14, Gideon George wrote: > >> >> WOW! That's really great to hear. I don't even know how to start >> appreciating right now. > > I am really grateful for that, Absolutely grateful! I will love to learn > and

Re: [web2py] Re: bootstrap 3 - if you care help test trunk now

2014-08-13 Thread Ricardo Pedroso
his as a patch? I too would prefer to default to NO > col-lg-* > > On Sunday, 10 August 2014 17:25:51 UTC-5, Ricardo Pedroso wrote: >> >> On 8/10/14, Massimo Di Pierro wrote: >> > https://github.com/web2py/web2py/archive/master.zip >> > >> > note, you

Re: [web2py] Can I create an RSS Reader like Techi in web2py?

2014-08-10 Thread Ricardo Pedroso
On 8/8/14, Gideon George wrote: > That's really great! I just saw it. initially it was redirecting me to > vioos > I really like your layout and everything about it. > > Please I need your help to be able to do something similar to extract > political news concerning Nigeria > Any tutorial or some

Re: [web2py] Can I create an RSS Reader like Techi in web2py?

2014-08-08 Thread Ricardo Pedroso
On 8/8/14, Gideon George wrote: > >> >> Thank you everyone for your contributions. >> > > Ricardo please I am still trying to figure out how to to this, and looking > > at the url you gave on www.feeds.uni.me redirrects to http://vioos.com/. it's feeds.uni.me without www. I don't know nothing ab

Re: [web2py] Can I create an RSS Reader like Techi in web2py?

2014-07-09 Thread Ricardo Pedroso
On Mon, Jul 7, 2014 at 3:16 AM, Vinicius Assef wrote: > Ricardo, very nice your solution. > > Below, I wrote some questions about it. > > > > > On Sunday, 6 July 2014 02:01:23 UTC-5, Ricardo Pedroso wrote: > >> > >> - search is powered by whoosh

Re: [web2py] Can I create an RSS Reader like Techi in web2py?

2014-07-06 Thread Ricardo Pedroso
On Fri, Jul 4, 2014 at 10:37 AM, Gideon George wrote: I want to create an awesome rss feed agregator like that of techi.com > please is there any example of site that did it in web2py? Also I need > suggestions on how to go about it. > Thank you > > > I have my own personal feed agregator done in

Re: [web2py] Re: Web2py gevent-socketio

2014-05-03 Thread Ricardo Pedroso
On Sat, May 3, 2014 at 7:21 PM, Jesse Ferguson wrote: > OK so I've been reading/researching and I'm still trying to wrap my head > around how the above code works, > > First let me define what I *think* is going on, > > The script imports socket.io modules needed and the imports web2py's > wsgiba

Re: [web2py] Python Performance Issue

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

Re: [web2py] Re: sessions2trash.py

2014-02-05 Thread Ricardo Pedroso
On Wed, Feb 5, 2014 at 2:15 PM, Jayadevan M wrote: > > open("applications/myapp/sessions", > O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4 > getdents(4, /* 2 entries */, 32768) = 48 > getdents(4, /* 0 entries */, 32768) = 0 > close(4)= 0 > If I'm not wrong

Re: [web2py] Problems with the server stalling out. Setting up debuging.

2014-02-04 Thread Ricardo Pedroso
On Tue, Feb 4, 2014 at 8:11 PM, Niphlod wrote: > > > On Tuesday, February 4, 2014 8:43:16 PM UTC+1, Encompass solutions wrote: >> >> HMM, the processes are very fast and never take long. maybe 5 seconds, >> but most of the time 1 or 2 seconds. Do I really need create a queing >> server for this?

Re: [web2py] Problems with the server stalling out. Setting up debuging.

2014-02-03 Thread Ricardo Pedroso
On Sun, Feb 2, 2014 at 6:14 PM, Jason Brower wrote: It seems that I have an issue I can't resolve. > Every once in a while at seemingly the worst and most random times, the > service will stall out. It simply doesn't respond to anything. > Going into the computer and running htop shows that the

Re: [web2py] simplejson and datetime

2014-01-29 Thread Ricardo Pedroso
On Wed, Jan 22, 2014 at 3:31 PM, Arnon Marcus wrote: > What I am interested in doing, is have it turned back into a datetime object > when 'decoding' - and THAT is not supported even in the web2py flavor - and > I haven't found a single simple solution for it on the web for the standard > simplej

Re: [web2py] detect a specific device

2014-01-15 Thread Ricardo Pedroso
On Tue, Jan 14, 2014 at 9:23 AM, Paolo Valleri wrote: > Hi all, > I'd develop a web2py responsible app instead of an android app; at a first > sight it seams to some extent feasible. The only issue is related to an > unusual requirement, the web2py app (running on an intranet) must be > accessible

Re: [web2py] Compile app from command line

2014-01-13 Thread Ricardo Pedroso
On Mon, Jan 13, 2014 at 11:08 PM, Wonton wrote: > Hello everyone, > > I'm compiling my local apps with this command: > > python -c "import gluon.compileapp; > gluon.compileapp.compile_application('applications/')" > > And everything is working well. But when I try to do the same thing in the > ser

Re: [web2py] Re: resizing uploaded image file upload using gluon.contrib.imageutils

2013-12-04 Thread Ricardo Pedroso
On Wed, Dec 4, 2013 at 8:20 AM, 黄祥 wrote: > tried on ubuntu 13.10 with web2py 2.8.2 source and python-imaging > installed it's still not worked, tried installed pil for windows from > http://www.pythonware.com/products/pil/ is not worked too. > i suspect the gluon.contrib.imageutils is not worked

Re: [web2py] Re: Web2py DAL slows down the server response when faced with multiple concurrent requests

2013-11-26 Thread Ricardo Pedroso
On Tue, Nov 26, 2013 at 4:44 PM, Saurabh Kumar wrote: > I am NOT comparing the static files and dynamic requests. I was just > illustrating the behaviour I am expecting wrt concurrency. I understand how > Linux kernel and Apache works to some extent. > > > All I am trying to do is *25* light conc

Re: [web2py] Re: Web2py DAL slows down the server response when faced with multiple concurrent requests

2013-11-26 Thread Ricardo Pedroso
And to see how much you loose when doing dynamic serving against static content serving, just create a web2py application with only one file: models/0.py: raise HTTP(200, 'OK') On Tue, Nov 26, 2013 at 4:40 PM, Anthony wrote: > I think as you say the problem is with table definition code, whi

Re: [web2py] Re: Web2py DAL slows down the server response when faced with multiple concurrent requests

2013-11-26 Thread Ricardo Pedroso
> > On Tue, Nov 26, 2013 at 8:42 PM, Ricardo Pedroso wrote: > >> How may cores do you have? >> Are all the cores being used when you run the tests? >> What webserver are you testing against? >> >> > I have 4 cores, 16 GB RAM running Apache. But I think,

Re: [web2py] Re: Web2py DAL slows down the server response when faced with multiple concurrent requests

2013-11-26 Thread Ricardo Pedroso
How may cores do you have? Are all the cores being used when you run the tests? What webserver are you testing against? Keep in mind that one core can only process one instruction (machine code, not python instruction) at a time. Ricardo On Tue, Nov 26, 2013 at 2:32 PM, Saurabh Kumar wrote: >

Re: [web2py] Error uploading 60 character named .pptx file

2013-11-13 Thread Ricardo Pedroso
On Wed, Nov 13, 2013 at 10:00 AM, Rahul wrote: > Hi All, > I get an error like below when I upload a file (.pptx [could be with > other extensions too not tested]) in latest web2py - downloaded from trunk > yesterday as below. I am on Win7 and IE9 .The file name looks insanely huge > as hig

Re: [web2py] Re: Web2py freezing on live deployment!

2013-11-06 Thread Ricardo Pedroso
On Tue, Nov 5, 2013 at 11:53 AM, Andrew Buchan wrote: > Ok, the IT guy has disabled McAffee's "on access" scan for the folders > containing web2py stuff as well as python's installation directory. He > tells me that parts of McAffee other than "on access" scan may still > interfere but there's no

Re: [web2py] how do i return several rows from json using ajax?

2013-11-03 Thread Ricardo Pedroso
Try change the response content-type, see below: On Sun, Nov 3, 2013 at 6:28 AM, Mihir Lade wrote: > hi, > > i have a function in a controller which queries the database if the user > is logged in and then grabs the information using json (as below) > > def pruchaseHistoryJson(): > if auth.

Re: [web2py] restfull need to api/id/1 or /api/1

2013-11-01 Thread Ricardo Pedroso
On Fri, Nov 1, 2013 at 11:53 AM, António Ramos wrote: hello i dont get it about restfull > > > I read the book and using the book example i should get my record with id > 1 just by "Get" > > > http://127.0.0.1:8000/angular/default/api/person/1 > > however i get > > *no matching patterns* > > if i

Re: [web2py] web2py_component() works LOAD does not

2013-10-22 Thread Ricardo Pedroso
On Tue, Oct 22, 2013 at 7:15 PM, Niphlod wrote: > > Try this instead: >> >> >> {{=LOAD(url,ajax=True,target='**content')}} >> >> > LOAD(target='something') creates the div itself. > You are right, even without target keyword LOAD creates the DIV with a random id Ricardo -- Resources: - http

Re: [web2py] web2py_component() works LOAD does not

2013-10-22 Thread Ricardo Pedroso
On Tue, Oct 22, 2013 at 5:49 PM, Annet wrote: > > {{=LOAD(url,ajax=True,target='content')}} > > > Try this instead: {{=LOAD(url,ajax=True,target='content')}} if does not work pack a minimal app as Niphlod said. Ricardo -- Resources: - http://web2py.com - http://web2py.com/book (D

Re: [web2py] Re: grid in component only works in Firefox

2013-10-22 Thread Ricardo Pedroso
On Mon, Oct 21, 2013 at 9:35 PM, Jim S wrote: > > Found a little more. Look at the two attachments. One is the generated > html from Opera and the other from Firefox. The opera one is missing the > Form element. > Just guessing... Maybe nested forms? Ricardo -- Resources: - http://web2py.c

Re: [web2py] Issues with creating a hash...

2013-10-22 Thread Ricardo Pedroso
On Mon, Oct 21, 2013 at 10:48 AM, Jason (spot) Brower wrote: I have the following in my controller... > # -*- coding: utf-8 -*- > def validate_message(recieved_data, message_hash): > secret_salt = "12345" > import hashlib > m = hashlib.sha224() > m.update(recieved_data + secret_sal

Re: [web2py] Need some help with web2py

2013-10-17 Thread Ricardo Pedroso
On Thu, Oct 17, 2013 at 5:07 PM, Kelvin Kibet wrote: > Hi guys, I run into a problem while trying to input data into a database. > I am still new to web2py and python in general and i do hope i'll get some > hekp here. > > *I got this error* > (Members.Book_Status may not be NULL) > > *and the d

Re: [web2py] Parsing RSS Feeds and Displaying in View

2013-10-17 Thread Ricardo Pedroso
On Thu, Oct 17, 2013 at 7:28 PM, Mark Siegrist wrote: > I'm a beginner at web2py, webapps, and Python in general and am having > trouble and was hoping I could get some guidance here. > > I'm looking to have a page in my app that simply displays a simple list of > RSS feeds. I eventually want t

Re: [web2py] Logging http audit

2013-10-14 Thread Ricardo Pedroso
On Mon, Oct 14, 2013 at 10:01 AM, Arnon Marcus wrote: > I ended-up embedding my code into web2py instead of injecting it - it's > simpler this way (for me) - it looks like this: > > *In gluon.contrib.logstash.py:* > > > def log(request, response, session, logger): > > user = '' > sessionD

Re: [web2py] resizing inputbox without javacsript

2013-10-10 Thread Ricardo Pedroso
On Thu, Oct 10, 2013 at 5:50 PM, Andreas Wienes wrote: > > Because I'm not very familar in using JavaScript and don't like the idea > to use it for formating more than one inputbox, I hope there is another > cleaner and easier way doing this. Maybe with parameters like > {{=register_form.custom.

Re: [web2py] Logging http audit

2013-10-10 Thread Ricardo Pedroso
On Thu, Oct 10, 2013 at 12:35 PM, Arnon Marcus wrote: > Thank you very much Richardo (!) > > I would really like to use your solution, and have access to the current > fully-processed request, response and session objects. > Unfortunately, though, we are using a very old version of web2py (1.89.5)

Re: [web2py] logging controller output for specific session

2013-10-07 Thread Ricardo Pedroso
On Thu, Oct 3, 2013 at 9:39 AM, Geo wrote: > > Greetings, > I have a controller that generates many log messages. Most of them are > currently used for debugging but some (warnings and errors) are also useful > for users. > Logs are currently handled with a module similar to this: > http://www.

Re: [web2py] Logging http audit

2013-10-07 Thread Ricardo Pedroso
On Sun, Oct 6, 2013 at 2:31 PM, Arnon Marcus wrote: > Hi, > > I would like to log more HTTP-traffic-related data into logstash - no > webserver outputs the information I need. > I know there is already a built-in http logger, but just like any webserver, > it does not include the body and other da

Re: [web2py] Re: Web2py on apache2 is slow

2013-10-05 Thread Ricardo Pedroso
On Sat, Oct 5, 2013 at 12:36 AM, Derek wrote: > Yes, Python will be slower than PHP. No, Python will not be slower than PHP. Some things are faster in Python other are faster in PHP. > PHP doesn't have a VM or garbage collection. How PHP does not have a VM? How PHP code runs, then? PHP > 5.

Re: [web2py] OperationalError: disk I/O error

2013-10-04 Thread Ricardo Pedroso
> > (disk I/O error) Can be several things, you have to figure it out: some reason can be: - Disk full - Disk is dying (bad sectors) - permissions - quotas ... -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://c

Re: [web2py] Re: Web2py on apache2 is slow

2013-10-04 Thread Ricardo Pedroso
On Fri, Oct 4, 2013 at 8:33 AM, Jayakumar Bellie wrote: > > I try to run a grep command on a 30 MB file and redirect output to a tmp > folder. > Read the file in the tmp folder and display it. > > When I do this in PHP it is very fast. > But when I do it in web2py it is slow. > > This is fast for

Re: [web2py] network troubles with builtin webserver (Windows)

2013-10-04 Thread Ricardo Pedroso
On Thu, Oct 3, 2013 at 10:54 PM, Alex wrote: > thanks a lot, Ricardo! > > you're right about HTTP pipeline. Opera is the only browser with > (activated) HTTP pipeline. If I deactivate it the site is loaded very fast. > The 10 seconds delay is exactly the timeout setting for individual > requests.

Re: [web2py] network troubles with builtin webserver (Windows)

2013-10-03 Thread Ricardo Pedroso
On Thu, Oct 3, 2013 at 4:43 PM, Alex wrote: > I'm using the builtin webserver with web2py on Windows. > > When I refresh the page (to reload all files) of a small app in Opera it > takes very long (>10 sec) until the page is completely loaded. When I check > the network log (with Dragonfly) I see

Re: [web2py] RSS - storing news in database

2013-09-30 Thread Ricardo Pedroso
On Fri, Sep 27, 2013 at 6:43 PM, lesssugar wrote: > I'm planning to implement RSS aggregator in my app, using instruction from > the book: > > http://web2py.com/books/default/chapter/29/10/services?search=rss#RSS > > The twist is to firstly store the news in my database, and display the > feed us

Re: [web2py] Can't retrieve xy.jpeg file properties (.thumbnail vs .jpeg) from PIL resized image (2.6.0-dev)

2013-08-27 Thread Ricardo Pedroso
On Tue, Aug 27, 2013 at 5:22 PM, Adi wrote: > Used the Python Imaging Library (with JPEG decoder) to create set of > thumbnails. For the images with jpeg extension, the error pops up that the > properties can't be retrieved, while for the non-image extensions, > everything displays fine. > > >

Re: [web2py] Jquery 404 error

2013-08-26 Thread Ricardo Pedroso
> > *Procedure*: > click on a row, it should make a call to flea function, but returns a > ..jquery-1.10.0.min.map 404 error > (using a 2.5.1 fresh stable version) > > Any pointers? > > You can ignore that "error" If your function is not working as you expect, the problem is somewhere else. h

Re: [web2py] session logic

2013-08-24 Thread Ricardo Pedroso
It did broke redis_session, I sent a github pull request to fix it. Niphlod can you review, I guest you were the author of redis_session. Ricardo On Tue, Aug 20, 2013 at 5:44 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > The session logic has been rewritten (for clarity and to f

Re: [web2py] RESTful and content-type

2013-08-21 Thread Ricardo Pedroso
On Tue, Aug 20, 2013 at 12:36 PM, Miguel Cabo wrote: > I had a problem with Restful requests. The content-type response header > was text/plain when I sent a http://xxx.json request. Is it ok? I need > content-type response header as application/json. To do that I have > modified the glucon/conten

Re: [web2py] session.forget(response) prevents SQLFORM.factory from working

2013-08-20 Thread Ricardo Pedroso
On Wed, Aug 21, 2013 at 12:26 AM, wrote: > session.forget(response) prevents SQLFORM.factory from working. Is this > supposed to happen? If so, why? I was hoping it would prevent the session > files from being written. > > To secure forms submission web2py needs to store an hash in the session to

Re: [web2py] Re: bootstrap 3

2013-08-20 Thread Ricardo Pedroso
On Tue, Aug 20, 2013 at 10:15 PM, Anthony wrote: > > > I'm not sure we should have created a formstyle called "boostrap", though. > Instead, we should probably put a formstyle.py in contrib that includes > several custom formstyles, including ones for Bootstrap 2 and Bootstrap 3. > Then you would

Re: [web2py] Help needed in obscure bug (only on server)

2013-08-08 Thread Ricardo Pedroso
On Thu, Aug 8, 2013 at 9:22 PM, Carlos Correia wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Em 08-08-2013 20:23, Ricardo Pedroso escreveu: > > On Thu, Aug 8, 2013 at 2:36 PM, Carlos Correia < > car...@memoriapersistente.pt > > <mailto:car

Re: [web2py] Help needed in obscure bug (only on server)

2013-08-08 Thread Ricardo Pedroso
On Thu, Aug 8, 2013 at 2:36 PM, Carlos Correia wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > > I'm facing a bug when I redirect to another controller, that redirects the > user > to the login prompt, after having been authenticated. > It's hard to tell what the problem is bu

Re: [web2py] websockets

2013-06-23 Thread Ricardo Pedroso
On Fri, Jun 21, 2013 at 6:14 PM, shartha wrote: > Hi Ricardo, > > Thank you very much for posting the application. Here are a few questions > that I have regarding this: > 1. Do I need to put the route.py in the root directory of my app? > 2. I tried by putting the routes.py in the rood directory

Re: [web2py] Re: Using a python module in web2py

2013-06-19 Thread Ricardo Pedroso
On Tue, Jun 18, 2013 at 3:15 PM, Joe Magaro wrote: > Well, I didn't know I needed to restart Apache. > > Now I get a different error. I did the nltk download in python, but do I > need to do something in web2py? > > Resource 'corpora/wordnet' not found. Please use the NLTK > Downloader to ob

Re: [web2py] websockets

2013-06-14 Thread Ricardo Pedroso
On Fri, Jun 14, 2013 at 2:36 AM, shartha wrote: > Hello. Some questions about websockets: > 1) Can websockets be implemented within web2py without any in-socket > server side component? Yes. Runnig web2py with gevent or eventlet If you want I can post an example using socketio. Ricardo --

Re: [web2py] Please rate my idea. Mail to phone call or sms

2013-06-14 Thread Ricardo Pedroso
On Fri, Jun 14, 2013 at 3:44 PM, António Ramos wrote: > Hello > In my company we have some need to send sms or even a call to a mobile > phone every time a UPS goes down,especially after hours. > > Also we are a chemical factory so some alarms of some kind could alert > some people's phone. > > >

Re: [web2py] asynchronous respons using twisted... is it possible?

2013-05-25 Thread Ricardo Pedroso
On Fri, May 24, 2013 at 12:05 PM, Manuele Pesenti wrote: > Hi! > > Starting from the fact that using the anyserver script web2py can be run > under twistedmatrix web server... is it possible to combine web2py with > twisted async way of programming? > > You can't, according to this http://twiste

Re: [web2py] Re: web2py not working

2013-05-18 Thread Ricardo Pedroso
It's a firefox bug, no worries... There are bug reports in mozilla and ubuntu. So probably next time you update firefox it will be fixed. Ricardo On Sat, May 18, 2013 at 4:53 AM, Monte Milanuk wrote: > I'm getting a very similar error when starting web2py from the CLI in > Xubuntu 13.04: > > m

Re: [web2py] Re: Random, wrong strings in Content-Type Response header for .css

2013-05-18 Thread Ricardo Pedroso
On Sat, May 18, 2013 at 7:30 AM, Andriy wrote: > Ok, this is really strange. I changed line 68 (69 after Ricardo`s code > addition) in *streamer.py* from: > *headers.setdefault('Content-Type', contenttype(static_file))* > to > *headers.setdefault('Content-Type', 'text/css')* > > And problem gone!

Re: [web2py] Can't get gmaps plugin to work

2013-05-17 Thread Ricardo Pedroso
On Fri, May 17, 2013 at 3:32 PM, Marko Poutiainen wrote: > I can't seem to get the gmaps plugin to work. > > > The page is https://www2.olka.fi/kiinnostuneet/default/kartta where you > can also see from the source what my view is like. > Try http://www2.olka.fi/kiinnostuneet/default/kartta. Pro

Re: [web2py] Re: Random, wrong strings in Content-Type Response header for .css

2013-05-17 Thread Ricardo Pedroso
On Fri, May 17, 2013 at 7:23 PM, Andriy wrote: > I use Python 2.7.3 > > The problem manifests in all browsers. In FF its really rare. In Opera with > "Max Connections To Server" > 2 its almost every time you load a page. In > Opera with "Max Connections To Server" < 2 its 1 in 30-50 hits, or every

Re: [web2py] login form registration problem with encoding

2013-05-15 Thread Ricardo Pedroso
On Windows just check what you have as the default encoding, I am sure you have a different codec - (I don't have windows to test) Ricardo On Wed, May 15, 2013 at 1:10 PM, Yebach wrote: > Thanx > > I removed the 'u' infront of string and it works > > thanx again

Re: [web2py] login form registration problem with encoding

2013-05-15 Thread Ricardo Pedroso
> Thank you for showing interest in resolving this. I apologize for not > answering faster > > @Massimo - where do I set layout encoding? > > > This is the whole error trace What you show us was not your traceback, here is your traceback, not that hard and concise and just to the point, right? T

Re: [web2py] Specify python version for web2py

2013-05-14 Thread Ricardo Pedroso
On Tue, May 14, 2013 at 1:22 AM, HittingSmoke wrote: > I thought this would be simple but I can't seem to find the answer. I run > web2py on Webfaction via uWSGI and a shared Nginx instance. Web2py runs on > the default 2.6.6 python install which I have no control over. I would like > it to run on

Re: [web2py] anyserver.py gevent to socket.io/sockjs

2013-05-13 Thread Ricardo Pedroso
On Mon, May 13, 2013 at 9:18 PM, HittingSmoke wrote: > I know chat has been beaten to death around here but IMO there hasn't been > any quality implementations or answers yet. There are dozens of blogs and > posts about it, most of which are solutions that no longer work or are > ridiculously over

Re: [web2py] login form registration problem with encoding

2013-05-08 Thread Ricardo Pedroso
On Wed, May 8, 2013 at 7:24 AM, Yebach wrote: > Hello > > So I am using web2py server on Linux. I also have a postgreSQL server on > linux and when a user tries to login via login form and uses letters in name > and surname such as š ž č ć the following error appears 'ascii' codec can't > decode

Re: [web2py] In openshift: Need help on why my web2py website is being constantly accessed by openshift itself

2013-05-08 Thread Ricardo Pedroso
On Wed, May 8, 2013 at 11:10 AM, smogzer wrote: > Hi folks, > > So in openshift in a python 2.6 cartridge + haproxy i'm having lots of > accesses from openshift ip itself, like one every 3 seconds. I do not have > any cron jobs. Is there a way to figure where these access are coming from : > wsgi,

Re: [web2py] Disable auto-migration for auth tables.

2013-05-07 Thread Ricardo Pedroso
On Tue, May 7, 2013 at 8:05 PM, Omi Chiba wrote: > I'm using CAS so new app is sharing the same auth tables so it doesn't have > to be created. But it's trying to create one and get already existing > error... > > I can do migrate_enabled=Falese in DAL but then I cannot migrate any other > tables

Re: [web2py] @make_member_of() decorator

2013-05-02 Thread Ricardo Pedroso
oint, above. > > > > > On Thu, May 2, 2013 at 10:44 AM, Ricardo Pedroso wrote: >> On Wed, May 1, 2013 at 10:34 PM, Vinicius Assef >> wrote: >>> I created a decorator to allow binding a function to a Table instance. >>> >>> IMHO, this helps org

Re: [web2py] @make_member_of() decorator

2013-05-02 Thread Ricardo Pedroso
On Wed, May 1, 2013 at 10:34 PM, Vinicius Assef wrote: > I created a decorator to allow binding a function to a Table instance. > > IMHO, this helps organizing models, creating something similar to > Django's managers. > > To an example, see: https://gist.github.com/viniciusban/5497532 > > To get

Re: [web2py] Re: New Relic module causing import error

2013-04-29 Thread Ricardo Pedroso
On Tue, Apr 30, 2013 at 12:41 AM, Yarin wrote: > Ricardo- yes, importing httplib2 throws the same error, even without > importing oauth. > > We've noticed that the problem does not arise with the new relic import > statment on the first line, > but only on the second line, when the new relic agent

Re: [web2py] Re: New Relic module causing import error

2013-04-29 Thread Ricardo Pedroso
On Mon, Apr 29, 2013 at 9:30 PM, Yarin Kessler wrote: > Yes, we have httplib2 installed in our modules folder, and the python-oauth2 > lib runs fine if we don't import the new relic agent first. Likewise, the > new relic works fine and we get no errors if we never call import oauth2. > It's only w

Re: [web2py] Is there a way how to use a viewScope on conversationScope like variable?

2013-04-29 Thread Ricardo Pedroso
On Mon, Apr 29, 2013 at 5:26 PM, David Marko wrote: > Such a great piece of code!! Thanks. Its very close but page scope should be > bound to specific instance of page so it works also in situation when you > open the same page in several browser tabs. It must be independent. Didn't understand

Re: [web2py] Is there a way how to use a viewScope on conversationScope like variable?

2013-04-29 Thread Ricardo Pedroso
On Mon, Apr 29, 2013 at 10:13 AM, David Marko wrote: > Is there a way how to use/crrate a viewScope on conversationScope like > variable in web2py? In JAVA based frameworks (e.g. JSF, Spring Framework) > there are scoped environments available. In web2py we have requestScope, and > sessionScope (i

Re: [web2py] Re: response.download

2013-04-29 Thread Ricardo Pedroso
On Mon, Apr 29, 2013 at 9:54 AM, Domagoj Kovač wrote: > Where can i open a ticket about this? > > I am not sure now. I have an image, lets say logo. I want to display this > image via: > {{=IMG(_src=URL("default", "download", args="logo.png"), _width="170px")}} > > I thought if i move my image to

Re: [web2py] web2py chat example

2013-04-24 Thread Ricardo Pedroso
Hi Arnon, On Wed, Apr 24, 2013 at 1:13 PM, Arnon Marcus wrote: > First of all, by "architecture" I was referring to the server-side, not the > client-side. the demo chat was running with: $ cd $ nohup python anyserver.pt -s gevent was running with gevent httpserver, no tornado involved in any

Re: [web2py] web2py chat example

2013-04-24 Thread Ricardo Pedroso
On Tue, Apr 23, 2013 at 11:37 PM, Arnon Marcus wrote: > How is this architected? I'm not sure I understand what you want to know but I suppose you are referring to the chat example and how it works: 1. You open the chat with your browser and it sends the last messages, this is a "normal" re

Re: [web2py] Re: app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-22 Thread Ricardo Pedroso
On Mon, Apr 22, 2013 at 7:04 PM, BlueShadow wrote: > now I got pysqlite (on my windows maschine) which has following versions > In [6] : import pysqlite2.dbapi2 > In [7] : print pysqlite2.dbapi2.version > 2.6.3 > In [8] : print pysqlite2.dbapi2.sqlite_version > 3.7.6.2 > > but I don't know how to

Re: [web2py] Re: app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-22 Thread Ricardo Pedroso
On Mon, Apr 22, 2013 at 6:49 PM, BlueShadow wrote: > windows pc: > > import sqlite3 > In [2] : print sqlite3.version > 2.6.0 > In [3] : print sqlite3.sqlite_version > 3.6.21 > > Linux > > import sqlite3 > In [5] : print sqlite3.version > 2.6.0 > In [6] : print sqlite3.sqlite_version > 3.7.9 if y

Re: [web2py] web2py chat example

2013-04-22 Thread Ricardo Pedroso
I put a demo here: http://78.46.172.53:8000/w2pchat/default/index users/pass us...@demo.com / 1234 us...@demo.com / 1234 You can create other users to. Later tonight I will put it down. Ricardo On Mon, Apr 22, 2013 at 5:47 PM, Ricardo Pedroso wrote: > Do you managed to get it work

Re: [web2py] web2py chat example

2013-04-22 Thread Ricardo Pedroso
es(finder, >>>> force_root_egg_info=self.bundle, bundle=self.bundle) >>>> File "C:\python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\req.py", >>>> line 1057, in prepare_files >>>> req_to_install.run_egg_info() >>>> File "

Re: [web2py] Returning gzipped content, generic.json.gz ?

2013-04-22 Thread Ricardo Pedroso
On Mon, Apr 22, 2013 at 1:28 AM, Vincent wrote: > Hi Ricardo, > > in this case I do control the clients. The scientific data would be on an > intranet and would only really make sense to the a specialized client. > > So apart from having appropriate headers I just need to write the json.dumps > an

Re: [web2py] Re: app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-22 Thread Ricardo Pedroso
On Mon, Apr 22, 2013 at 2:23 PM, Anthony wrote: > On Monday, April 22, 2013 8:53:39 AM UTC-4, BlueShadow wrote: >> So I changed that. Now I get the next error: >> >> file is encrypted or is not a database I think this may be a problem with sqlite versions. On both system, in a python shell do:

[web2py] web2py chat example

2013-04-21 Thread Ricardo Pedroso
Due to a recent discussion about async in web2py I made an example web2py app based on tornado long polling chat example. The only requirement is to run it with gevent. Can be done with anyserver.py shipped with web2py. You can grab it here: https://github.com/rpedroso/w2pchat Ricardo -- ---

Re: [web2py] app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-21 Thread Ricardo Pedroso
On Sun, Apr 21, 2013 at 10:56 PM, BlueShadow wrote: > Hi, > I was developping my app for the last couple weeks directly on my server. > now for my new functions I wanted some easy tests like using the print > command and see it directly^^ > So I package the app and put it on my windows PC (web2py

Re: [web2py] THUMB function in contrib - bug

2013-04-21 Thread Ricardo Pedroso
On Sun, Apr 21, 2013 at 10:35 PM, Tito Garrido wrote: > Hi Folks, > > I was trying to use THUMB function following Bruno's tutorial for python RQ > and I got: > > File "/root/web2py/gluon/contrib/imageutils.py", line 54, in THUMB > img = Image.open(request.folder + 'uploads/' + image) > Fi

Re: [web2py] Returning gzipped content, generic.json.gz ?

2013-04-21 Thread Ricardo Pedroso
You can not "blindly" gzip your data unless you control the clients. It's the client that tells if it can accept gzip content or not, and the web server will choose to gzip it or not. I will advice you to let this to the web server. But if you really want to gzip yourself, than you should take c

Re: [web2py] Re: Python Redis Queue

2013-04-19 Thread Ricardo Pedroso
On Thu, Apr 18, 2013 at 10:02 PM, Niphlod wrote: > PS: on the web2py process side, it seems that at most 10 connections are > istantiated with Redis: is there a connection pool? I guess, because you are running the web server with 10 threads. python redis by default use a connection pool... see b

Re: [web2py] Re: Cannot import module 'guppy', appadmin cache

2013-04-19 Thread Ricardo Pedroso
On Fri, Apr 19, 2013 at 10:01 AM, BlueShadow wrote: > I did now and I can't import it in python: > ImportError: No module named gubby > Dont know if is a copy paste typo, but is guppy not gubby Anyway: Since you are using cache.disk, the cache file is simply a shelve file you can inspect it wit

Re: [web2py] Re: Python Redis Queue

2013-04-18 Thread Ricardo Pedroso
On Thu, Apr 18, 2013 at 10:20 AM, Ricardo Pedroso wrote: > Now I remember seeing that thread, at the time I was with other things > and end up forget it. > > I will see, later tonight or maybe this afternoon, what I can do about > queueing functions in models. I pushed it to g

Re: [web2py] Re: Python Redis Queue

2013-04-18 Thread Ricardo Pedroso
Now I remember seeing that thread, at the time I was with other things and end up forget it. I will see, later tonight or maybe this afternoon, what I can do about queueing functions in models. On Thu, Apr 18, 2013 at 10:03 AM, Niphlod wrote: > here ... https://groups.google.com/d/msg/web2py/

Re: [web2py] Re: Python Redis Queue

2013-04-18 Thread Ricardo Pedroso
aybe Still true. > the method used to implement the same thing with celery can be used for > that. What is this method? Ricardo > On Wednesday, April 17, 2013 6:03:40 PM UTC+2, Ricardo Pedroso wrote: >> >> On Tue, Apr 16, 2013 at 12:26 AM, Tito Garrido wrote: >>

Re: [web2py] Re: Python Redis Queue

2013-04-17 Thread Ricardo Pedroso
On Tue, Apr 16, 2013 at 12:26 AM, Tito Garrido wrote: > Nice! Is it working? Is there an example of application? I just put on github one example (https://github.com/rpedroso/rqdboard). It has the rq-dashboard (https://github.com/nvie/rq-dashboard) "ported" to web2py. Ricardo -- --- You rec

Re: [web2py] Re: Async Web3Py ?

2013-04-17 Thread Ricardo Pedroso
I'm didn't follow this discussion closed enough, probably what I have to say was already said, but ... > So essentially, if you run web2py on-top of tornado's I/O-loop, you should > be able to use these YieldPoint classes within the controller-actions. I guess not, but I may be wrong. Using web2p

Re: [web2py] gmaps: ugly rendering

2013-04-12 Thread Ricardo Pedroso
Hi hit this issue also and I fixed with: .gmnoprint img {max-width: inherit;} in the end of the Ricardo On Fri, Apr 12, 2013 at 11:47 AM, Jes M wrote: > Hi all: > > I'm testing gmaps.js with the same code Omi published here: > > http://ochiba77.blogspot.com.es/2012/06/how-to-use-gmapsjs-on

Re: [web2py] Server performance (cpu/memory)

2013-04-10 Thread Ricardo Pedroso
On Thu, Apr 11, 2013 at 12:32 AM, Marco Túlio Cícero de M. Porto wrote: > > 2013/4/10 Ricardo Pedroso >> >> On Wed, Apr 10, 2013 at 11:33 PM, Marco Túlio Cícero de M. Porto >> wrote: >> >> > one thing that caught up my atention was that recently (after &g

  1   2   >