[web2py] Re: unicode support for args

2011-10-26 Thread Pawel Jasinski
On Oct 26, 5:25 am, Jonathan Lundell jlund...@pobox.com wrote: On Oct 25, 2011, at 2:06 PM, Pawel Jasinski wrote: hi, thanks! That solved my ~ problem. Unfortunately for my öäü (chars above 128 and below 255 in latin-1) I still need to overcome 2 challenges: 1. re.U must be supplied

[web2py] unicode support for args

2011-10-25 Thread Pawel Jasinski
hi all, I have discovered that args in url are restricted to ascii. In addition tilde (~) is also not considered valid in arguments. I am using rest mapping @request.restful() where as far as I can tell there is no technical reason to restrict args (RFC 3986). I also found similar limitation for

[web2py] Re: unicode support for args

2011-10-25 Thread Pawel Jasinski
hi, of directory traversal attacks (~ specifically). how exactly? I am talking about arguments and only arguments. I agree that ~ in case of application/controller/method makes no sense In case of static agree 100%, but that is different control path. The arguments are just that, arguments. If

[web2py] Re: unicode support for args

2011-10-25 Thread Pawel Jasinski
. Is it acceptable? 2. at some point before match call args have to be subjected to decode('utf-8') to become unicode Any suggestions? --Pawel On Oct 25, 9:18 pm, Jonathan Lundell jlund...@pobox.com wrote: On Oct 25, 2011, at 11:57 AM, Pawel Jasinski pawel.jasin...@gmail.com wrote: hi, of directory

[web2py] vars vs. kwargs

2011-06-09 Thread Pawel Jasinski
hi, it is cosmetic, but can be a pain for someone no so familiar with python. In examples for restful api: def index(): def GET(*args,**vars): patterns = [ /persons[person], /{person.name.startswith}, /{person.name}/:field,

Re: [web2py] Re: vars vs. kwargs

2011-06-09 Thread Pawel Jasinski
, it is cosmetic. I believe it is a bad idea to give variable a name which matches name of the build-in function cheers, pawel On Thu, Jun 9, 2011 at 3:26 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I do not understand. :-( On Jun 9, 3:21 am, Pawel Jasinski pawel.jasin...@gmail.com

Re: [web2py] Re: postgress outer join

2011-05-01 Thread Pawel Jasinski
), db.third.on(db.third.r13_first_id==db.first.id), db.fourth.on(db.fourth.r14_second_id==db.second.id), ]) On Apr 28, 2:22 pm, Pawel Jasinski pawel.jasin...@gmail.com wrote: hi, this appears to be an old issue already discussed and marked as solved:http://groups.google.com/group/web2py

[web2py] Re: postgress outer join

2011-04-29 Thread Pawel Jasinski
hi, short update I could use executesql, but is there an easy way to reconnect the result of executesql into the rows returned by db(...).select(...)? As a work around I do the following: 0. modify DAL so select( ) accepts extra parameter to overwrite generated sql 1. develop and test with

Re: [web2py] Re: postgress outer join

2011-04-29 Thread Pawel Jasinski
,db.fourth.ALL, left= [ db.second.on(db.first.id==db.second.r12_first_id), db.third.on(db.third.r13_first_id==db.first.id), db.fourth.on(db.fourth.r14_second_id==db.second.id), ]) On Apr 28, 2:22 pm, Pawel Jasinski pawel.jasin...@gmail.com wrote: hi, this appears to be an old issue already

[web2py] postgress outer join

2011-04-28 Thread Pawel Jasinski
hi, this appears to be an old issue already discussed and marked as solved: http://groups.google.com/group/web2py/browse_thread/thread/d7f5e5820176813/4d990c3c7475c48b http://groups.google.com/group/web2py/browse_thread/thread/f4ef82fd34371863/8e7a741d676cea6e but, I got it again :-( Here is my

[web2py] Re: SQLFORM and read-only references

2011-01-26 Thread Pawel Jasinski
Hi, I just hit the same problem and can reproduce in trivial case in model: db.define_table('foo', Field('x')) db.define_table('bar', Field('label'), Field('ref',db.foo)) in controller: def insertone(): id=db.foo.insert(x=xxx) db.bar.insert(label=label,ref=id) def index():

[web2py] Re: SQLFORM and read-only references

2011-01-26 Thread Pawel Jasinski
=accepted     return dict(form=form) On Jan 26, 10:37 am, Pawel Jasinski pawel.jasin...@gmail.com wrote: Hi, I just hit the same problem and can reproduce in trivial case in model: db.define_table('foo', Field('x')) db.define_table('bar', Field('label'), Field('ref',db.foo

[web2py] Re: SQLFORM and read-only references

2011-01-26 Thread Pawel Jasinski
Hi, Are you sure you want the form readonly? Yes What if you remove readonly? The 'None' changes into drop down with ids or whatever is in the format argument of the field. If you want readonly you do not need accepts Good point, changed. It does not help with the main problem. I also have

[web2py] multiple SQLFORM.factory per page

2010-12-27 Thread Pawel Jasinski
hi, when I try to put multiple forms generated with SQLFORM.factory things act a bit odd. #controller def index(): form1 = SQLFORM.factory(Field('a')) if form1.accepts(request.vars, session) : print form1 accepted form2 = SQLFORM.factory(Field('b')) if