[web2py:15973] Re: any example of a questionnaire ?

2009-02-07 Thread Stef Mientki
thanks, I'll take a look at those. cheers, Stef mdipierro wrote: > http://web2py.appspot.com/survey/survey/take/5ffc03a6-d848-41c2-90d5-7dd71e89df8d/46476 > > http://web2py.appspot.com/survey/survey > > to create your own. Reporting tools need to be improved. I found they > have some problems. >

[web2py:15974] tagging

2009-02-07 Thread mickgardner
Hi, i've been trying all day to work out how to do this and cannot get it working completely the way I want it to. I'm building a blog and want to implement tagging. The tagging would work as such: There would be a text, tagging field that would accept multiple comma or space separated 'tags'.

[web2py:15975] Re: web2py 1.56 is OUT!!!

2009-02-07 Thread Phyo Arkar
Cheers massimo. Gr8 release. :) On Fri, Feb 6, 2009 at 6:10 AM, mr.freeze wrote: > > This looks great! I'm glad auth and auth are integrated now (among the > other many goodies in this release). > The new site is looking good. Much more modern looking > Minor typo here: http://mdp.cti.depaul.e

[web2py:15976] Re: record breaking

2009-02-07 Thread Phyo Arkar
Grats all! Very impressive! On Fri, Feb 6, 2009 at 3:35 PM, Markus Gritsch wrote: > > On Fri, Feb 6, 2009 at 4:17 PM, mdipierro wrote: > > > > 05/Feb/2009 in 24 hrs > > > > 44735 http requests > > 2340 distinct visitors > > 216 downloads from distinct visitors > > Nice. I think the line "Used

[web2py:15977] RFC: DAL transactions

2009-02-07 Thread Robin B
update() and update_record() should accept callables: def txn(record): attrs = {} if record.name == 'bob': attrs['count'] = record.count + 1 elif record.name == 'alice': attrs['count'] = record.count - 1 return attrs #complex transactions (db.posts.id>0).update(txn) # simple tra

[web2py:15978] Re: tagging

