[web2py] Re: How to simulate form submission in doctest

2011-03-12 Thread pbreit
Wow, I'm not sure how or if you are going to be able to run a doctest on a form in a controller. Running it in a web2py shell only returns the form: In [1] : import os In [2] : execfile(os.path.join(request.folder,'controllers/default.py')) In [3] : print do_nothing() {'form': gluon.html.FORM

Re: [web2py] Re: How to simulate form submission in doctest

2011-03-12 Thread David Bain
Hmm, I'll need to look into this some more. On Sat, Mar 12, 2011 at 3:04 AM, pbreit pbreitenb...@gmail.com wrote: Wow, I'm not sure how or if you are going to be able to run a doctest on a form in a controller. Running it in a web2py shell only returns the form: In [1] : import os In [2]

[web2py] dal exception occurs when running on gae

2011-03-12 Thread maki
hi, An app works fine on local machine, but an exception occurs when running on gae, the error is like this: Traceback (most recent call last): File F:\web2py\deploy\web2py\gluon\restricted.py, line 188, in restricted exec ccode in environment File

[web2py] Re: web2py in the Pypi

2011-03-12 Thread Stefaan Himpe
contatogilson...@gmail.com wrote: The web2py in the Pypi is old. When go to update? Need to help? _ I just noticed there's a buildout recipe for web2py: http://pypi.python.org/pypi/web2pyrecipe/1.0

[web2py] Re: dal exception occurs when running on gae

2011-03-12 Thread Massimo Di Pierro
It is not a web2py bug. web2py it is just telling you that GAE cannot do this, because there are no expressions on GAE. Instead of this: db(db.user.id == session.user_id).update(post_num = db.user.post_num + 1) do db(db.user.id == session.user_id).update(post_num = auth.user.post_num + 1)

[web2py] Re: What to tell designers when they create a mockup for my web2py site

2011-03-12 Thread DenesL
+1 On Mar 12, 12:17 am, Anthony abasta...@gmail.com wrote: This is great advice and examples -- you should make this a slice. :) Anthony

Re: [web2py] Japan

2011-03-12 Thread Ovidio Marinho
Terrible , +1 2011/3/11 Massimo Di Pierro massimo.dipie...@gmail.com We all feel very close to our friends in Japan, and we are saddened by what has happened. -- Ovidio Marinho Falcao Neto ovidio...@gmail.com Tecnologia da Informaçao Casa Civil do

Re: [web2py] Japan

2011-03-12 Thread Sebastian E. Ovide
+1 On Sat, Mar 12, 2011 at 3:06 PM, Ovidio Marinho ovidio...@gmail.com wrote: Terrible , +1 2011/3/11 Massimo Di Pierro massimo.dipie...@gmail.com We all feel very close to our friends in Japan, and we are saddened by what has happened. -- Ovidio Marinho Falcao Neto

[web2py] Re: Google GAE Task Queue independence

2011-03-12 Thread dlypka
FYI:I found a *GOTCHA* issue when upgrading to 1.92.3 from 1.77.3 Now you have to use .xml() on the URL() that you send into the GAE API: upload_url = blobstore.create_upload_url(URL(r=request,c='default',f='upbm2gig_gaehandler',args=None).xml()) # This works upload_url =

[web2py] Re: XML() object in html.py breaks ajax callback which needs HTML returned.

2011-03-12 Thread dlypka
FYI:I found the solution. It is a *GOTCHA* issue when upgrading to 1.92.3 from 1.77.3 Now you have to use .xml() on the URL() that you send into the GAE API: upload_url = blobstore.create_upload_url(URL(r=request,c='default',f='upbm2gig_gaehandle r',args=None).xml()) # This works

[web2py] Re: What to tell designers when they create a mockup for my web2py site

2011-03-12 Thread PlanetUnknown
You Sir Rock !! That is an awesome piece of advice !! I started with web2by about 2 days ago (learned about it in PyCon) and also heard that the support of the community is great. but this is just awesome.. Thanks a bunch Bruno. On Mar 11, 11:05 pm, Bruno Rocha rochacbr...@gmail.com wrote: I

[web2py] Support for MS Access?

2011-03-12 Thread Philnext
HelIo I saw in a last year post a question do we have support for MS Access? as I need it for my current projet I would know if there is any previous dev. for it. Thanks.

[web2py] Re: Google GAE Task Queue independence

2011-03-12 Thread Massimo Di Pierro
I would use ...blobstore.create_upload_url(str(URL(r=request,c='default',f='upbm2gig_gaehandle r',args=None))) On Mar 12, 9:55 am, dlypka dly...@gmail.com wrote: FYI:I found a *GOTCHA* issue when upgrading to 1.92.3 from 1.77.3 Now you have to use .xml() on the URL() that you send into the

