[web2py] Re: memory leak?

2014-04-02 Thread Paolo Valleri
I run nearly the same example: def f(): a=list(range(10)) return 'ok' After about 200 downloads the web2py process grew up to 100M. Tested on a system with 8Gb ram, ubuntu 12.04 paolo On Wednesday, April 2, 2014 5:57:51 AM UTC+2, Rick Ree wrote: > > Ubuntu 12.04 and 13.10. I'm runnin

[web2py] Re: after_update callback question

2014-04-02 Thread mcamel
Hello, I've tried your suggestion and worked!. At 'before_update' stored old values in request.vars using Set object, then at 'after_update' access these values and compare to the new ones at f. Note: if you use 'detect_record_change=True' it seems 'before_update' is called twice, though it do

Re: [web2py] Re: memory leak?

2014-04-02 Thread Richard Ree
Yes, the leak seems to be associated with rendering data in a view. On Apr 2, 2014 3:57 AM, "Paolo Valleri" wrote: > I run nearly the same example: > def f(): > a=list(range(10)) > return 'ok' > After about 200 downloads the web2py process grew up to 100M. Tested on a > system with 8G

Re: [web2py] Re: Free opensource Janrain alternative - Python Social auth

2014-04-02 Thread Dragan Matic
I have installed the plugin and I think I have configured it according to manual but it keeps giving me this error: name 'current' is not defined File c:\web2py\applications\authtest\models\plugin_social_auth.py in at line 41 Am I missing something? On Thursday, February 27, 2014 8:27:5

Re: [web2py] Re: Free opensource Janrain alternative - Python Social auth

2014-04-02 Thread Quint
hmm, You'll need to import current somewhere in one of your models i guess.. Try to add this: from gluon.globals import current to \models\plugin_social_auth.py I will update the source code... On Wednesday, April 2, 2014 12:57:19 PM UTC+2, Dragan Matic wrote: > > I have installed the plugin

[web2py] Re: after_update callback question

2014-04-02 Thread Anthony
> > I've tried your suggestion and worked!. At 'before_update' stored old > values in request.vars using Set object, then at 'after_update' access > these values and compare to the new ones at f. > Be careful about storing something in request.vars, as some other code may depend on request.var

Re: [web2py] datetime column with milliseconds precision

2014-04-02 Thread nick name
On Wednesday, February 12, 2014 5:11:29 PM UTC+2, Alex wrote: > > IS_DATETIME validator doesn't change anything. I doubt that validators are > used by the DAL. > I guess I have to use native sql to set milliseconds > (Better late than never ... I just saw this) You don't have to go directly to n

Re: [web2py][Javascript] Massimo here searching for some javascript devs ready to port web2py in JS

2014-04-02 Thread Richard Vézina
I forgot to log out before sending it damn it! Richard On Tue, Apr 1, 2014 at 11:39 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > LOL > > > On Tuesday, 1 April 2014 16:24:11 UTC-5, samuel bonill wrote: >> >> node.js(callback hell) sucks >> >> i love web2py !!! >> >

[web2py] Re: web2py logo - need immediate help

2014-04-02 Thread Massimo Di Pierro
Thank you Greg. This is really nice! I will pass it along to the organizing committee. On Wednesday, 2 April 2014 06:46:16 UTC-5, Greg Vaughan wrote: > > Hi Massimo > > Only just saw this... so bit quick and dirty... but just in case no one > else gets something in for you can use as a fallback.

[web2py] Re: Writable = False with Edit mode gives tampering with form's record_id error

2014-04-02 Thread Omi Chiba
This is the error I got. The form looks fine by doing Writable = False (See attachment) but None is set when it's submit. > user is tampering with form's record_id: > {'EMTKSC': None, 'EMTKCD': None} != {'EMTKSC': 'J11', 'EMTKCD': 'J2620008'} > I also tried Writable = True, and Disable the dr

[web2py] Re: after_update callback question

2014-04-02 Thread mcamel
Hello, I've tried your suggestion and worked!. At 'before_update' stored old >> values in request.vars using Set object, then at 'after_update' access >> these values and compare to the new ones at f. >> > > Be careful about storing something in request.vars, as some other code may > depend on

[web2py] Re: Writable = False with Edit mode gives tampering with form's record_id error

2014-04-02 Thread Niphlod
I seem to recall that the same thing happens setting db.table.id.writable = False On Wednesday, April 2, 2014 4:07:38 PM UTC+2, Omi Chiba wrote: > > This is the error I got. The form looks fine by doing Writable = False > (See attachment) but None is set when it's submit. > >> user is tamperin

[web2py] Re: web2py logo - need immediate help

2014-04-02 Thread Greg Vaughan
You're welcome... if you need any design stuff feel free to ask anytime... Front end & design is the easy bit :) On Wednesday, 2 April 2014 23:52:55 UTC+10, Massimo Di Pierro wrote: > > Thank you Greg. This is really nice! I will pass it along to the > organizing committee. > > On Wednesday, 2 A

Re: [web2py] Re: Scheduler - clarification around heartbeat, and setting up tasks

2014-04-02 Thread Niphlod
heartbeat=20 just makes workers check if there are new task every 20 seconds (plus housecleaning etc). If tasks are ready to be processed, they're picked up and processed ASAP. if you want to queue A, than wait 20 seconds, run B, then wait 20 seconds, then run C, you need to adjust the start_ti

Re: [web2py] Re: Scheduler - clarification around heartbeat, and setting up tasks

2014-04-02 Thread Anthony
When a task runs, it runs in the same environment as a controller, which means it runs your models. So, if you queue the tasks in a model, then whenever a task runs, it will end up queuing another version of itself. If you want to set these tasks to run repeatedly, then you only need to queue t

[web2py] Re: after_update callback question

2014-04-02 Thread Anthony
> > Be careful about storing something in request.vars, as some other code may >> depend on request.vars and end up failing due to it being changed. >> > > Any alternative you can suggest?. Session object seems error prone for > this because of concurrency... > You could just declare a global v

Re: [web2py] web2py over http?

2014-04-02 Thread Richard Vézina
It could depends of other configuration, your web server for instance... How do you start web2py for this test? Richard On Tue, Apr 1, 2014 at 6:52 PM, Daniel McBrearty wrote: > according to > > http://web2py.com/books/default/chapter/29/09/access-control > > "Auth has an optional secure=True

[web2py] SELECT class

2014-04-02 Thread Annet
I am using Bootstrap 3 and have a module that adds the right classes to the forms. In case of a select this: if: elif isinstance(controls, SELECT): controls.add_class('form-control') etc. In case the select doesn't validate the select changes to: so, controls.add_class('form-co

Re: [web2py][Javascript] Massimo here searching for some javascript devs ready to port web2py in JS

2014-04-02 Thread Carlos Correia
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ROTFL For a second, I saw the whole world collapsing... then I noticed the post's date ;-) Em 01-04-2014 18:44, Richard escreveu: > Hello, > > I want to get rid of python entirely. As you probably know, I don't see great > future in Python 3000 an

Re: [web2py][Javascript] Massimo here searching for some javascript devs ready to port web2py in JS

2014-04-02 Thread martzi
Nice one! Have a web2py-like (w2y) on that! On Tuesday, April 1, 2014 7:44:01 PM UTC+2, Richard wrote: > > Hello, > > I want to get rid of python entirely. As you probably know, I don't see > great future in Python 3000 and since we can't fighting the Javascript > dominance in webapp development

[web2py] Re: Writable = False with Edit mode gives tampering with form's record_id error