2009-02-07 Thread mdipierro
db.define_table('tag',dbField('name')) db.define_table('taggable,db.Field('description'),db.Field ('tags','text')) db.taggable.tags.requires=IS_IN_DB(db,'tag.id','%(name) s',multiple=True) Optional: def tag_widget(self,value,tags=[]): script=SCRIPT (""" function web2py_tag(self

[web2py:15980] Re: Pyjamas and web2py

2009-02-07 Thread lkcl
http://groups.google.com/group/pyjamas-dev/browse_thread/thread/f051f537ca9ee734# oky, so i posted a test procedure there, which gets you to the "first stage". it should turn up any day soon on web2py cos i cross- posted but hey i'll link it here as well. it is worthwhile emphasising that

[web2py:15979] Re: pyjamas and web2py

2009-02-07 Thread lkcl
On Feb 6, 10:22 pm, dhmorgan wrote: > web2py creator Massimo Di Pierro just posted a request for help on > drafting a brief tutorial on using Pyjamas with web2py (web2py > disscussion group > --http://groups.google.com/group/web2py/browse_thread/thread/9bb107c2fb... > ) GREAT! (hi massimo,

[web2py:15981] Re: RFC: DAL transactions

2009-02-07 Thread mdipierro
I assume this is in your latest patch. I will try apply it during the week-end. On Feb 7, 8:39 am, Robin B wrote: > update() and update_record() should accept callables: > > def txn(record): >   attrs = {} >   if record.name == 'bob': >     attrs['count'] = record.count + 1 >   elif record.name

[web2py:15982] Re: pyjamas and web2py

2009-02-07 Thread mdipierro
Thanks. Will do so. On Feb 7, 6:44 am, lkcl wrote: > On Feb 6, 10:22 pm, dhmorgan wrote: > > > web2py creator Massimo Di Pierro just posted  a request for help on > > drafting a brief tutorial on using Pyjamas with web2py (web2py > > disscussion group > > --http://groups.google.com/group/web2p

[web2py:15983] Re: RFC: DAL transactions

2009-02-07 Thread Robin B
It is not in any patch. It is RFC to decide if it is a good idea and how it is supposed to work... this could be a shorter syntax, because you do not construct the attrs, you just mutate the record directly: def txn(rec): if rec.name == 'bob': rec.count += 1 elif rec.name == 'alice':

[web2py:15984] joins between database drivers

2009-02-07 Thread Robin B
I am implementing the joins on GAE, and I realized that you should be able to perform joins between DAL databases whether it is the same driver or not. fsdb = FSDB(...,name='fsdb') gaedb = GAEDB(...,name='gaedb') rows = ((gaedb.users.name=='bob')& (gaedb.users.id==fsdb.users.id)).select(fsdb.use

[web2py:15985] Re: joins between database drivers

2009-02-07 Thread Robin B
And what about this: dal = DAL() dal.define_database('fsdb','filesystem') dal.define_database('memdb','memcache') dal.define_database('ramdb','dict') cache.mem = CacheClient(db=dal.memdb) cache.ram = CacheClient(db=dal.ramdb) cache.disk = CacheClient(db=dal.fsdb) @cache(request.env.path_info,ti

[web2py:15986] Re: joins between database drivers

2009-02-07 Thread Robin B
Namespaces can also be generalized by unifying under the DAL: dal = DAL() dal.define_namespace('app',request.application) dal.define_namespace('shared','_shared') dal.shared.define_database('gaedb','google') dal.app.define_database('gaedb','google') dal.shared.gaedb.define_table('posts',dal.Field

[web2py:15987] Re: joins between database drivers

2009-02-07 Thread Robin B
If each define_* returned its 'self', you can build a 'fluent interface': http://en.wikipedia.org/wiki/Fluent_interface dal = DAL() posts = dal.define_namespace('shared', '_shared').define_database ('gaedb', 'google').define_table('posts') posts._tablename -> '_shared__posts' Robin On Feb 7,

[web2py:15988] xmlrpc and json decorators

2009-02-07 Thread Tito Garrido
Hi Folks, t3 have some useful decorators like @xmrpc and @json do you know if we can use it without t3? Best Regards, Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ --~--~-~--~~~---~--~~ You received this

[web2py:15989] Re: RFC: DAL transactions

2009-02-07 Thread mdipierro
I am for the complex transaction. Not so convinced about the simple transaction. On Feb 7, 9:30 am, Robin B wrote: > It is not in any patch. It is RFC to decide if it is a good idea and > how it is supposed to work... > > this could be a shorter syntax, because you do not construct the > attrs,

[web2py:15990] Re: joins between database drivers

2009-02-07 Thread mdipierro
I think oue shoudl just do db=DB(uri) where usi can be 'slite://...','mysql://... 'fsdb', 'gaedb', etc. On Feb 7, 11:25 am, Robin B wrote: > I am implementing the joins on GAE, and I realized that you should be > able to perform joins between DAL databases whether it is the same > driver or no

[web2py:15991] Re: joins between database drivers

2009-02-07 Thread mdipierro
I am missing the point. Caching in DB? On Feb 7, 11:40 am, Robin B wrote: > And what about this: > > dal = DAL() > dal.define_database('fsdb','filesystem') > dal.define_database('memdb','memcache') > dal.define_database('ramdb','dict') > > cache.mem = CacheClient(db=dal.memdb) > cache.ram = Cach

[web2py:15992] Re: joins between database drivers

2009-02-07 Thread mdipierro
This is an un-necessary complication. I think all we need (eventually) is db=DB('postgresq://...',pools=20,prefix='xxx') so that db.define_table('table',) translates into 'CREATE TABLE xxx_table'. This is not so easy to implement. On Feb 7, 12:03 pm, Robin B wrote: > Namespaces can als

[web2py:15993] Re: Modules and plugins

2009-02-07 Thread sebastian
Hi Massimo, I've just did few experiments and it works without reloading.. has web2py changed in some way regarding the importing of modules ? when is it necessary to use "reload" ? thanks "welcome/modules/mymodule.py" from gluon.html import * from gluon.http import * from gluon.validators imp

[web2py:15994] Re: xmlrpc and json decorators

2009-02-07 Thread mdipierro
Yes. Just make a model that contains from gluon.storage import Storage settings=Storage() settings.rss_procedures=[] settings.exposed_procedures=[] settings.xmlrpc_procedures=[] settings.json_procedures=[] def rss(f): settings.rss_procedures.append(f.__name__) return f def expose(f):

[web2py:15995] Deploy web2py on multiple server..and admin it :)

2009-02-07 Thread cromagn
newbie on web2py, so sorry... i need to deploy and manage the same application on a distribuited architecture based on 4 server with a load balancer on the head. how i can deploy and update the application? tks c --~--~-~--~~~---~--~~ You received this message beca

[web2py:15996] Re: Deploy web2py on multiple server..and admin it :)

2009-02-07 Thread mdipierro
the best way is just to install the app in a shared folder that supports file locking. Else you need to store session in database. You can find details in the free manual chapters http://mdp.cti.depaul.edu/examples/static/web2py_manual_cut.pdf Massimo On Feb 7, 3:30 pm, cromagn wrote: > newbi

[web2py:15997] Re: xmlrpc and json decorators

2009-02-07 Thread Tito Garrido
Thank you Massimo! It works even without t2? On Sat, Feb 7, 2009 at 7:59 PM, mdipierro wrote: > > Yes. Just make a model that contains > > from gluon.storage import Storage > settings=Storage() > settings.rss_procedures=[] > settings.exposed_procedures=[] > settings.xmlrpc_procedures=[] > setti

[web2py:15998] Re: xmlrpc and json decorators

2009-02-07 Thread mdipierro
Yes. No need of T2 or T3. On Feb 7, 5:08 pm, Tito Garrido wrote: > Thank you Massimo! > > It works even without t2? > > > > On Sat, Feb 7, 2009 at 7:59 PM, mdipierro wrote: > > > Yes. Just make a model that contains > > > from gluon.storage import Storage > > settings=Storage() > > settings.rss

[web2py:15999] new puppy example please?

2009-02-07 Thread murray3
Could any of you guy's run through the T2 "puppy" example using the new gluon.tools syntax. I am missing something (porting my T2 based code) and I'm sure this would get me restarted. thanks chris --~--~-~--~~~---~--~~ You received this message because you are subs

[web2py:16000] Re: tagging

2009-02-07 Thread mickgardner
Thanks so much for the response. Could you explain what you're doing there a little ? I've had a go at using that, for example the many to one table but unsure how / where the widget function works or is implemented? thanks Michael On Feb 8, 2:09 am, mdipierro wrote: > db.define_table('tag',dbF

[web2py:16001] Re: new puppy example please?

2009-02-07 Thread mdipierro
asap. We need to rewrite T2 to use tools first. if anybody can help please raise your hand. Massimo On Feb 7, 6:58 pm, murray3 wrote: > Could any of you guy's run through the T2 "puppy" example using the > new gluon.tools syntax. > I am missing something (porting my T2 based code) and I'm sure

[web2py:16002] Re: tagging

2009-02-07 Thread mdipierro
IS_IN_DB(,multiple=True) sorry still undocumented is a portable (on GAE) way to do many to many. it does not use an intermediate table. It stores all keys in the field like in |3|5|7| etc etc. It is used for example to select tutorials in the Pycon registration page (using the jquery multis

[web2py:16003] web2py documentation site: http://www.99babysteps.com/how/base/index

2009-02-07 Thread Peter Etchells
http://www.99babysteps.com/how/base/index This is my first attempt at a web2py app, & contains some web2py documentation - a work in progress. Currently not taking registrations or allowing comments. Any constructive comments welcome. regards, Peter Etchells --~--~-~--~~~

[web2py:16004] Re: web2py documentation site: http://www.99babysteps.com/how/base/index

2009-02-07 Thread mdipierro
love superlazy! On Feb 7, 7:31 pm, Peter Etchells wrote: > http://www.99babysteps.com/how/base/index > This is my first attempt at a web2py app, & contains some web2py > documentation - a work in progress. Currently not taking registrations > or allowing comments. Any constructive comments welco

[web2py:16005] Re: Pyjamas and web2py

2009-02-07 Thread mdipierro
Almost there this http://groups.google.com/group/web2py/web/web2py.app.pyjamas.tar works but pyjamas does not understand the json response from the server. I am not sure what I am doing wrong. The json response if built in models/pyjamas.py Massimo On Feb 7, 7:08 am, lkcl wrote: > http://

[web2py:16006] Re: tagging

2009-02-07 Thread mickgardner
Sorry but still not quite at the point of understanding, sorry! Where does def tag_widget(self,value,tags=[]):(etc) go? What file does it go into? models.py? (this is where i put it but it really hasn't helped things...) On Feb 8, 12:35 pm, mdipierro wrote: > IS_IN_DB(,multiple=True) > > s

[web2py:16007] Re: web2py documentation site: http://www.99babysteps.com/how/base/index

2009-02-07 Thread mickgardner
wow, superlazy is supercool... On Feb 8, 12:37 pm, mdipierro wrote: > love superlazy! > > On Feb 7, 7:31 pm, Peter Etchells wrote: > > >http://www.99babysteps.com/how/base/index > > This is my first attempt at a web2py app, & contains some web2py > > documentation - a work in progress. Currentl

[web2py:16008] AttributeError: 'Auth' object has no attribute 'on_failed_authorization'

2009-02-07 Thread Tito Garrido
Hi, I'm tring to test web2 1.56 but when I try to use on_failed_authotization atribute I get: AttributeError: 'Auth' object has no attribute 'on_failed_authorization' MODEL: from gluon.tools import Mail, Auth, Crud # new in web2py 1.56 mail=Mail() # mailer m

[web2py:16009] Re: tagging

2009-02-07 Thread mdipierro
Sorry. You can put it in a module import is and use or just put it in the model that needs it. the simple solution is put everything in db.py. When it works you clean up later. On Feb 7, 8:45 pm, mickgardner wrote: > Sorry but still not quite at the point of understanding, sorry! > > Where do

[web2py:16010] Re: AttributeError: 'Auth' object has no attribute 'on_failed_authorization'

2009-02-07 Thread mdipierro
It is a bug. For now do auth.settings.lock_keys = False then do auth.settings.on_failed_authorization=URL(r=request,f='error') On Feb 7, 9:21 pm, Tito Garrido wrote: > Hi, > > I'm tring to test web2 1.56 but when I try to use on_failed_authotization > atribute I get: > > AttributeError: 'Aut