[web2py:14814] Re: Multiple field index

2009-01-09 Thread ionel
Yes, you are right. Thank you massimo P.S. I love web2py! On Jan 8, 11:06 pm, mdipierro wrote: > Yes. It is possible to validate dependent fields as if you have a > multi-column index. > An example was discussed > here:http://groups.google.com/group/web2py/browse_thread/thread/7551b50ef3...

[web2py:14813] Re: Proposal: supporting GAE transactions in DAL

2009-01-09 Thread Robin B
The next logical step is creating, reading, updating, and deleting other records from within the transaction, at which point the lambda which is really a function, should not be stuck under the field=... since it is now much more than a field. Since the lambda is passed the entire record, perhaps

[web2py:14812] Re: IronPython

2009-01-09 Thread mdipierro
It is worth a try. I can help with debugging but have no time for testing. Who wants to help? Massimo On Jan 9, 5:58 pm, "Phyo Arkar" wrote: > Try to make web2py work on PyPy and we can port to al Runtime :) > > On Fri, Jan 9, 2009 at 11:44 PM, mdipierro wrote: > > > No but there is no rea

[web2py:14811] Re: Proposal: supporting GAE transactions in DAL

2009-01-09 Thread mdipierro
The more I think about this the more I like your solution. We can provide both notations: 1) row.update_record(count=db.table.count+1) 2) row.update_record(count=lambda r: r.count+1) and the lambda notation should work even without GAE. If you send me the patch for GAE I can fix the non-gae.

[web2py:14810] Fwd: Jython 2.5 Beta1 Released!

2009-01-09 Thread Massimo Di Pierro
perhaps it is time to again to run web2py to jython! who wants to take the lead on this? Massimo Begin forwarded message: > From: Frank Wierzbicki > Date: January 9, 2009 3:37:38 PM CST > To: Jython Developers , > userJython , "python-announce- > l...@python.org" > Subject: Jython 2.5 Bet

[web2py:14809] Re: SQLFORM.accepts(): onaccept,oncreate,onupdate

2009-01-09 Thread mdipierro
In trunk. See if it works as you suggested. massimo On Jan 9, 6:29 pm, mdipierro wrote: > ok. I will change accept, we ca change T2 too. T2 does not need to > keep backward compatibility. We can discuss this on Monday on the IRC. > Thanks Robin. > > Massimo > > On Jan 9, 6:13 pm, Robin B wrote

[web2py:14808] Re: Proposal: supporting GAE transactions in DAL

2009-01-09 Thread mdipierro
let me think about this... On Jan 9, 6:20 pm, Robin B wrote: > > row.update_record(count=db.table.count+1) > > Nice, thats great syntax for incrementing counters, but you would need > a lambda to do anything more complicated than arithmetic in a > transaction. > > What about a more complex trans

[web2py:14807] Re: SQLFORM.accepts(): onaccept,oncreate,onupdate

2009-01-09 Thread mdipierro
ok. I will change accept, we ca change T2 too. T2 does not need to keep backward compatibility. We can discuss this on Monday on the IRC. Thanks Robin. Massimo On Jan 9, 6:13 pm, Robin B wrote: > t2.create() already has onaccept= (it should have been called > onsave= ) because it does not get c

[web2py:14806] Re: Proposal: supporting GAE transactions in DAL

2009-01-09 Thread Robin B
> row.update_record(count=db.table.count+1) Nice, thats great syntax for incrementing counters, but you would need a lambda to do anything more complicated than arithmetic in a transaction. What about a more complex transaction like read a value and set it based on rules (for creating a lock)?

[web2py:14805] Re: SQLFORM.accepts(): onaccept,oncreate,onupdate

2009-01-09 Thread Robin B
t2.create() already has onaccept= (it should have been called onsave= ) because it does not get called until after the record has been created/updated within the form. You are right oncreate/onupdate could be replaced with onsave, which does not need to be passed to the SQLFORM. Ideally, it shou

[web2py:14804] Re: IronPython

2009-01-09 Thread Phyo Arkar
Try to make web2py work on PyPy and we can port to al Runtime :) On Fri, Jan 9, 2009 at 11:44 PM, mdipierro wrote: > > No but there is no reason why not, just limited manpower. > if you are interested in working on it you will have all our support. > > Massimo > > On Jan 9, 11:27 am, mikech

[web2py:14803] Re: Proposal: supporting GAE transactions in DAL

2009-01-09 Thread mdipierro
I think we have something like this without introducing a special syntax for GAE based on lambda. In fact on non-gae you can now do row.update_record(count=db.table.count+1) The same could work on GAE with your code below. massimo On Jan 9, 1:11 pm, Robin B wrote: > To perform certain actions

[web2py:14802] Re: IronPython

2009-01-09 Thread mdipierro
No but there is no reason why not, just limited manpower. if you are interested in working on it you will have all our support. Massimo On Jan 9, 11:27 am, mikech wrote: > I was just wondering is there any effort going on to see if web2py > will work with IronPython? > > Mike --~--~-~--

[web2py:14801] IronPython

2009-01-09 Thread mikech
I was just wondering is there any effort going on to see if web2py will work with IronPython? Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to w

[web2py:14800] Re: SQLFORM.accepts(): onaccept,oncreate,onupdate