2014-04-02 Thread Omi Chiba
Right, Key have to be Writable. I ended up doing this my option 1 (Hide the value with CSS and display the value for the field separately using Custom Form very frustrated. On Wednesday, April 2, 2014 9:40:46 AM UTC-5, Niphlod wrote: > > I seem to recall that the same thing happens setting

[web2py] Re: Writable = False with Edit mode gives tampering with form's record_id error

2014-04-02 Thread Niphlod
always circumvented the "issue" with showid=False, but really don't know what happens with multiple pkeys or non integer ones. On Wednesday, April 2, 2014 9:04:17 PM UTC+2, Omi Chiba wrote: > > Right, Key have to be Writable. > > I ended up doing this my option 1 (Hide the value with CSS and dis

Re: [web2py] web2py over http?

2014-04-02 Thread Dave S
If Daniel is using Rocket, my brief experiments indicate that it doesn't do the http handshake to setup for https, which was an issue for my SOAP client. /dps On Wednesday, April 2, 2014 9:33:24 AM UTC-7, Richard wrote: > > It could depends of other configuration, your web server for instance.

Re: [web2py][Javascript] Massimo here searching for some javascript devs ready to port web2py in JS

2014-04-02 Thread Cliff Kachinske
Ha. On Tuesday, April 1, 2014 1:44:01 PM UTC-4, Richard wrote: > > Hello, > > I want to get rid of python entirely. As you probably know, I don't see > great future in Python 3000 and since we can't fighting the Javascript > dominance in webapp development world, I resign... I want to port web2p

[web2py] Possible feature request

2014-04-02 Thread Matt
How do I achieve the following elegantly with Web2py? Before I update an in memory record I want to check it's validators to make sure it makes sense before I actually update. I.e. client = db.client(7) if not client: raise HTTP(404) errors = client.validate(**vars) <== Something like this

[web2py] Help defining architecture for app

2014-04-02 Thread Francisco Betancourt
Hello everyone. I need some help defining the architecture for an application. We already have something in place, but the size of the the users data files is making the site very unresponsive. The app works as follows: 1. The user uploads a csv file 2. The user file is read to a table f

[web2py] Re: Possible feature request

2014-04-02 Thread Matt
Also adding support for errors = client.validate_and_update_record(**vars) would be useful too. On Thursday, April 3, 2014 12:30:55 PM UTC+13, Matt wrote: > > How do I achieve the following elegantly with Web2py? > > Before I update an in memory record I want to check it's validators to > make

[web2py] Major issue with request separation

2014-04-02 Thread cliff
I'm having a major issue with a web2py application in a production environment. It is easily reproducible and causing major issues. At it's most basic level I can make a new function which does just one thing - dumps something out to a log, appends to a file, posts an xmlrpc response, etc. all

[web2py] Re: displaying count and groupby

2014-04-02 Thread Fcosqui
This situation is so rare, I have the same problem with the current version, but I did not have this problem with version 2.8.2-stable + timestamp.2013.11.28.13.54.07 why can't i see a simple count like the prior version? . i use this sentence: rows = SQLTABLE(db(db.mydata.protocol=='udp').se

[web2py] Exception in importing pexpect

2014-04-02 Thread Ramesh Aj
I am trying to spawn a shell to remote machine in web2py and I am getting following exception Cannot import module 'pexpect' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: Is there an issue with my web2py install? "can't pickle function objects"

2014-04-02 Thread Carlos Alba
Is this still a issue? I am receiving this error. On Tuesday, July 16, 2013 9:44:46 PM UTC-5, Joe Magaro wrote: > > Hi, Lately when I'm in the admin section, when I perform an action such as > installing a new app, or deleting a view I keep getting the error below. Im > not sure what changed to

[web2py] Basic Auth with alternate auth method

2014-04-02 Thread Damien
Hello, I am using a custom login form to provide a customized authentication method. I would like my users to be able to authenticate using Basic Auth to access the service from a mobile application. However the problem is that I did not find a way to have Basic Auth use my custom login method

[web2py] Exception seen for controller in web2py

2014-04-02 Thread Ramesh Aj
I have controller in web2py as below # coding: utf8 # try something like #!/usr/local/python2.7 def index(): import pexpect import sys import time import cgi, cgitb import getpass import urllib3 import elementtree.ElementTree as ET ssh_cmd = 'ssh -t' userna

[web2py] {{include 'default/%s.html' % step}} does not work in view

2014-04-02 Thread Yufei Li
in my view, I am writing something like {{progress=['a','b','c']}} {{for step in progress :}} {{include 'default/%s.html' % step}} {{pass}} It complains as NameError: name 'step' is not defined Which simply does not make sense to me, anyone can please help me on why and how to make it wo

[web2py] Re: 'reference auth_user' in Data base tables?

2014-04-02 Thread Tom Clerckx
auth_user is a table used in web2py with respect to access control. You'll find a good overview about this on: http://web2py.com/books/default/chapter/29/09/access-control?search=auth_user Best regards, Tom. On Tuesday, April 1, 2014 8:01:20 PM UTC+2, Shubham Rathi wrote: > > Hi, I am a novice t

[web2py] Re: Possible feature request

2014-04-02 Thread Massimo Di Pierro
You can do errors = db(db.client.id==client.id).validate_and_update_(**vars) On Wednesday, 2 April 2014 19:03:49 UTC-5, Matt wrote: > > Also adding support for > > errors = client.validate_and_update_record(**vars) > > would be useful too. > > On Thursday, April 3, 2014 12:30:55 PM UTC+13, Mat

[web2py] Re: {{include 'default/%s.html' % step}} does not work in view

2014-04-02 Thread Massimo Di Pierro
Do not do it. {{include }} and {{extend }} and {{block ...}} are not Python code. They are template language. You should not mix python code and template languages. In come cases it works but soon or later you run into trouble. Instead fo {{=XML(response.render(open('other-template'),lo

[web2py] Re: Exception in importing pexpect

2014-04-02 Thread Massimo Di Pierro
Do you have the module in the path? Anyway, spawning a process form a web app is difficult because when the page returns you loose the process unless you have a single python process to start with and you cache a reference to spawned process in cache.ram. On Wednesday, 2 April 2014 12:42:40 UT

[web2py] Re: Possible feature request

2014-04-02 Thread Matt
Thanks. Yes that's true. However I do think there are definitely situations where it would be useful to be able to call validate like this arbitrarily. On Thursday, April 3, 2014 2:01:17 PM UTC+13, Massimo Di Pierro wrote: > > You can do > > errors = db(db.client.id==client.id).validate_and_upda

[web2py] Re: Possible feature request

2014-04-02 Thread Massimo Di Pierro
I do not want to add methods to Row object for various reasons including performance. moreover we have a feature freeze until we address some more important issues with dal.py. On Wednesday, 2 April 2014 20:23:50 UTC-5, Matt wrote: > > Thanks. Yes that's true. > > However I do think there are

[web2py] Re: Possible feature request

2014-04-02 Thread Anthony
A Row object does not know its db table (and therefore fields), so it would not be able to run validations. If you really need to validate a set of values outside the context of doing an update, it wouldn't be difficult to write a convenience function to do so (just pass in the db table, iterate

[web2py] list:string

2014-04-02 Thread horridohobbyist
I've added a 'list:string' field to my table, but when adding a new record from admin (using the new record form), I can't figure out how to enter the data. I don't understand what format it expects. I tried "['item1','item2']". I tried "|'item1'|'item2'|". They both don't work. -- Resources:

Re: [web2py] list:string

2014-04-02 Thread Manuele Pesenti
Il 03/04/14 06:23, horridohobbyist ha scritto: > I've added a 'list:string' field to my table, but when adding a new > record from admin (using the new record form), I can't figure out how > to enter the data. I don't understand what format it expects. > > I tried "['item1','item2']". I tried "|'it