Re: [web2py] Re: Trouble starting web2py

2010-04-08 Thread Alexei Vinidiktov
It didn't work either, sorry. I've just tried to install simplejson not with a Python egg, but with a MS Windows installer, but it didn't help either. I'm getting the same traceback. On Thu, Apr 8, 2010 at 1:20 PM, mdipierro mdipie...@cs.depaul.edu wrote: another possible issue is that this is

[web2py] Re: When and how to use command line option -f FOLDER?

2010-04-08 Thread mdipierro
here is how it works now (its was more convoluted before) web2py must find gluon folder in path. it also expects to find applications/ in os.environ['web2py_path'] or in os.getcwd(). -f path sets os.environ['web2py_path'] = path Massimo On Apr 8, 12:17 am, mdipierro mdipie...@cs.depaul.edu

[web2py] Best practice for logging w/ wsgi?

2010-04-08 Thread Michael Toomim
Now that I'm on apache, I find that the logging library iceberg wrote no longer works: http://groups.google.com/group/web2py/browse_thread/thread/ae37920ce03ba165/6e5d746f6222f70a I suspect this is because of the stdout/stderr problem with wsgi, but I thought that would only affect print

[web2py] Re: Best practice for logging w/ wsgi?

2010-04-08 Thread Iceberg
Nice to hear that still works. :) Actually yesterday I found it was broken in latest web2py windows binary distribution, but that is not my fault, it is only because that binary build is lack of standard module logging/*. Anyway, you can bypass that by a try...except. Just for your information.

[web2py] Beginners Advice

2010-04-08 Thread AndyBuchan
Hello all, I've never worked with a web framework before, other than going through the examples in the web2py manual, and have been tasked with creating an application which handles internal 'complaints' for the furniture manufacturing company I work for, and am looking for some advice on how to

Re: [web2py] Re: Trouble starting web2py

2010-04-08 Thread Johann Spies
I have exactly the same problem on Debian after I upgraded several packages this morning. I suppose Debian installed an uncompatible simplejson. Any solution yet? if not path in sys.path: sys.path.insert(0,path) os.chdir(path) did not help for me either. Regards Johann -- Every

[web2py] building database querys from parts

2010-04-08 Thread selecta
is it possible to build database queries from smaller pieces I had something in mind like filter = [] for key,value in session.filter.iteritems(): if key.startswith('os') and value: os = key.split()[1] filter.append( (db.software.os == os) ) ...

[web2py] Re: Problem with MANY-MANY relationship

2010-04-08 Thread Ishbir
The way that you are doing it in crud, do the same way in DAL. The only difference that create_onaccept function will be called if db.table.insert() is called whether directly or indirectly (via a crud form for e.g.) and the same applies for update and delete. In db.py, it could be something

[web2py] Re: building database querys from parts

2010-04-08 Thread DenesL
Yes q1 = db.software.os == os q2 = db.software.x == y filter1 = q1 q2 # q1 and q2 filter2 = q1 | q2 # q1 or q2 filter3 = ~q1 q2 # not q1 and q2 set1 = db(filter1) and then use select, count, delete, update on sets rows1=set1.select() see web2py book section 6.5 for more details On Apr 8,

[web2py] Re: Problem with MANY-MANY relationship

2010-04-08 Thread DenesL
Except from being less verbose, how is this different from calling somefunc under form.accepts? form=SQLFORM(...) # create, update or delete if form.accepts(...): somefunc(...) On Apr 8, 5:34 am, Ishbir ishbi...@gmail.com wrote: The way that you are doing it in crud, do the same way in DAL.

[web2py] Re: Beginners Advice

2010-04-08 Thread mdipierro
Hi Andy, One important issue here is whether all the applications you are going to build with web2py need to share authentication with non-web2py applications or not. If yes you need federated authentication (for example CAS) and things can get complex. If no, then you can simply your life a lot

[web2py] Re: Trouble starting web2py

2010-04-08 Thread mdipierro
One solution is to upgrade the simplejson that comes with web2py. The problem is that the one we use has been modified to handle dates. On Apr 8, 4:27 am, Johann Spies johann.sp...@gmail.com wrote: Removing Debian's python-simplejson helped me to start web2py again - and broke some other stuff

[web2py] Re: recaptcha in LOAD not working

2010-04-08 Thread selecta
currently i'm quite buisy but i will send you a test app soon my data on Ubuntu 9.10 opera 10.10, google-chrome-beta 5.0.342.9-r43360, firefox 3.5.8 web2py 1.76.3 and whatever jquery version comes with it On Apr 7, 12:24 pm, DenesL denes1...@yahoo.ca wrote: Hi selecta, can you send me a test

[web2py] jquery ajaxFrom

2010-04-08 Thread mdipierro
has anybody successfully merged web2py_ajax with ajaxForm to allow multipart forms (with uploads) in components? I need this but I'd like to avoid re-implementing this if somebody has done it already. Massimo -- You received this message because you are subscribed to the Google Groups

[web2py] when send email including Chinease with tools.Mail, Mojibake appears

2010-04-08 Thread hywang
To view the email correctly, I have to specify charset to utf-8 to avoid Mojibake. And the default charset that tools.Mail uses is charset=us-ascii. For your convenience, you can test it with these two word 测试 -- You received this message because you are subscribed to the Google Groups

[web2py] problems with send mail

2010-04-08 Thread kike
I have a problem with the function Mail, when I used it the send me the following error: Traceback (most recent call last): File /home/kike/web2py/gluon/restricted.py, line 173, in restricted File /home/kike/Desktop/web2py/applications/pruebaCorreo/ controllers/default.py, line 22, in module

[web2py] when send email containing Chinease characters with tools.Mail, Mojibake appears

2010-04-08 Thread hywang
To view the email correctly when receive it, I have to specify charset to utf-8 to avoid Mojibake. And the default charset that tools.Mail uses is charset=us-ascii. For your convenience, you can test it with these two word 测试 -- You received this message because you are subscribed to the

[web2py] Re: problems with send mail

2010-04-08 Thread kike
thank friend, I follow the example in the web2py book, and in that is wrote from gluon.tool import Mail On Apr 8, 9:41 am, hywang why00...@163.com wrote: from gluon.tool import Mail should be from gluon.tools import Mail On 4月8日, 下午9时38分, kike eacarm...@estudiantes.uci.cu wrote: I

[web2py] Re: problems with send mail

2010-04-08 Thread kike
my app work, but don't send the email, it send me a message tell me it work sucesfull, but don't send the email. here is my code form=SQLFORM(db.message,fields=['your_name','your_email','your_message']) if form.accepts(request.vars,session): asunto='cfgroup message from

[web2py] Re: problems with send mail

2010-04-08 Thread kike
the problems is there Mail.send failure:login() takes exactly 3 arguments (2 givens) form=SQLFORM(db.message,fields=['your_name','your_email','your_message']) if form.accepts(request.vars,session): asunto='cfgroup message from '+form.vars.your_name from gluon.tools import

[web2py] Re: Web2Py Database Web Interface

2010-04-08 Thread ciastek
On Apr 7, 8:27 pm, cesmiga cesm...@gmail.com wrote: At one time I thought I saw a project available for a Web2Py Database Web Interface.  Does anyone know if one exists? This one? http://gaesql.appspot.com/ Found in Book, 6.4 (http://web2py.com/book/default/section/6/4) -- You received this

[web2py] Re: shell and cache problem

2010-04-08 Thread sherdim
UPS, sorry it was not related to update there was some bug in the model, so it cannot load -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email

[web2py] auth.settings.actions_disabled.append('register')

2010-04-08 Thread carlo
Following the manual I put this statement in my model file but it seems I can still access the register page and register a new user: did I miss something? carlo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email

[web2py] Re: bug in dal.py _first() and SQLFORM ._tablename

2010-04-08 Thread Thadeus Burgess
Agreed. Lets narrow this down, I will see if I can replicate the issue on a smaller scale. -Thadeus On Wed, Apr 7, 2010 at 11:08 PM, Massimo Di Pierro mdipie...@cs.depaul.edu wrote: I guess my question is why does it not throw an exception in sql.py? It should since

Re: [web2py] Re: When and how to use command line option -f FOLDER?

2010-04-08 Thread Thadeus Burgess
Does that mean it will use other_web2py routes.py and the like? -Thadeus On Thu, Apr 8, 2010 at 1:18 AM, mdipierro mdipie...@cs.depaul.edu wrote: here is how it works now (its was more convoluted before) web2py must find gluon folder in path. it also expects to find applications/ in

[web2py] Re: How to install and run web2py on Jython ?

2010-04-08 Thread JC11
If you want me to test it, I will gladly do so. John C. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to

[web2py] Re: When and how to use command line option -f FOLDER?

2010-04-08 Thread mdipierro
I am not sure about routes because I am not sure whether routes is executed before of after the change of path. Should be tried and eventually we can fix it. On Apr 8, 10:16 am, Thadeus Burgess thade...@thadeusb.com wrote: Does that mean it will use other_web2py routes.py and the like?

[web2py] Re: shell and cache problem

2010-04-08 Thread sherdim
The bug was to assume that typical variables in request.env are always set. But inside shell request.env has only these: Storage {'http_host': '127.0.0.1:8000', 'path_info': '/eplab/None/ None ', 'remote_addr': '127.0.0.1'} so difficult to imagine where is bug if always work inside browser. --

[web2py] Feed validator

2010-04-08 Thread Francisco Costa
Hello, When validating my feed i get this recomendation: Feeds should not be served with the text/html media type: http://beta.feedvalidator.org/docs/warning/UnexpectedContentType.html How can I change the MIME type for application/rss+xml ? -- You received this message because you are

Re: [web2py] Re: When and how to use command line option -f FOLDER?

2010-04-08 Thread Thadeus Burgess
Iceberg, I am confused as to why you have two instances of web2py running the same app code? Unless they can use separate routes? -Thadeus On Thu, Apr 8, 2010 at 10:22 AM, mdipierro mdipie...@cs.depaul.edu wrote: I am not sure about routes because I am not sure whether routes is executed

Re: [web2py] Feed validator

2010-04-08 Thread Thadeus Burgess
response.headers['Content-Type'] = 'applications/rss+xml' -Thadeus On Thu, Apr 8, 2010 at 10:31 AM, Francisco Costa m...@franciscocosta.com wrote: Hello, When validating my feed i get this recomendation: Feeds should not be served with the text/html media type:

Re: [web2py] Re: Problem with MANY-MANY relationship

2010-04-08 Thread Thadeus Burgess
I have proposed a signal/slot system for the new DAL. Simply, The DAL provides an interface to register functions for common operations, such as select/insert/update/delete. You will simply db.register('pre_delete', myFunc) db.register('post_delete', myFunc) The only difference is when myFunc

[web2py] Re: Feed validator

2010-04-08 Thread mdipierro
This should be done automatically if you call you action with .rss On Apr 8, 10:45 am, Thadeus Burgess thade...@thadeusb.com wrote: response.headers['Content-Type'] = 'applications/rss+xml' -Thadeus On Thu, Apr 8, 2010 at 10:31 AM, Francisco Costa m...@franciscocosta.com wrote: Hello,

[web2py] Re: Problem with MANY-MANY relationship

2010-04-08 Thread mdipierro
On Apr 8, 10:50 am, Thadeus Burgess thade...@thadeusb.com wrote: I have proposed a signal/slot system for the new DAL. when? I may have missed or forgotten about this. I would be in favor of this but I would like to see a complete naming scheme and understand how do you handle the case when two

Re: [web2py] Re: How to install and run web2py on Jython ?

2010-04-08 Thread Jonathan Lundell
On Apr 7, 2010, at 9:55 AM, JC11 wrote: I am getting the dreaded error: RuntimeError: maximum recursion depth exceeded I am using web2py vsn. 1.76.5, jython version 2.5.1 on Windows XP. I have altered the web2py 'welcome' application defaault controller to: return 'Hello World'

[web2py] Re: Feed validator

2010-04-08 Thread Francisco Costa
Thank you very much worked perfectly with: response.headers['Content-Type'] = 'application/ rss+xml' there was a small typo in application On Apr 8, 4:45 pm, Thadeus Burgess thade...@thadeusb.com wrote: response.headers['Content-Type'] = 'applications/rss+xml' -Thadeus On Thu, Apr 8, 2010

[web2py] Re: Feed validator

2010-04-08 Thread Francisco Costa
I've notice that, but I want to control the content of the feed. Thanks for your answer On Apr 8, 4:56 pm, mdipierro mdipie...@cs.depaul.edu wrote: This should be done automatically if you call you action with .rss On Apr 8, 10:45 am, Thadeus Burgess thade...@thadeusb.com wrote:

[web2py] web2py URLs

2010-04-08 Thread Jonathan Lundell
(Context: I've been working on URL parsing.) One of the difficulties that parsing web2py URLs presents is that the boundary between /a/c/f and args isn't explicit, along with the fact that pieces of /a/c/f can be implied (in particular when routes.py is being used). RFC2396 (1998) introduced

[web2py] Re: web2py URLs

2010-04-08 Thread mdipierro
+1 On Apr 8, 11:25 am, Jonathan Lundell jlund...@pobox.com wrote: (Context: I've been working on URL parsing.) One of the difficulties that parsing web2py URLs presents is that the boundary between /a/c/f and args isn't explicit, along with the fact that pieces of /a/c/f can be implied (in

Re: [web2py] Re: Feed validator

2010-04-08 Thread Thadeus Burgess
I have been using a decorator lately is called. @only('json') @only('xml') @only('rss') Basically, the decorator just sets the request.extension, and response.headers, regardless of how the function was called. -Thadeus On Thu, Apr 8, 2010 at 11:15 AM, Francisco Costa

Re: [web2py] Re: web2py URLs

2010-04-08 Thread Thadeus Burgess
How will we be able to configure to use one or the other? Will it be able to do Both at the same time (for routes_in of course). I ask since certain web2py sites are scanned in google, you don't want the old links to dis-appear. -Thadeus On Thu, Apr 8, 2010 at 11:30 AM, mdipierro

Re: [web2py] Re: Problem with MANY-MANY relationship

2010-04-08 Thread Thadeus Burgess
Ive sent emails on the list twice, and one email to you personally about this. I have not implemented it since it never received any feedback. There will be a 'pre' and 'post' of 'select', 'insert', 'update', 'delete', separated by an underscore. The dal will maintain a list of functions for

Re: [web2py] Re: How to install and run web2py on Jython ?

2010-04-08 Thread John Cobo
Jonathan, Your new template.py solves the problem ! Super. Thanks a lot. John C. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to

Re: [web2py] Re: web2py URLs

2010-04-08 Thread Jonathan Lundell
On Apr 8, 2010, at 9:37 AM, Thadeus Burgess wrote: How will we be able to configure to use one or the other? I'm thinking an alternative variable in routes.py. Also, there would be (I think) a provision for application-specific routes.py files, so once the application is resolved at the top

[web2py] Re: jquery ajaxFrom

2010-04-08 Thread Yarko Tymciurak
Let _us_ know when you have this... Would be a useful slice to have in general. On Apr 8, 8:13 am, mdipierro mdipie...@cs.depaul.edu wrote: has anybody successfully merged web2py_ajax with ajaxForm to allow multipart forms (with uploads) in components? I need this but I'd like to avoid

Re: [web2py] Re: How to install and run web2py on Jython ?

2010-04-08 Thread Jonathan Lundell
On Apr 8, 2010, at 9:53 AM, John Cobo wrote: Jonathan, Your new template.py solves the problem ! Super. Thanks a lot. John C. Thanks for testing it. Massimo, if you decide to incorporate the patch, I'd like to add some comments to it. Even though I wrote the new pattern a few months

[web2py] Re: auth.settings.actions_disabled.append('register')

2010-04-08 Thread Yarko Tymciurak
I've just tried this in both trunk, and 1.76.5, and in each I get a 404 NOT FOUND when I hit register... Perhaps say more about what you are doing that you think this does not work... On Apr 8, 10:05 am, carlo syseng...@gmail.com wrote: Following the manual I put this statement in my model

[web2py] Postgresql connection from Jython not working for me

2010-04-08 Thread JC11
The next Jython challenge ! The line: db = DAL('postgres://stubo:st...@10.220.17.77/stubo_remote', pool_size=10) works fine when running in python, but fails from Jython (see below). From Jython I can run: 'from com.ziclix.python.sql import zxJDBC', so I think that is installed OK

Re: [web2py] Re: building database querys from parts

2010-04-08 Thread Thadeus Burgess
http://thadeusb.com/weblog/view/web2py_dynamic_queries -Thadeus On Thu, Apr 8, 2010 at 5:35 AM, DenesL denes1...@yahoo.ca wrote: Yes q1 = db.software.os == os q2 = db.software.x == y filter1 = q1 q2 # q1 and q2 filter2 = q1 | q2 # q1 or q2 filter3 = ~q1 q2 # not q1 and q2 set1 =

Re: [web2py] Re: web2py URLs

2010-04-08 Thread Thadeus Burgess
I just want it to be able to routes_in on both with ; and without ;. This is because my blog is indexed on google, and I want my old links to still work If I moved over to the ; method. -Thadeus On Thu, Apr 8, 2010 at 11:56 AM, Jonathan Lundell jlund...@pobox.com wrote: On Apr 8, 2010, at

[web2py] Re: How to install and run web2py on Jython ?

2010-04-08 Thread mdipierro
I will look at it tonight. If it is backward compatible I will be happy to include it. On Apr 8, 12:20 pm, Jonathan Lundell jlund...@pobox.com wrote: On Apr 8, 2010, at 9:53 AM, John Cobo wrote: Jonathan, Your new template.py solves the problem !  Super.  Thanks a lot. John C. Thanks

[web2py] Re: Postgresql connection from Jython not working for me

2010-04-08 Thread mdipierro
This was never tested and if you help we can get it to work today. In sql.py try replace line params = ('jdbc:postgresql://%s:%s/%s' % (host, port, db), user,passwd) with params = ('jdbc:postgresql://%s:%s/%s' % (host, port, db),

[web2py] Re: web2py URLs

2010-04-08 Thread mdipierro
I think if ; is present it be used by default to delimit the args since there cannot be confusion there /a/c/f.ext;a0/a1/a2 /a/c/f/a0/a1/a2.ext should be parsed in the same way. routes_in and routes_out should not be affected since they only rewrite the URL before web2py interprets it. On Apr

[web2py] Re: jquery ajaxFrom

2010-04-08 Thread mdipierro
when done I will probably make this the default and package jquery.form.js with scaffodling app. I am trying to do this today but no promise. Massimo On Apr 8, 12:06 pm, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: Let _us_ know when you have this... Would be a useful slice to have in

[web2py] Search Function

2010-04-08 Thread Francisco Costa
Hello, i was trying to implement a search function so I've tried this wiki example (http://web2py.com/book/default/section/3/9) I can create pages, but I cannot search for them. Is the search function wrong? Is there others examples of search function? -- You received this message because you

[web2py] Re: Web2Py Database Web Interface

2010-04-08 Thread cesmiga
Ciastek, I was thinking of something more like a SQuirreL SQL client type idea for Web2Py. http://squirrel-sql.sourceforge.net/ Since Web2Py does everything from the web interface, it would be really great to have an implementation of something like this in the Admin interface. Thanks,

[web2py] SQLFORM update with a custom html form

2010-04-08 Thread JmiXIII
Hello, I'm using a SQLFORM with a html custom (as described in book/7.2 = SQLFORM in HTML) My fonction inside my controller is : def ncmodif(): ### Formulaire de saisie des NC de production rec=db(db.NC.id==269).select()[0] form=SQLFORM(db.NC,record=rec) if form.accepts(request.vars,

Re: [web2py] Re: How to handle subqueries?

2010-04-08 Thread Johann Spies
def csv():    import StringIO    s=StringIO.StringIO() db(db.mytable.id.belongs(session.records)).select().export_to_csv_field(s)    return s.getvalue() Thanks for your help. I could get the tickboxes working but not the csv-download. Only the headers were downloaded. In the end I am not

[web2py] Re: jquery ajaxFrom

2010-04-08 Thread mdipierro
turns out it cannot be done. jquery.form only does what web2py does already. It has the ability to do file uploads but not via multipart form submission (xmlHttpRequest does not support it). It can only do uploads not as part of a form and required a dedicated action to receive the upload. On Apr

[web2py] new feature for Firebird and Oracle users

2010-04-08 Thread DenesL
Firebird and Oracle do not have auto-increment numeric fields, so generators or sequences with a trigger are used to assign the value of the field when they are needed. Until now the names of generators, sequences, and triggers were static, which was a problem when trying to access legacy

Re: [web2py] Re: Postgresql connection from Jython not working for me

2010-04-08 Thread John Cobo
Hello, I have made the suggested change to sql.py. The result is below. Traceback (most recent call last): File C:\web2py1_76_5\gluon\restricted.py, line 173, in restricted exec ccode in environment File C:/web2py1_76_5/applications/stubo/models/db.py

Re: [web2py] new feature for Firebird and Oracle users

2010-04-08 Thread Thadeus Burgess
PostgreSQL uses sequences too, any chance of getting support for it as well? -Thadeus On Thu, Apr 8, 2010 at 3:41 PM, DenesL denes1...@yahoo.ca wrote: Firebird and Oracle do not have auto-increment numeric fields, so generators or sequences with a trigger are used to assign the value of

[web2py] Re: auth.settings.actions_disabled.append('register')

2010-04-08 Thread carlo
thank you Yarko for replying. Well it is really a strange behaviour, I am trying to isolate the problem. For now I have the feeling that my problem ha something to do with routes.py, this is my routing rule: routes_in = (('/$f', '/init/default/$f'),) routes_out = (('/init/default/$f', '/$f'),)

[web2py] Re: Postgresql connection from Jython not working for me

2010-04-08 Thread mdipierro
does this help? http://stackoverflow.com/questions/468763/how-to-connect-to-database-from-jython On Apr 8, 3:54 pm, John Cobo john.c...@gmail.com wrote: Hello,  I have made the suggested change to sql.py.  The result is below. Traceback (most recent call last):   File

Re: [web2py] Re: auth.settings.actions_disabled.append('register')

2010-04-08 Thread Thadeus Burgess
Where are you including auth.settings.actions_disabled.append('register') ? -Thadeus On Thu, Apr 8, 2010 at 4:43 PM, carlo syseng...@gmail.com wrote: thank you Yarko for replying. Well it is really a strange behaviour, I am trying to isolate the problem. For now I have the feeling that

[web2py] Re: auth.settings.actions_disabled.append('register')

2010-04-08 Thread mdipierro
Do you have your own register action? If you do the append statement would be ignored. On Apr 8, 4:43 pm, carlo syseng...@gmail.com wrote: thank you Yarko for replying. Well it is really a strange behaviour, I am trying to isolate the problem. For now I have the feeling that my problem ha

[web2py] Re: new feature for Firebird and Oracle users

2010-04-08 Thread mdipierro
This is ONLY for the autoincrement id. PostgreSQL does not need them in this case On Apr 8, 4:11 pm, Thadeus Burgess thade...@thadeusb.com wrote: PostgreSQL uses sequences too, any chance of getting support for it as well? -Thadeus On Thu, Apr 8, 2010 at 3:41 PM, DenesL denes1...@yahoo.ca

[web2py] Re: auth.settings.actions_disabled.append('register')

2010-04-08 Thread Yarko Tymciurak
On Apr 8, 4:43 pm, carlo syseng...@gmail.com wrote: thank you Yarko for replying. Well it is really a strange behaviour, I am trying to isolate the problem. Try with just a fresh app first - just a clone of welcome with auth enabled, auth.requires_login() set for default/index, and not more.

[web2py] Self join query missing AS

2010-04-08 Thread Paul Wray
Hello I'm attempting a simple self join and having trouble with the aliases. The slightly simplified query is: k1 = db.qkeyword.with_alias('k1') k1 = db.qkeyword.with_alias('k2') print db( (k1.keyword == 'this') (k2.keyword == 'that') (k1.question == k2.question)

[web2py] Re: Self join query missing AS

2010-04-08 Thread mdipierro
Inner joins in DAL do not support AS. Can you show an SQL example of how you would use it? Massimo On Apr 8, 10:08 pm, Paul Wray paul.w...@det.nsw.edu.au wrote: Hello I'm attempting a simple self join and having trouble with the aliases. The slightly simplified query is: k1 =