[web2py] headers argument behavior in v1.97.1

2011-07-06 Thread niknok
While using crud, I sometimes define headers for *some* fields listed in the fields argument. This works until I upgraded to 1.97.1 and now I get an error if I do not define the headers for *all* fields listed in the fields argument. For example, the following code no longer works rows=cr

[web2py] Re: Check

2011-07-06 Thread beedge
Apologises. Stupid. Double (differeing) definition of db in the model file, before and after some custom auth tables. Hence, app was pulling in my apps tables, but I couldn't see the auth stuff and odd behaviour.

Re: [web2py] Re: Query construction question

2011-07-06 Thread Martin Barnard
No. There is a good chance that the person who uploaded the memo (db.memo_store.created_by) is not the same as the person viewing the memo (db.viewed_memos.created_by). My solution, for people who are interested in something similar: def unread_memos(): """ Will return a list of all unread

Re: [web2py] cron "Too many open files" regression?

2011-07-06 Thread John Duddy
None that I know of. The processes that accumulate have the same arguments as the main web2py process (as shown by ps -ef) so it's like a fork with no exec. On Wednesday, July 6, 2011, ron_m wrote: > Maybe one possibility is if your code has classes with a __del__ method in > them, Massimo would

Re: [web2py] Re: Temporary changing default values of a Form

2011-07-06 Thread Luis Goncalves
In fact, just to make sure there wasn't something hidden in my app affecting the behavior, I downloaded a fresh install of web2py, and get the same error: File "/home/pierluigi/web2py/gluon/tools.py", line 1796, in register user = self.db(table_user[username] == form.vars[username]).select

[web2py] Web2py and jython

2011-07-06 Thread Alfonso de la Guarda
Hello, I will start a business project that needs create a web layer in front of Adampiere / Open Bravo for hospital / clinic operation. We will avoid JAVA, but need some of the objects provided in those ERPs, because that jython is the best choice. I choose web2py for the weblayer, but at the sta

Re: [web2py] Re: Temporary changing default values of a Form

2011-07-06 Thread Luis Goncalves
Yes, when I click on the invite and go to the website I get the registration form filled out with email (and name (excluded from my shortened example)) visible and non-editable. Luis. —«sent by mobile»— On Jul 6, 2011 8:17 PM, "Massimo Di Pierro" wrote: > Are you sure your db.registrant has an e

[web2py] Re: requires_permission example

2011-07-06 Thread Tim Korb
Thanks for your reply. My confusion is about "object" when it is not a table. For one thing, the appadmin interface seems to force the object to be a table--it is chosen from the drop down box of available tables. Do I have to create a dummy table for each of these permission objects? Beyon

[web2py] Re: pyodbc access to Teradata (via web2py)

2011-07-06 Thread Andrew
Thankyou Massimo, I have been able to connect OK to a Teradata database based on the change to dal.py. An important parameter to specify in the DAL for Terdata is "DATABASE=xyz" to set the default database. This worked OK as is. There are a few differences between DB2 and Teradata though (as I

[web2py] Re: talks

2011-07-06 Thread Massimo Di Pierro
Here is more about my talk in San Francisco on July 13 http://www.meetup.com/sfpython/events/24721631/ Look forward to see some of you. Massimo

[web2py] Re: Temporary changing default values of a Form

2011-07-06 Thread Massimo Di Pierro
Are you sure your db.registrant has an email? On Jul 6, 10:04 pm, Luis Goncalves wrote: > I still get the same error: > >   File "/home/ubuntu/web2py/gluon/tools.py", line 1683, in register >     user = self.db(table_user[username] == > form.vars[username]).select().first() > KeyError: 'email' >

[web2py] Re: Temporary changing default values of a Form

2011-07-06 Thread Luis Goncalves
I still get the same error: File "/home/ubuntu/web2py/gluon/tools.py", line 1683, in register user = self.db(table_user[username] == form.vars[username]).select().first() KeyError: 'email' I don't know if it makes a difference or not, but I'm using emails for login (not a username) -- as

[web2py] found it

2011-07-06 Thread beedge
Found the error after putting it down then reading through my .db file from start to finish. It was something silly, I defined the database at two different points in the file, one being after the new auth table. Remove it and everything works as it should. Apologises & thanks...

[web2py] Re: Temporary changing default values of a Form

2011-07-06 Thread Massimo Di Pierro
My example did not have the line: form=auth.register() On Jul 6, 1:39 pm, Luis Goncalves wrote: > Both with Massimo's > >           auth.settings.table_user.email.default = registrant.email >           auth.settings.table_user.email.writable=False > >           form=auth.register() > > and with

[web2py] Re: Temporary changing default values of a Form

2011-07-06 Thread Luis Goncalves
Actually, I still want email verification to happen (because someone else may stumble upon the link and register with a password unknown to the real user). Nevertheless, I disabled registration verification, and now I get an error deep within gloun/tools.py Error occurs after entering passwor

[web2py] Re: Check

2011-07-06 Thread ron_m
If you started with a copy of the Welcome app did you change the database name? If both apps have the same database URL originally defined in the Welcome app in file models/db.py they will share tables.

[web2py] Re: cron "Too many open files" regression?

2011-07-06 Thread Massimo Di Pierro
This should not be a problem because cron jobs are executed in their own processes (not threads) and they should just die. Anyway, I cannot completely exclude it either. On Jul 6, 6:32 pm, ron_m wrote: > Maybe one possibility is if your code has classes with a __del__ method in > them, Massimo wo

Re: [web2py] Re: cron "Too many open files" regression?

2011-07-06 Thread ron_m
Maybe one possibility is if your code has classes with a __del__ method in them, Massimo would have better perspective on if this is a possibility. If a class with this method is involved in a circular reference the garbage collector cannot clean it up because of uncertainty of execution of the

Re: [web2py] know if a form have pass every validators

2011-07-06 Thread Richard Vézina
Forget about it... I found the problem... There was to many things anyway. ;-) Richard On Wed, Jul 6, 2011 at 1:52 PM, Richard Vézina wrote: > I realise that it's not what I need when I just press send... Since not all > the validators have passed when I want to my code to enter in action... >

[web2py] Re: OffTopic Google+

2011-07-06 Thread Zphen
Does anyone have a spare invitation for list-stalker like me? (only submitted a single patch to date) On Jul 6, 9:16 am, mikech wrote: > I am interested, but not anxious to add to my social load at the moment. >  What are your impressions? > > Mike

Re: [web2py] Re: OffTopic Google+

2011-07-06 Thread Richard Vézina
I think that by default your friends, familly, etc. don't see in which circle you put them... But I am not sure of that... It's what they said : http://www.youtube.com/watch?v=ocPeAdpe_A8&NR=1 *: 43 sec* Richard On Wed, Jul 6, 2011 at 5:46 PM, Sebastian E. Ovide < sebastian.ov...@gmail.com> wr

[web2py] Re: Check

2011-07-06 Thread Anthony
That doesn't sound right. Can you reproduce the behavior? Are you using CAS ( https://groups.google.com/d/topic/web2py/Qcw6B1Y89JM/discussion), or regular Auth? Anthony On Wednesday, July 6, 2011 3:20:37 PM UTC-4, beedge wrote: > Thanks for responses. Point about definition of objects in th

Re: [web2py] Re: OffTopic Google+

2011-07-06 Thread Sebastian E. Ovide
yes circles is a good idea... just wondering if it possible to hide which group each person is part of... so that for example the "GF" wont complain of not being part of the "very close friends" circle... as in south park facebook episode :D http://www.youtube.com/watch?v=kT_cp2x0qso&feature=r

Re: [web2py] PowerTable question?

2011-07-06 Thread Jim Steil
bump ...still looking for some help and hoping not to get lost in all the other posts out there. Anyone else using this tool? Looks very powerful but I'm having trouble with a couple of basic issues. If anyone knows of a better place to post my question, I'm all ears... -Jim On 7/5/20

[web2py] Re: requires_permission example

2011-07-06 Thread pbreit
You can do it with code: 1. auth.add_permission(group_id, 'name', 'object', record_id) gives permission "name" (user defined) on the object "object" (also user defined) to members of the group group_id. If "object" is a tablename then the permission can refer to the entire table by setting rec

[web2py] requires_permission example

2011-07-06 Thread Tim Korb
I'm trying to figure out this example from the book of requires_permission... @auth.requires_permission('add', 'number') def add(a, b): return a + b def function_seven(): return add(3, 4) I put this code into controllers/default.py. What additional auth db entries do I need to make th

[web2py] Check

2011-07-06 Thread beedge
Thanks for responses. Point about definition of objects in the python files accepted! Can I just check something here, as I may have the wrong end of the stick... My understanding was that the Apps are all completely independent (i.e. seperate authentication etc). However, I'm seeing an account

[web2py] Re: Temporary changing default values of a Form

2011-07-06 Thread Anthony
Do you have: auth.settings.registration_requires_verification = True somewhere? If so, remove that line or set it to False. That attempts to send a verification email to the user's email address (which is failing and causing the error), which I assume you don't need given that your registrat

[web2py] redirect to profile if first time login

2011-07-06 Thread Nicolas Palumbo
I'm currently using ldap to auth with ldap_auth module of web2py. Currently if you are successful to login, are automatically redirected to index page. Which happens the first time the user log in to the system as well. I'd like to detect if it is the first time for a user to log into the system a

Re: [web2py] multiselect filter

2011-07-06 Thread Richard Vézina
Yes it is a other option for multiselect. ;-) Richard On Wed, Jul 6, 2011 at 2:45 PM, Nicolas Palumbo wrote: > I ended up using this widget, which is more intuitive for a big list: > http://www.quasipartikel.at/multiselect/ > > On Wed, Jul 6, 2011 at 6:08 PM, Richard Vézina > wrote: > > http:

[web2py] Re: Field type

2011-07-06 Thread mart
well, i think so but, even if a field is set to 'string', and a script receives something comma delimited, DAL will will want to treat it as a list. so doing x.type takes me half the way, then i need to check if a list wasn't inserted into the record instead (most of the time i get a string, but s

Re: [web2py] Re: OffTopic Google+

2011-07-06 Thread Ross Peoples
Free, unlimited storage of photos as large as 2048x2048 and videos under 15 in length is pretty awesome. This will be more than enough for most people. @sebastian: The point of the circles is so that you can share information with only certain groups if you want. So you could be "friends" with

[web2py] Re: Command-line support

2011-07-06 Thread (m)
Massimo, thanks for the post -- it clarifies some of what you said on 09 Nov 2010. I actually revived this thread to see if anyone had collected these under one interface, e.g.: web2py_manage --newapp=APPNAME Makes a new directory applications/APPNAME and copies scaffolding there. web2py_manage

Re: [web2py] multiselect filter

2011-07-06 Thread Nicolas Palumbo
I ended up using this widget, which is more intuitive for a big list: http://www.quasipartikel.at/multiselect/ On Wed, Jul 6, 2011 at 6:08 PM, Richard Vézina wrote: > http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/ > If you use this plugin I think it will work... See seconde

[web2py] Re: Temporary changing default values of a Form

2011-07-06 Thread Luis Goncalves
Both with Massimo's auth.settings.table_user.email.default = registrant.email auth.settings.table_user.email.writable=False form=auth.register() and with your db[auth.settings.table_user_name].email.writable=False db[auth.settings.t

[web2py] Re: Temporary changing default values of a Form

2011-07-06 Thread Anthony
On Wednesday, July 6, 2011 2:04:26 PM UTC-4, Luis Goncalves wrote: > > db.table_user.email.writable=False # gives error > I think this should be db.auth_user, not db.table_user. Note, the name of the auth user table (which defaults to 'auth_user') is stored in auth.settings.table_use

[web2py] Re: Field type

2011-07-06 Thread Anthony
Doesn't db.myTable.myField.type work? Or am I missing something? Anthony On Wednesday, July 6, 2011 12:59:54 PM UTC-4, mart wrote: > almost :) i'm looking to guess the field types. for example, at the > cmd line i can use a quick and dirty helper like this: > > -table myTable fields=id,name,v

Re: [web2py] multiselect filter

2011-07-06 Thread Richard Vézina
http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/ If you use this plugin I think it will work... See seconde plugin demo dropbox in the page... Richard On Wed, Jul 6, 2011 at 10:59 AM, Nicolas Palumbo wrote: > Hi, is it possible to apply filtering in a multiselect control c

[web2py] Re: Temporary changing default values of a Form

2011-07-06 Thread Massimo Di Pierro
This should do it: def user(): if request.args(0)=='register': registrant = db(db.registrant.token == request.vars.token).select().first() or redirect(URL('error')) db.auth_user.email.writable=False # gives error db.auth_user.email.default=registrant.email

[web2py] Re: Temporary changing default values of a Form

2011-07-06 Thread Luis Goncalves
Good point! Unfortunately, I am not expert enough to understand how to do this in my case, because I am using the form=auth.register(). Wouldn't I have to do what you suggest inside Auth.register ? (for an explanation of why I am doing this, see: https://groups.google.com/forum/#!topic/web2p

Re: [web2py] know if a form have pass every validators

2011-07-06 Thread Richard Vézina
I realise that it's not what I need when I just press send... Since not all the validators have passed when I want to my code to enter in action... I face a really bizzard issue... Here my model : db.define_table('ref_tregistry', Field('tregistry_id','id'), Field('vregistry_id',db.ref_vregi

[web2py] Re: Command-line support

2011-07-06 Thread Massimo Di Pierro
The fact is, you can already do very much everything form the shell: create an app cd application mkdir myapp cp -r welcome/* myapp delete an app rm -r applications copy a plugin cd ~/web2py ccpcplugin.py plugin_name app_source app_target install a remote app or remote plugin cd application

[web2py] Re: Command-line support

2011-07-06 Thread (m)
I am wondering if this discussion ended up going anywhere. As a newbie webapp developer (but not a newbie programmer), the only thing I might add to what blackthorne has already said is that I'm finding it easier to understand what's going on and what's where by interacting with my filesystem a

[web2py] Re: Field type

2011-07-06 Thread mart
this test worked (yeah, i asked the question too hastily again ;) ) for item in self.db[table].fields: if isinstance(self.db[table][item].type,str) \ and self.db[table][item].type=='string': print 'field is string: {0}'.format(self.db[table][item]) returned: field is str

Re: [web2py] Re: OffTopic Google+

2011-07-06 Thread Vasile Ermicioi
http://picasa.google.com/support/bin/answer.py?answer=1224181 If you've signed up for Google+ Photos up to 2048 x 2048 pixels and videos up to 15 minutes won't count towards your free storage. If you haven't signed up for Google+ Photos up to 800 x 800 pixels and videos up to 15 minutes won't co

[web2py] Re: Field type

2011-07-06 Thread mart
almost :) i'm looking to guess the field types. for example, at the cmd line i can use a quick and dirty helper like this: -table myTable fields=id,name,value this displays a nice ascii table but, the fields are comma delimited so if the returned field is a list (also comma delimited), the table

Re: [web2py] easy way to validate a list of emails?

2011-07-06 Thread Luis Goncalves
Excellent! Works perfectly!! Also a great lesson in how to extend the set of web2py form validators! Thank you, Bruno!!! Obrigado!!! Luis.

Re: [web2py] Re: OffTopic Google+

2011-07-06 Thread Sebastian E. Ovide
I'm not very sure about the effects that could have including some person to the "Acquaintances" circle rather than to the "Friends" circle On Wed, Jul 6, 2011 at 12:52 PM, Ross Peoples wrote: > I have tried it. I like it better than Facebook, especially because of its > commitment to privacy

[web2py] Re: Field type

2011-07-06 Thread Anthony
db.tables is a list of the names of the tables in db, and db.tablename.fields is a list of the names of the fields in db.tablename. Is that what you're looking for? Anthony On Wednesday, July 6, 2011 12:27:09 PM UTC-4, mart wrote: > hi, > > question: > > how could I guess the field in somet

[web2py] Re: Field type

2011-07-06 Thread mart
hi, question: how could I guess the field in something like an interactive shell? i assume, I have to specify db.tableName.filedName? is there something like db.myTable.myField.type? thanks, Mart :) On Jul 4, 12:11 pm, mart wrote: > ah ha! thank you very much! :) > > On Jul 4, 11:46 am,

Re: [web2py] know if a form have pass every validators

2011-07-06 Thread Miguel Lopes
You can also use form.errors if form.accepts(...): ... elif form.errors: ... HTH, Miguel On Wed, Jul 6, 2011 at 5:08 PM, Anthony wrote: > form.accepts(...) returns True if all validators pass and False otherwise > -- is that what you're looking for? > > Anthony > > On Wednesday, July 6, 2

Re: [web2py] know if a form have pass every validators

2011-07-06 Thread Anthony
form.accepts(...) returns True if all validators pass and False otherwise -- is that what you're looking for? Anthony On Wednesday, July 6, 2011 11:43:29 AM UTC-4, Richard wrote: > Hello, > > Is there a way I can test if form have been submit and if no validators > have triggered? > > Thanks

[web2py] know if a form have pass every validators

2011-07-06 Thread Richard Vézina
Hello, Is there a way I can test if form have been submit and if no validators have triggered? Thanks Richard

[web2py] Re: easy way to validate a list of emails?

2011-07-06 Thread pbreit
Would IS_IN_SET() work?

[web2py] Re: talks

2011-07-06 Thread pbreit
Here we go. Looks good. Cool that it's at Yelp, too. *What*: Double Feature: Web2Py + Speeding up Dev Cycles with Tools for Django & others *When*: Wednesday, July 13, 2011 6:30 PM *Where*: Yelp 706 Mission Street San Francisco, CA 94103

[web2py] "Movie not loaded..." problem with flash

2011-07-06 Thread Miguel Lopes
It is unlikely that this is web2py related, but I'm about to go crazy with this one. But I guess it's such a general thing someone must know what is going on. I'm using different uploaded media, such as files, images and flash files (.swf files). I can display images without problem, but not flash

Re: [web2py] Re: Metaprogramming in controller

2011-07-06 Thread Miguel Lopes
Humm, Nice. Yes, closures are enough, and cleaner too. Is routes OK for production mode? Txs, Miguel On Wed, Jul 6, 2011 at 3:54 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Jonathan is right. Here is a simple way around. > > Create a single controller called dynamical. use reque

[web2py] multiselect filter

2011-07-06 Thread Nicolas Palumbo
Hi, is it possible to apply filtering in a multiselect control created with list:refereces. I mean I have the list of options, which is quite big. --- opt1 opt2 --- I'd like to be able to see a shortened version according to the content of a filter field (textbox

[web2py] Re: cron "Too many open files" regression?

2011-07-06 Thread Massimo Di Pierro
Please keep us posted. Massimo On Jul 6, 9:31 am, John Duddy wrote: > It was my understanding that Python's GC frees any resources not explicitly > freed, and cron runs jobs in a try/except/finally block and rolls back any > uncommitted transactions. > > I have reproduced the issue with the thre

[web2py] Re: Metaprogramming in controller

2011-07-06 Thread Massimo Di Pierro
Jonathan is right. Here is a simple way around. Create a single controller called dynamical. use request.args(0) to parse the name of one of the dynamical actions and remap def dynamical(): actionname, request.args[:] = request.args(0), request.args[1:] # call actionname and pass reques

[web2py] Re: bug with default view

2011-07-06 Thread Anthony
1.96.1 -- see http://www.web2py.com/examples/default/changelog On Wednesday, July 6, 2011 10:33:12 AM UTC-4, Oskari wrote: > When has this behaviour changed? I can't seem to find it on log > > On Jun 17, 7:33 pm, Jose wrote: > > On 17 jun, 11:35, Anthony wrote: > > > > > > > > > > > >

Re: [web2py] Metaprogramming in controller

2011-07-06 Thread Miguel Lopes
Thanks. In conjunction with routes could supply a solution (shortening the urls). I think I should rethink the payoff (see my reply to Massimo regarding my goals). Thanks, Miguel On Wed, Jul 6, 2011 at 3:12 PM, Jonathan Lundell wrote: > On Jul 6, 2011, at 1:23 AM, Miguel Lopes wrote: > > I'm exp

[web2py] Re: bug with default view

2011-07-06 Thread Oskari
When has this behaviour changed? I can't seem to find it on log On Jun 17, 7:33 pm, Jose wrote: > On 17 jun, 11:35, Anthony wrote: > > > > > > > > > > > On Friday, June 17, 2011 10:16:16 AM UTC-4, Jose wrote: > > > > Hi, > > > > In later versions of the trunk the default view does not work. If I

Re: [web2py] Re: Metaprogramming in controller

2011-07-06 Thread Miguel Lopes
I putting together an interface where users can add pages to a site and have these pages indistinguishable from "hard-coded" pages/functions. However, I would have the best of both worlds and have very clean urls. Thus, I'm trying to avoid things like: /application/controller/catchall_function/pag

Re: [web2py] Re: cron "Too many open files" regression?

2011-07-06 Thread John Duddy
It was my understanding that Python's GC frees any resources not explicitly freed, and cron runs jobs in a try/except/finally block and rolls back any uncommitted transactions. I have reproduced the issue with the three running sequentially, and in every case, the logs indicate that my functions e

Re: [web2py] Metaprogramming in controller

2011-07-06 Thread Jonathan Lundell
On Jul 6, 2011, at 1:23 AM, Miguel Lopes wrote: > I'm experimenting with dynamically generating functions, aka 'actions' in > controllers. However, I've been unsuccessful. I can use exec and closures > successfully in regular Python code, but I can't make it work with web2py. > Any thoughts on h

[web2py] Re: Error on LOAD() in trunk

2011-07-06 Thread Anthony
On Wednesday, July 6, 2011 1:20:30 AM UTC-4, GoldenTiger wrote: > > I referred to generic views by default, like > http://web2py.com/examples/simple_examples/hello6 > and discussed recently here > > Invalid view in 1.97.1: > > https://groups.google.com/group/web2py/browse_thread/thread/c3a14f5

[web2py] Re: Metaprogramming in controller

2011-07-06 Thread Massimo Di Pierro
Can you explain the goal? On Jul 6, 3:23 am, Miguel Lopes wrote: > I'm experimenting with dynamically generating functions, aka 'actions' in > controllers. However, I've been unsuccessful. I can use exec and closures > successfully in regular Python code, but I can't make it work with web2py. > A

[web2py] Re: cron "Too many open files" regression?

2011-07-06 Thread Massimo Di Pierro
Yes that is the problem wit cron issue. If one of the processes locks a resource, cron does not know about it and keeps spawning processes as scheduled. The new processes find the resource locked and freeze of crash but use ram. This is not a bug because cron is not supposed to know what the tasks

[web2py] Re: Temporary changing default values of a Form

2011-07-06 Thread Massimo Di Pierro
You would suggest you do this instead db.table.email.writable=False in the controller, before defining the form. Setting the field readonly in the view may still allow a malicious attacker to tamper with the field value. On Jul 6, 1:12 am, Luis Goncalves wrote: > I found the answer searching t

[web2py] Re: Error on LOAD() in trunk

2011-07-06 Thread Massimo Di Pierro
This has been fixed in trunk. Anthony pointed it out to me one week ago. On Jul 6, 12:20 am, GoldenTiger wrote: > I referred to generic views by default, > likehttp://web2py.com/examples/simple_examples/hello6 > and discussed recently here > > Invalid view in > 1.97.1:https://groups.google.com/

[web2py] Re: OffTopic Google+

2011-07-06 Thread Ross Peoples
I have tried it. I like it better than Facebook, especially because of its commitment to privacy. The circles feature is great. I think most people don't friend their bosses, coworkers, and business acquaintances of Facebook because they don't want their personal lives to be exposed to those peo

[web2py] Re: web2py and DreamPie - The Python shell you've always dreamed about!

2011-07-06 Thread Vasil Petkov
I am interested in a work with that shell together with web2py, too. As much as i know, web2py works with the IPython shell. On Jul 5, 12:38 pm, Bruno Rocha wrote: > Does anybody knows how can we run web2py in shell mode under DreamPie? > > http://dreampie.sourceforge.net/ > > -- > Bruno Rocha >

Re: [web2py] easy way to validate a list of emails?

2011-07-06 Thread Bruno Rocha
https://gist.github.com/1066850

Re: [web2py] easy way to validate a list of emails?

2011-07-06 Thread Bruno Rocha
forget the latest, I wrote directly here in email and there were errors. This is the tested code: ### put in models ### class IS_EMAIL_LIST(object): def __init__(self, error_message="Email %s is invalid", sep=","): self.error_message = error_message self.sep = sep def __

Re: [web2py] easy way to validate a list of emails?

2011-07-06 Thread Bruno Rocha
Hi, you can create a custom validator for doing that include this in any model: ### THE CUSTOM VALIDATOR ### class IS_EMAIL_LIST(object): def __init__(self, error_message='Email %s is invalid', sep=","): self.format = format self.error_message = error_message self.sep

[web2py] Metaprogramming in controller

2011-07-06 Thread Miguel Lopes
I'm experimenting with dynamically generating functions, aka 'actions' in controllers. However, I've been unsuccessful. I can use exec and closures successfully in regular Python code, but I can't make it work with web2py. Any thoughts on how to achieve this? A closure example - FAILS in web2py: