[web2py:16136] Re: 1.56.1 on GAE error 'SQLQuery' object has no attribute 'left'

2009-02-10 Thread Robin B
You cannot paginate on GAE (efficiently), offset/count is O(n) and google will not let you offset beyond 2000, so you must add a unique sequential field and use next=unique_seq_value to reference the start of the next page. See:

[web2py:16137] Re: gluon.utils

2009-02-10 Thread Robin B
Looks like google added urllib,urlib2, and httplib in SDK 1.1.9: http://googleappengine.blogspot.com/2009/02/sdk-version-119-released.html So wrapping urlopen might not be necessary, yet. Robin On Jan 30, 1:31 pm, mdipierro mdipie...@cs.depaul.edu wrote: t2 has a urlopen that works

[web2py:16139] Re: error when import

2009-02-10 Thread mdipierro
Try replace in sql.py def is_integer(x): try: long(x) except ValueError: return False return True with def is_integer(x): try: long(x) except ValueError: return False except TypeError: return False return True Massimo On Feb

[web2py:16140] why can I not import ldap lib?

2009-02-10 Thread Tincho
hi, i want to use ldap-python lib to authenticate against a server. I want to encapsulate this functionality in a module. I made a class called LDAPService that uses ldap lib and i put on web2py/applications/MyApp/modules/myModule.py. The problem is that when i want to import this module from a

[web2py:16141] Re: SyntaxError: user is tampering with form

2009-02-10 Thread mdipierro
Are you calling this create form with ?id=## This confuses web2py. pass the id as args[0] and replace id=request.vars.id with id=request.args[0] Let me know if this is the problem. On Feb 10, 8:24 am, Maurice Ling mauricel...@gmail.com wrote: To add, this problem does not seems to

[web2py:/] Re: why can I not import ldap lib?

2009-02-10 Thread mdipierro
Are you using the binary distribution of web2py? In this case it is using its own python and it does not see the libs installed with your other python. You may need to run from source. Massimo On Feb 10, 8:14 am, Tincho martinr...@gmail.com wrote: hi, i want to use ldap-python lib to

[web2py:16143] Re: SyntaxError: user is tampering with form

2009-02-10 Thread Maurice Ling
I've changed to def show(): # called to show one entry and its linked comments based on # the entry.id # called by TOC in order to provide an entry.id #id=request.vars.id id = request.args[0] ## --- changed line entries=cynotedb(cynotedb.entry.id==id).select() # to

[web2py:16144] Re: SyntaxError: user is tampering with form

2009-02-10 Thread mdipierro
I think that is because (I believe) you are calling this page with http:///show?id=1 instead of http:///show/1 and that was the origin of the problem. When selft-submitting the form in the page web2py thought this was an update form for record id=1, which is not the case. Massimo On

[web2py:16145] Re: form pre-population fails if field is shown in 1.56.2

2009-02-10 Thread DenesL
Sorry to insist but pre-populate to me means to supply default values in form fields. I know that in web2py we would use db.tablename.fieldname.default=value before the form declaration to do that. I believe this is and should be the correct behaviour. I agree that the behaviour seems

[web2py:16146] Re: thank you!

2009-02-10 Thread DenesL
On Feb 8, 8:03 pm, mdipierro mdipie...@cs.depaul.edu wrote: I apologize if I have been slow in keeping up but I am also reviewing 4 large projects for the Department of Energy and one for the National Science Foundation. Not to mention my own research projects, my courses, my students, my

[web2py:16147] Re: form pre-population fails if field is shown in 1.56.2

2009-02-10 Thread mdipierro
I agree there is a mismatch what is said and what is done. Is your opinion that the manual needs to be revised or that the behavior should be changed (form be prepopulated)? Massimo On Feb 10, 10:52 am, DenesL denes1...@yahoo.ca wrote: Sorry to insist but pre-populate to me means to supply

[web2py:16149] experimental profiling

2009-02-10 Thread mdipierro
In gluon/main.py replace the appfactory function with: def appfactory(wsgiapp=wsgibase, logfilename='httpsever.log', profilerfilename='profiler.log', web2py_path=web2py_path): import thread locker=thread.allocate_lock() def

[web2py:16150] Re: form pre-population fails if field is shown in 1.56.2

2009-02-10 Thread DenesL
Fixing the manual is easier but what does form.vars.field=value really do then?. A fixed form.vars.field would have multiple personalities. It would act as db.tablename.fieldname.default if the field is shown in the form and as request.vars.field if it is not returned by the form.

[web2py:16151] Re: form pre-population fails if field is shown in 1.56.2

2009-02-10 Thread mdipierro
I will look into changing its behavior. This can be seen as a bug fix but also as a backward compatibility issue. Anybody opposes? Massimo On Feb 10, 1:20 pm, DenesL denes1...@yahoo.ca wrote: Fixing the manual is easier but what does form.vars.field=value really do then?. A fixed

