[web2py] ProgrammingError: Cannot operate on a closed database

2012-09-16 Thread Martin Weissenboeck
I have read some threads about this error message - I got it too: Version web2py™ (2, 0, 9, datetime.datetime(2012, 9, 13, 23, 51, 30), 'stable') Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. Traceback (most recent call last):

[web2py] Re: executesql bug

2012-09-16 Thread Matt
Thanks. Will do. Matt On Monday, September 17, 2012 12:40:01 PM UTC+12, Anthony wrote: > > Please open a ticket: http://code.google.com/p/web2py/issues/list > > On Sunday, September 16, 2012 8:07:21 PM UTC-4, Matt wrote: >> >> It would be great if it was reintroduced then. I've currently got a li

[web2py] Re: multiple controllers under linux environment

2012-09-16 Thread Pystar
can we see some code? your description is rather vague On Monday, September 17, 2012 5:01:09 AM UTC+1, Vladimir Makarov wrote: > > I use different controller files: >+ clients.py for some code >+ contracts.py for another code >+ ... > And I created subdirrectories in view with required

[web2py] multiple controllers under linux environment

2012-09-16 Thread Vladimir Makarov
I use different controller files: + clients.py for some code + contracts.py for another code + ... And I created subdirrectories in view with required html files. If I work under Windows it's OK and works perfectly but if I use my Ubuntu or LinuxMint stations it seams that view files don'

[web2py] Re: Installing Windows Service (2.0.9 Win exe)

2012-09-16 Thread Andrew W
Thanks. Well it installs OK, but won't start - just times out. Found some inconsistencies in the book: *Deployment Recipes:* "In order to use web2py as a Windows service, you must create a file "options.py" with startup parameters" and one of the options mentioned "numthreads" appears in the

[web2py] Re: Changing auth validator error messages

2012-09-16 Thread Massimo Di Pierro
I think you can do: db.auth_user.email.requires.error_message = T() Unless they have more then one validator. On Sunday, 16 September 2012 21:21:00 UTC-5, Mark Li wrote: > > Is it possible to change the validator error messages in for auth fields > like "value already in database or empty,"

[web2py] Changing auth validator error messages

2012-09-16 Thread Mark Li
Is it possible to change the validator error messages in for auth fields like "value already in database or empty," without having to redefine all the validators for that field? For example, I wanted to change the validator error message for IS_NOT_IN_DB for auth_user.email, and I wrote: db.aut

[web2py] Submitting a form on a jQuery-UI modal

2012-09-16 Thread shartha
I have a form containing a text field and the submit button on a jQuery-UI modal. The modal will be shown if the user clicks on a link on the page. If the user clicks on the submit button of the form on the modal, a database row should be updated. However, the form does not get processed succes

[web2py] Re: executesql bug

2012-09-16 Thread Anthony
Please open a ticket: http://code.google.com/p/web2py/issues/list On Sunday, September 16, 2012 8:07:21 PM UTC-4, Matt wrote: > > It would be great if it was reintroduced then. I've currently got a live > site using executesql just like this. > > Matt > > On Sunday, September 16, 2012 3:16:13 PM

[web2py] Re: executesql bug

2012-09-16 Thread Matt
It would be great if it was reintroduced then. I've currently got a live site using executesql just like this. Matt On Sunday, September 16, 2012 3:16:13 PM UTC+12, Anthony wrote: > > Hmm, doesn't look like the Google SQL adapter takes a placeholder > argument: http://code.google.com/p/web2py/s

[web2py] Restricting dropdown options in SQLFORM.grid in queries on hierarchical tables.

2012-09-16 Thread Michael Ellis
Suppose I have an app that allows grandparents to enter, view, and edit information about their children and grandchildren. I want to make sure that each grandparent can see only his/her family's information and I want to use SQLFORM.grid. Using a query of the form q = (db.children.parent == db.p

Re: [web2py] Re: Problem with validator IS_LIST_OF(IS_EMAIL())

2012-09-16 Thread Martin Weissenboeck
Ok, no more problems. Thank you! 2012/9/16 Massimo Di Pierro > fixed > > > On Sunday, 16 September 2012 13:28:55 UTC-5, mweissen wrote: > >> I used my small test-program and the admin-application. >> >> Yes, now I can change an existing record without an error. >> And a wrong email-address show

Re: [web2py] Re: Format of Start Time in scheduler_task

2012-09-16 Thread Martin Weissenboeck
Checked again - no errors, Thanky you! 2012/9/16 Massimo Di Pierro > I made a change but forgot to inport the validator. The IS_DATETIME should > be there for compatibility. > > > On Sunday, 16 September 2012 13:41:10 UTC-5, mweissen wrote: > >> I have checked it. I have got >> >> File: "...\sc

Re: [web2py] Re: Using SQL functions in SELECT?