[web2py] Re: Support for MS Access?

2011-03-12 Thread Massimo Di Pierro
Nobody has tried byt the mssql adapter (pyodbc) should work with access. The SQL is the same. Try and tel us know what problems you run into. On Mar 12, 9:43 am, Philnext phil.pr...@gmail.com wrote: HelIo I saw in a last year post a question do we have support for MS Access? as I need it for

Re: [web2py] Re: Google GAE Task Queue independence

2011-03-12 Thread Carl Roach
Thanks for the tip - that saves me GAE debugging time - always welcomed. The Web2py guys take backward compatiblilty v. seriously so there must be a reasonable reason for this change. I've searched GoogleGroups but couldn't find past threads but the search isn't great and I turned nothing up.

[web2py] Re: Google GAE Task Queue independence

2011-03-12 Thread Massimo Di Pierro
I do not think we ever said URL returns a string. We did this change in a way that did not break any example in the book. I will look more carefully at your example and treat it as a web2py bug. I am sure we can make it work. Can you post the complete traceback? Massimo On Mar 12, 11:12 am,

[web2py] How to have different types of users for auth

2011-03-12 Thread Jamboo
I have this simple form where you put your name and address in to place an order. http://www.pastie.org/1664006 The problem now is how do I lock this down? I followed the book and added @auth.requires_login() to my default controller. That works as in protecting the page, but I have 3 types of

Re: [web2py] How to have different types of users for auth

2011-03-12 Thread Bruno Rocha
You have to create groups in auth_groups, then check if user is member of the group @auth.requires_membership('leader') http://web2py.com/book/default/chapter/08#Combining-Requirements 2011/3/12 Jamboo ghett...@gmail.com I have this simple form where you put your name and address in to place

[web2py] html templates using or

2011-03-12 Thread pierreth
Hello, I have small problem when the characters and are used in web2py html template views. Using them for Python breaks the html: {{=OK if x 0 else bad}} Because these characters are not escaped in the code, the html file is no longer well formed. Using the html entities lt; and gr; does

Re: [web2py] html templates using or

2011-03-12 Thread Jonathan Lundell
On Mar 12, 2011, at 11:05 AM, pierreth wrote: Hello, I have small problem when the characters and are used in web2py html template views. Using them for Python breaks the html: {{=OK if x 0 else bad}} Because these characters are not escaped in the code, the html file is no longer

[web2py] After integrating Janrain, basic registration gone. How to have both ?

2011-03-12 Thread PlanetUnknown
Just integrated Janrain and it works perfectly, however that has taken away the option for basic register e.g. email/password. I want to give both options to users. Is it possible ? and how to go about it ? Any link/reference would be great, Thanks !

[web2py] Re: After integrating Janrain, basic registration gone. How to have both ?

2011-03-12 Thread Anthony
See Multiple Login Forms at the end of this section of the book: http://web2py.com/book/default/chapter/08#Other-Login-Methods-and-Login-Forms Anthony On Saturday, March 12, 2011 2:24:51 PM UTC-5, PlanetUnknown wrote: Just integrated Janrain and it works perfectly, however that has taken

[web2py] Re: html templates using or

2011-03-12 Thread pierreth
I think you mean the response object. The example code you gave still use the character so it does not help. In fact, the problem is that web2py is not processing the xml document but it parse directly the html file. I would really like Massimo to fix this. On Mar 12, 2:15 pm, Jonathan Lundell

Re: [web2py] Re: html templates using or

2011-03-12 Thread Jonathan Lundell
On Mar 12, 2011, at 11:39 AM, pierreth wrote: I think you mean the response object. Yes, response. The example code you gave still use the character so it does not help. Did you try it? How about the second version? In fact, the problem is that web2py is not processing the xml

Re: [web2py] Re: html templates using or

2011-03-12 Thread Jonathan Lundell
On Mar 12, 2011, at 11:54 AM, Jonathan Lundell wrote: On Mar 12, 2011, at 11:39 AM, pierreth wrote: I think you mean the response object. Yes, response. The example code you gave still use the character so it does not help. Did you try it? How about the second version? Hmm. I

[web2py] Re: about SQLFORM

2011-03-12 Thread cyber
I have few fields in db like this one: Field('enter', 'boolean', default=False) And I made new page with selection result: def table(): table=db().select(db.autos.ALL, orderby=~db.autos.dtime) return dict(table=table) Then I wrote code for this new page to represent data from

Re: [web2py] After integrating Janrain, basic registration gone. How to have both ?

2011-03-12 Thread rochacbruno
I have this working, Albert also asked me about it and I will create a slice about it. Enviado via iPhone Em 12/03/2011, às 16:24, PlanetUnknown nikhil.kodil...@gmail.com escreveu: Just integrated Janrain and it works perfectly, however that has taken away the option for basic register e.g.

[web2py] Re: After integrating Janrain, basic registration gone. How to have both ?

2011-03-12 Thread PlanetUnknown
I tried to use the ExtendedLoginForm (I guess that was what you were pointing to). but I got this exception - got multiple values for keyword argument 'signals' Not able to figure what the issue might be here. Have you seen this ? On Mar 12, 2:37 pm, Anthony abasta...@gmail.com wrote: See

[web2py] Re: After integrating Janrain, basic registration gone. How to have both ?

2011-03-12 Thread PlanetUnknown
Sorry, this might sound a noob question, but what is a slice ? I'm yet to complete the web2py book, but in case this is not defined there. On Mar 12, 3:38 pm, rochacbruno rochacbr...@gmail.com wrote: I have this working, Albert also asked me about it and I will create a slice about it.

[web2py] empty record (data) set

2011-03-12 Thread Adnan S.
I wanted to create an empty data set, just to get the table structure, but to avoid returning any records, due to large size of the table. I'm using the MySQL and if I do it as bellow, seems that everything goes into an infinite loop, where I thought it will just be as SELECT * from Prod WHERE

Re: [web2py] Re: After integrating Janrain, basic registration gone. How to have both ?

2011-03-12 Thread rochacbruno
A slice is a little part of web2py world, in theory everything related to web2py development is a slice. But in practice this become a slice when posted in web2pyslyces.com as a tip, recipe, tutorial, app, snippet, plugin or anything else. I mean that I will share some step by step

[web2py] Re: After integrating Janrain, basic registration gone. How to have both ?

2011-03-12 Thread PlanetUnknown
Thanks. I'll wait for your slice on web2pyslices in that case. I found a thread where you mention this exception got multiple values for keyword argument 'signals' I guess the slice fixes that ? On Mar 12, 4:42 pm, rochacbruno rochacbr...@gmail.com wrote: A slice is a little part of web2py

Re: [web2py] How to have different types of users for auth

2011-03-12 Thread Haroon Khalid
Would I have to create an extra field for auth_user gid and SQL join it with auth_group's id ? Thanks On Sat, Mar 12, 2011 at 1:47 PM, Bruno Rocha rochacbr...@gmail.com wrote: You have to create groups in auth_groups, then check if user is member of the group

[web2py] virtual hosts. single or multiple installation?

2011-03-12 Thread Haros
Hi, I have in my apache some virtual hosts. I'd like to know which method is better... each virtualhost having its own web2py installation (meaning that each virtual host will use its own wsgi) or one web2py installation and multiple virtual hosts using that installation? (wsgi will be shared,

Re: [web2py] empty record (data) set

2011-03-12 Thread Vasile Ermicioi
1==0 is a boolean not a query, empty_result = db(db.prod.id0).select() # I suppose that you don't have negative ids :)

Re: [web2py] empty record (data) set

2011-03-12 Thread Vasile Ermicioi
1==0 is not a query in terms of web2py even 1==db.prod.id is not valid, a field should be first db.prod.id == 1 is a valid query

Re: [web2py] How to have different types of users for auth

2011-03-12 Thread Bruno Rocha
NO! web2py default auth has 3 base tables auth_user, auth_groups, auth_membership. in auth_membership you store the relation between users and groups. 2011/3/12 Haroon Khalid ghett...@gmail.com Would I have to create an extra field for auth_user gid and SQL join it with auth_group's id ?

Re: [web2py] How to have different types of users for auth

2011-03-12 Thread Anthony
Read http://web2py.com/book/default/chapter/08#Authorization for more details. If you want, you can handle creating the groups and memberships via appadmin, which will show all the auth tables: http://web2py.com/book/default/chapter/03#More-on-appadmin On Saturday, March 12, 2011 5:46:45 PM

[web2py] Re: html templates using or

2011-03-12 Thread pierreth
I am sorry Jonathan, I think we have a misunderstanding. All this works with web2py. The problem is that characters and need to be escaped in html. Otherwise, it is not html. The html produced by web2py is well formed but in the template itself the html it is not well formed. Because of this,

Re: [web2py] Re: After integrating Janrain, basic registration gone. How to have both ?

2011-03-12 Thread Bruno Rocha
HI, I did not used ExtendedLoginForm because it has a bug, and I could not find solution for it. here is my slice: http://web2pyslices.com/main/slices/take_slice/124 http://web2pyslices.com/main/slices/take_slice/124It is working fine in auth for web2pyslices.com and natalanimal.com.br Bruno

Re: [web2py] Re: html templates using or

2011-03-12 Thread Jonathan Lundell
On Mar 12, 2011, at 3:14 PM, pierreth wrote: I am sorry Jonathan, I think we have a misunderstanding. All this works with web2py. The problem is that characters and need to be escaped in html. Otherwise, it is not html. The html produced by web2py is well formed but in the template itself

Re: [web2py] Re: After integrating Janrain, basic registration gone. How to have both ?

2011-03-12 Thread Anthony
Has the ExtendedLoginForm bug been reported? On Saturday, March 12, 2011 6:41:38 PM UTC-5, rochacbruno wrote: HI, I did not used ExtendedLoginForm because it has a bug, and I could not find solution for it. here is my slice: http://web2pyslices.com/main/slices/take_slice/124

[web2py] Re: empty record (data) set

2011-03-12 Thread Adnan S.
Thanks Vasile! I'm making baby steps here :) On Mar 12, 5:15 pm, Vasile Ermicioi elff...@gmail.com wrote: 1==0 is a boolean not a query, empty_result = db(db.prod.id0).select() # I suppose that you don't have negative ids :)

[web2py] Re: empty record (data) set

2011-03-12 Thread villas
By using the underscore in front of select, you can see the SQL. That is often the best way to see what's going on... e.g. db(db.prod.id0)._select() On Mar 13, 12:37 am, Adnan S. adnan.smajlo...@gmail.com wrote: Thanks Vasile! I'm making baby steps here :) On Mar 12, 5:15 pm, Vasile Ermicioi

[web2py] Re: about SQLFORM

2011-03-12 Thread villas
Do you need a custom form? How about... Use SQLFORM with 'keepvalues'. When user clicks checkbox, submit form with jQuery. Once that's working experiment with submitting form with ajax. On Mar 12, 8:15 pm, cyber vlad.mul...@gmail.com wrote: I have few fields in db like this one:    

[web2py] Re: html templates using or

2011-03-12 Thread pierreth
OK, So I have to accept that this is not real html. I guess the best thing for me is to enable the validation of my IDE when I am editing html files. This is a good thing because it helps avoid errors. But when I am done I can turn it off so I won't see the warnings and errors that I don't need.

Re: [web2py] Re: How to simulate form submission in doctest

2011-03-12 Thread howesc
i think you'll need to be able to set some of the hidden field parameters. i have not tried it myself though.

[web2py] Re: Google GAE Task Queue independence

2011-03-12 Thread howesc
i too wrestled with that change, but something convinced me that i was taking advantage of an 'unintended feature' so i just fixed my apps and moved on. i will say that massimo has done an excellent job overall of keeping things compatible, we just run into these undocumented, unintended

[web2py] Re: filtering selection list

2011-03-12 Thread Nik
Thanks Massimo for looking into this. I tried your suggestion but it's not working as I expected. The 'v' field selection sub-list remains empty; query is not triggered by the 't' selection since these field selections are in the same form. It can be forced to work by selecting a 't' and then

[web2py] Re: Japan

2011-03-12 Thread kawate
Thank you for your concerns. Over 10thousand people is missing in Sanriku area and earthquake is still returning. On 3月13日, 午前12:24, Sebastian E. Ovide sebastian.ov...@gmail.com wrote: +1 On Sat, Mar 12, 2011 at 3:06 PM, Ovidio Marinho ovidio...@gmail.com wrote: Terrible , +1

[web2py] REST the web2py way - RFC

2011-03-12 Thread Massimo Di Pierro
This is the result of a brainstorming session at PyCon with web2py users Jay, Kevin, Shawn and Nathan. We could use some help with testing and more importantly usability. Please check out trunk and put this in your code @request.restful() def api(): def GET(*args,**vars): parser =

Re: [web2py] Re: dal exception occurs when running on gae

2011-03-12 Thread zhao peng
thanks. On Sat, Mar 12, 2011 at 10:07 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: It is not a web2py bug. web2py it is just telling you that GAE cannot do this, because there are no expressions on GAE. Instead of this: db(db.user.id == session.user_id).update(post_num =  

[web2py] Re: Japan

2011-03-12 Thread Anthony
Note, the Sahana Software Foundation is looking for translators to complete a localization of Sahana Eden into Japanese: http://www.sahanafoundation.org/japan Sahana Eden is an open source disaster management system written in web2py. Anthony