2009-01-09 Thread mdipierro
I can see the use for onaccept but why oncreate/onupdate. This would be equivalent to putting the code after accepts(..) returns. Am I missing something? Massimo On Jan 9, 3:33 pm, Robin B wrote: > SQLFORM.accepts(...) could use hooks: onaccept, oncreate, onupdate. > > onaccept: called after FO

[web2py:14799] SQLFORM.accepts(): onaccept,oncreate,onupdate

2009-01-09 Thread Robin B
SQLFORM.accepts(...) could use hooks: onaccept, oncreate, onupdate. onaccept: called after FORM.accept and immediately before create() or insert() oncreate: called after create() onupdate: callled after update() These hooks could be used by t2 and passed to SQLFORM: t2.update(onaccept=...,onupda

[web2py:14798] Re: example about group memberships and group based access control in t3

2009-01-09 Thread Fran
On Jan 8, 9:30 pm, mdipierro wrote: > Currently there is no mechinsm to enforce access control to the menu > items, only to the content of those pages. This is bad UI to present people with pages to which they don't have access. The solution within my app is to have the function which renders t

[web2py:14797] Proposal: supporting GAE transactions in DAL

2009-01-09 Thread Robin B
To perform certain actions on GAE you need transactions, eg. atomically increment a counter. This is what it would look like: row.update_record(count=lambda r: r.count+1) The GAE driver would check attributes for lambdas and invoke a transaction when a lambda is present, the other SQL drivers c

[web2py:14796] Re: example about group memberships and group based access control in t3

2009-01-09 Thread drayco
Yes, maybe, I am a newbie in web app. My suggestion is because in this moment i have a web app that uses t3. This app has groups and each Group have diferent reports. But, if a coordinator want to see reports of organizator, they can't because they don't have access, and I show the message for t

[web2py:14795] Re: User management and registration

2009-01-09 Thread tknack
Hi Massimo, I am using T2 because I believe it's an easy way to manage users rights. I don't know how to use and where to put the following code: t2.add_membership(person_id,group_id) Normally , I think it's necessary only one time ! Is it possible to create a form to enable administrator to

[web2py:14794] Re: Validate multiple fields

2009-01-09 Thread tknack
On 9 jan, 15:07, mdipierro wrote: > If the are app specific I would put them in a model file. > > I was not planning to extend the number of built-in validators but you > raised a good issue. I think we need one more or one more parameter > for IS_IN_DB. > Yes, I think it's a great idea ! The

[web2py:14793] Re: Upper and lower case problems with sqllite, Greek / German and itemize / select

2009-01-09 Thread Petros Diveris
Hi Massimo, I don't think that the sharplus guys would like to distribute their DLLs with an opensource package but I will ask them. On the other hand, I am determined to get an ICU enabled version of sqlite compiled with open source tools or at least linked with libraries that would allow us to

[web2py:14792] Re: Upper and lower case problems with sqllite, Greek / German and itemize / select

2009-01-09 Thread mdipierro
Interesting. I could use some help with this. Will the license allow redistribution? On Jan 9, 7:36 am, Petros Diveris wrote: > Ok, > > It seems that the version of sqlite shipped with Python versions 2.5 > to 3.0 for Windows has been compiled in a way as to not include what > the sqlite guys ca

[web2py:14791] Re: Validate multiple fields

2009-01-09 Thread mdipierro
If the are app specific I would put them in a model file. I was not planning to extend the number of built-in validators but you raised a good issue. I think we need one more or one more parameter for IS_IN_DB. On Jan 9, 2:44 am, tknack wrote: > Thank you, Massimo, it works fine > > But, i

[web2py:14790] Re: Upper and lower case problems with sqllite, Greek / German and itemize / select

2009-01-09 Thread Petros Diveris
Ok, It seems that the version of sqlite shipped with Python versions 2.5 to 3.0 for Windows has been compiled in a way as to not include what the sqlite guys call the ICU extension. The ICU is a little extension that links sqlite with the ICU library (installed separately), thus allowing it to pr

[web2py:14789] Re: View/Controller or should it be Presentation/Logic mix-up

2009-01-09 Thread achipa
There has been a lot of discussion on HTML helpers. I think their main shortcoming is actually that for novice web2py users it's hard to find 'the right amount' of them. Some tend to avoid them like yourself and deprive themselves of some rapid prototyping/design options, while some people overuse

[web2py:14788] Re: A New Cron (and post-connection tasks)

2009-01-09 Thread achipa
Hmmm, I sent you the patch directly last night (after your 5:51pm) post, and the link works for me... Too much romulan ale ? I'll resend anyway :) b...@odin:/var/tmp$ wget http://www.atombiztos.hu/cron-2009-01-08.patch --11:50:13-- http://www.atombiztos.hu/cron-2009-01-08.patch => `cr

[web2py:14787] Re: Suggested enhancement to admin/views/site.html: Link to Database

2009-01-09 Thread Fran
On Jan 8, 1:26 pm, mdipierro wrote: > I liked the suggestion but I removed because of logical problems. > While all other links from site link actions in the admin app, this > link would link an action that belongs to the application. An > application may have removed appadmin.py, renamed it, cha

[web2py:/] Re: Validate multiple fields

2009-01-09 Thread tknack
Thank you, Massimo, it works fine But, if I want to put these codes in the right files, which files should I use and which imports should I do ? have you as a project to expand the list of validators or to make the DAL able to handle multi-column constraints ? T. On 8 jan, 18:32, mdipierro