2012-09-16 Thread Vasile Ermicioi
> > > db("Start_date < NOW()").select(db.tbl.ALL) > > cool!! I didn't know that this is possible --

[web2py] Disabling Html control effects and default attributes.

2012-09-16 Thread martzi
Hi all, I wonder what's the best way to disable html controls effects / default attributes. without modifying bootstrap.min.css. --

[web2py] Display control effects.

2012-09-16 Thread martzi
Hi all, I wonder what's the best way to disable html controls default effects. without modifying bootstrap.min.css. --

[web2py] Re: Using SQL functions in SELECT?

2012-09-16 Thread Massimo Di Pierro
You can use a string in place of a query: db("Start_date < NOW()").select(db.tbl.ALL) On Sunday, 16 September 2012 13:42:38 UTC-5, MichaelF wrote: > > Is there a way I can use 'arbitrary' SQL functions in my queries? For > example, I might want to do something akin to: > > SELECT * FROM tbl WHE

Re: [web2py] Re: Format of Start Time in scheduler_task

2012-09-16 Thread Massimo Di Pierro
I made a change but forgot to inport the validator. The IS_DATETIME should be there for compatibility. On Sunday, 16 September 2012 13:41:10 UTC-5, mweissen wrote: > > I have checked it. I have got > > File: "...\scheduler.py", line 458, in define_table > requires = IS_DATETIME()), > NameError:

[web2py] How to create a new DAL connection?

2012-09-16 Thread spiffytech
I'm writing a script that runs in the web2py environment and accesses my database through the DAL. Because my script is multithreaded and the DB logic is not easily isolated to a single thread, I need multiple connections to the DB, which means multiple DAL instances. I see I can do this: DAL(

Re: [web2py] Re: Problem with validator IS_LIST_OF(IS_EMAIL())

2012-09-16 Thread Massimo Di Pierro
fixed On Sunday, 16 September 2012 13:28:55 UTC-5, mweissen wrote: > > I used my small test-program and the admin-application. > > Yes, now I can change an existing record without an error. > And a wrong email-address show an appropriate message. > > Then I tried to add a new row and I got: > obj

[web2py] Re: Installing Windows Service (2.0.9 Win exe)

2012-09-16 Thread Massimo Di Pierro
I think I understand this. Try the latest nightly build. --

[web2py] Using SQL functions in SELECT?

2012-09-16 Thread MichaelF
Is there a way I can use 'arbitrary' SQL functions in my queries? For example, I might want to do something akin to: SELECT * FROM tbl WHERE Start_date < NOW(); I realize that in this particular case I can translate the "NOW()" SQL function to the current date/time. But how about other function

Re: [web2py] Re: Format of Start Time in scheduler_task

2012-09-16 Thread Martin Weissenboeck
I have checked it. I have got File: "...\scheduler.py", line 458, in define_table requires = IS_DATETIME()), NameError: global name 'IS_DATTIME' is not defined Sorry, I am not shure whether this line comes from the trunk or from my tries. Without this line it works perfect. 2012/9/16 Massimo

[web2py] Disabling text input onclick glow effect.

2012-09-16 Thread martzi
Hi all, I wonder if the text input glow effect on click could be disable. --

Re: [web2py] Re: Problem with validator IS_LIST_OF(IS_EMAIL())