[web2py:16152] Re: error when import

2009-02-10 Thread Kacper Krupa
AFAIK you can replace double exception to: except (ValueError, TypeError): ... On 10 Lut, 15:29, mdipierro mdipie...@cs.depaul.edu wrote: Try replace in sql.py def is_integer(x):     try:         long(x)     except ValueError:         return False     return True with def

[web2py:16153] Re: Multiple validation problem (bug?)

2009-02-10 Thread ionel
Thank you very much I didn't know that I can use : request.vars.get('title','').upper() ionel On Feb 9, 9:03 pm, mdipierro mdipie...@cs.depaul.edu wrote: Hi ionel, it is not a bug. The validatior should be db.book.author.requires=[IS_UPPER(), IS_NOT_IN_DB(db

[web2py:16154] how to add text input with highlighting for python ?

2009-02-10 Thread Jurgis Pralgauskis
Hello, I figured out how to highlight the code, which I already have but how to have input box with html highlighting for python? Thanks in advance -- Jurgis Pralgauskis Don't worry, be happy and make things better ;) http://sagemath.visiems.lt

[web2py:16155] Re: how to add text input with highlighting for python ?

2009-02-10 Thread mdipierro
There are two ways to highlight code. 1) server side {{=CODE(print T(hello world),language=web2py) You can use it in readonly forms db.mytable.myfield.represent=lambda value: CODE(value,language=html) assuming myfield contains html. 2) client side (you need this to highlight code in input

[web2py:16156] Security for the framwork?

2009-02-10 Thread waTR
Hi all, Long time reader first time poster. I have just watched this talk by OWASP ISWG: http://video.google.com/videoplay?docid=8393196340486939495en Has anyone at web2py contacted them to get them to do a security review? I think if this is done, web2py could get some really powerful media

[web2py:16157] Re: SyntaxError: user is tampering with form

2009-02-10 Thread Maurice Ling
Yes, if I change http://127.0.0.1:8000/cynote/cynote/show?id=1 to http://127.0.0.1:8000/cynote/cynote/show/1 It works. What do I have to change in the codes? Thanks ML http:///show?id=1 instead of http:///show/1 and that was the origin of the problem. When selft-submitting the

[web2py:16159] Re: Jython and JDBC

2009-02-10 Thread Phyo Arkar
Dear Massimo; Thats gr8! I will be testing and will let you know the results tomorrow (right now 7:30 am , have not sleep yet) :) . Thanks a lot for gr8 work. On Mon, Feb 9, 2009 at 4:04 AM, mdipierro mdipie...@cs.depaul.edu wrote: I have a new experimental version of sql.py in trunk

[web2py:16160] Re: Abusing model files for common functionality

2009-02-10 Thread Iceberg
Thanks for all the meaningful discussion here. I did learn something. When talking about generating the menu, perhaps you will like my trick here. http://groups.google.com/group/web2py/browse_thread/thread/4988b16cb2787b57 You might already notice that, if your application have only one

[web2py:16161] Re: Security for the framwork?

2009-02-10 Thread mdipierro
Excellent suggestion I will email them tomorrow. Massimo On Feb 10, 12:12 pm, waTR roman.proje...@gmail.com wrote: Hi all, Long time reader first time poster. I have just watched this talk by OWASP ISWG:http://video.google.com/videoplay?docid=8393196340486939495en Has anyone at web2py

[web2py:16162] web2py in science

2009-02-10 Thread mdipierro
http://treethinkers.blogspot.com/2009/02/phylografter-beta.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web Framework group. To post to this group, send email to web2py@googlegroups.com To unsubscribe

[web2py:16163] web2py has a profiler

2009-02-10 Thread mdipierro
New in trunk (highly experimental) web2py.py -F profiler.log will log all requests with profile details in profiler.log. This makes thing slower. I am not sure this is the proper way of doing it. Any feed back will be appreciated. It should be trivial to build an app (or an admin page) to

[web2py:16164] Re: web2py has a profiler

2009-02-10 Thread Wes James
Massimo, I just downloaded trunk and tried starting as normal and get: WARNING:root:unable to import dbhash default applications appear to be installed already web2py Enterprise Web Framework Created by Massimo Di Pierro, Copyright 2007-2009 Version 1.56.2 (2009-02-10 23:57:30) Database drivers

[web2py:16165] Re: SyntaxError: user is tampering with form

2009-02-10 Thread Fran
On Feb 11, 12:18 am, Maurice Ling mauricel...@gmail.com wrote: td{{=A(entry.title,_href=URL(r=request,f='show/%s'%entry.id))}}/td Whilst this works, it would be more correct to make this: URL(r=request,f='show',args=[entry.id]) F --~--~-~--~~~---~--~~ You