2012-09-16 Thread Martin Weissenboeck
I used my small test-program and the admin-application. Yes, now I can change an existing record without an error. And a wrong email-address show an appropriate message. Then I tried to add a new row and I got: object of type 'NoneType' has no len() Function argument list (cls=, field=, value=

Re: [web2py] Problem with validator IS_LIST_OF(IS_EMAIL())

2012-09-16 Thread Bruno Rocha
I just looked at the code but I cant see how did you solved this, I am having the exact problem on another custom widget. I want a field where users will put recipe ingredients separated by new lines *The field* Field("ingredients", "list:string", requires=LINE_SEPARATED_LIST(), widget=ListTextW

Re: [web2py] Re: Need help with impersonate

2012-09-16 Thread Michael Ellis
Thanks Alan and Massimo. I will retest with sources from trunk as soon as I get a chance to spend some time on it. Am I right that the patch is simply a fix to the web presentation, i.e. the impersonate functionality to should work without it? Cheers, Mike On Sun, Sep 16, 2012 at 11:35 AM, Al

[web2py] Re: Installing Windows Service (2.0.9 Win exe)

2012-09-16 Thread Andrew W
Done. 1011. --

[web2py] Re: Format of Start Time in scheduler_task

2012-09-16 Thread Massimo Di Pierro
I think this is now fixed. Can you please check trunk? On Sunday, 16 September 2012 01:54:00 UTC-5, mweissen wrote: > > A minor problem: > > Looking at a row of db.scheduler_task using admin shows: > > Start Time: > Next Run Time: > Stop Time: > "Next Run Time" and "Stop Time" use the format "%

Re: [web2py] Re: Problem with validator IS_LIST_OF(IS_EMAIL())

2012-09-16 Thread Massimo Di Pierro
You opened a pyfpdf issue. You may want to close it. I moved it to web2py issue 1010 and I think I have a fix in trunk. Can you check? http://code.google.com/p/web2py/issues/detail?id=1010 On Sunday, 16 September 2012 01:03:19 UTC-5, mweissen wrote: > > Done: Issue 29

[web2py] Re: manipulate db.field.attrib

2012-09-16 Thread yashar
thanks , it worked. i was thinking to use sqlform factory to create a form and push it into database. On Sunday, September 16, 2012 7:45:39 PM UTC+4:30, Anthony wrote: > > The problem is not that you are changing the validator in each form > function -- the form always gets submitted back to its

[web2py] Re: need help with sandbox testing pos plugin

2012-09-16 Thread Massimo Di Pierro
I opened a ticket about this. Thanks Margaret for reporting it. On Friday, 14 September 2012 16:17:19 UTC-5, greaneym wrote: > > In the process of sandbox testing with the POS plusing and google checkout, > > in the pos plugin, the > instructions indicate in the model to add, > > 4) in your payme

[web2py] Re: Need help with impersonate

2012-09-16 Thread Alan Etkin
El domingo, 16 de septiembre de 2012 11:30:32 UTC-3, Massimo Di Pierro escribió: > > I agree. Can you send me a patch? > > A patch for the two issues mentioned. Now impersonate looks for args before returning a form. On impersonation, it returns a readonly form with the user data The book should

[web2py] Re: manipulate db.field.attrib

2012-09-16 Thread Anthony
The problem is not that you are changing the validator in each form function -- the form always gets submitted back to its original function, so the validator will always be set the same, both on form creation and form submission/validation. The problem is that when you create the form, it gets

[web2py] Re: Need help with impersonate

2012-09-16 Thread Massimo Di Pierro
I agree. Can you send me a patch? On Sunday, 16 September 2012 08:52:41 UTC-5, Alan Etkin wrote: > > I just tested impersonation with last trunk version and is working fine > > Here's what I did: > > Register two users > Added an impersonate record in db.auth_permission (1 has permission to > imp

[web2py] Add a dropdown box to SQLFORM.grid

2012-09-16 Thread tospecht
Hi, I'm using a SQLFORM.grid with selectable attribute. But I need also a single dropdown box at the bottom of the table, to select a user mapping. Is this possible? Regards, Tobi --

[web2py] Re: Need help with impersonate

2012-09-16 Thread Alan Etkin
I just tested impersonation with last trunk version and is working fine Here's what I did: Register two users Added an impersonate record in db.auth_permission (1 has permission to impersonate 2) with appadmin Logged in as 1 Went to /default/user/impersonate and submitted the form with value 2

[web2py] Re: Python for Android (any takers to run web2py)

2012-09-16 Thread Web2py Mostly Newbie
I think they're running web2py on an android device in this video (apparently one of Massimo's colleagues): http://pyvideo.org/video/1246/some-experiences-with-python-for-android-py4a --

[web2py] manipulating dal.field.attrib

2012-09-16 Thread yashar
i used this: db.define_table('test', Field('service_type')) def form1(): db.test.service_type.requires=IS_IN_SET(['Trial']) form = SQLFORM(db.test) if form.process().accepted: pass return dict(form=form) def form2(): db.test.service_type.requires=IS_IN_SET(['o

[web2py] manipulate db.field.attrib

2012-09-16 Thread yashar
below solution not working, because when you open form1 then form2, web2py will look for joe for field, and not saving form1, so how could i solve it? db.define_table('test', Field('name')) def form1(): db.test.name.requires=IS_IN_SET(['yashar']) form = SQLFORM(db.test) if form.p

[web2py] WSDL Web service in web2py

2012-09-16 Thread David Marko
Regarding the SOAP web services see e.g. here: http://code.google.com/p/pysimplesoap/wiki/Web2Py --

[web2py] WSDL Web service in web2py

2012-09-16 Thread Hassan Alnatour
Dear ALL , How can i create a WSDL web service in web2py ? --

[web2py] Re: [ANN] Started development on web2admin

2012-09-16 Thread rif
Check out the new global search, feedback most welcomed. Features still to come: - Custom Links - Custom Left join -rif sâmbătă, 15 septembrie 2012, 15:38:14 UTC+3, rif a scris: > > I just thought that one might want to use the manager (without prefix) > role for a different propose so

Re: [web2py] Re: Count users

2012-09-16 Thread Alec Taylor
Another solution would be to use the built-in RBAC to set access; allotting a group to each user. Then to provide the same access as that user to another user, simply add that second user to the first users' group. Finally for a non-db solution you could just throw information into the session, s