[web2py] Haiti: Spreadsheet importer needed

2010-01-22 Thread Fran
This would be really valuable as we currently have teams of volunteers doing labouring away doing manual data entry which is slow for us & tedious for them! http://trac.sahanapy.org/wiki/SpreadsheetImporter Many thanks if you can come assist us with this task! Fran. -- You received this messag

[web2py] Re: validation problems

2010-01-22 Thread hamdy.a.farag
Hi >>So you can do >>IS_INT_IN_RANGE(v1, v2, error_message=T("enter a value between %(min)s and >>%(max)s")) >>or any other string containing the min and max mapping keys, @Denzel I can't get it working using this either I also have a nother question : In google chrome the upload field disp

[web2py] Limiting the Contents of a Select Tag

2010-01-22 Thread johntynan
I have a class called create_challenge here: http://code.google.com/p/pledgedrivetracker/source/browse/pledgedrives/controllers/default.py?spec=svn74b5784e200a53af235d6ea9abc83359e0ce3196&r=74b5784e200a53af235d6ea9abc83359e0ce3196#415 This model for the challenge has a foreign key to the person t

[web2py] Re: How to insert javascript?

2010-01-22 Thread mdipierro
If the options are in list or tuple, than for practical consequences, they are set in stone and there is no way you can allow a user to add one. Unless, as Denes suggest, you use the list to make the dropdown but you do not use the validator to validated. On Jan 22, 10:47 pm, NeonGoby wrote: > Th

[web2py] Re: How to insert javascript?

2010-01-22 Thread NeonGoby
The select options are defined by requires=IS_IN_SET(), so might need a means to update the set defined for this table field. On Jan 22, 11:25 am, DenesL wrote: > Nice code but what I meant to say is that allowing the user to add a > new option is basically the same as saying accept anything but

[web2py] Re: EOFError?

2010-01-22 Thread mdipierro
Yes. I have never seen this error before. Can you check your tickets (in app/errors) and identify the first one associated to the problem? It may give us a clue. On Jan 22, 7:36 pm, Brian M wrote: > For me it's been the source distribution. I'm not 100% sure, but it > seems to be happening even

[web2py] Re: EOFError?

2010-01-22 Thread Brian M
For me it's been the source distribution. I'm not 100% sure, but it seems to be happening even when I haven't touched the .table file (I know I haven't touched them) nor have I made any changes to the DAL table definition that matches the file. The .table file is there and is 1K and then for whatev

[web2py] Re: EOFError?

2010-01-22 Thread mdipierro
Are you using the web2py binary or source? Did you delete only the .table or everything in databases? Does you app run if you set migrate=False for all tables? Massimo On Jan 22, 4:11 pm, Brian M wrote: > Hmm, I've been running into this problem a bunch today. WinXP with > source web2py 1.74.5 a

[web2py] Re: EOFError?

2010-01-22 Thread Brian M
Hmm, I've been running into this problem a bunch today. WinXP with source web2py 1.74.5 and SQLite. My .table files keep getting truncated to 0 bytes for some reason and then web2py chokes. ~Brian On Jan 22, 2:13 pm, Thadeus Burgess wrote: > looks like a corrupted .table file > -Thadeus > > > >

[web2py] Re: How to insert javascript?

2010-01-22 Thread mdipierro
true On Jan 22, 1:25 pm, DenesL wrote: > Nice code but what I meant to say is that allowing the user to add a > new option is basically the same as saying accept anything but empty > (unless you have a list of all fruits somewhere). > Just changing the validator to IS_NOT_EMPTY would do. > > On J

Re: [web2py] EOFError?

2010-01-22 Thread Thadeus Burgess
looks like a corrupted .table file -Thadeus On Fri, Jan 22, 2010 at 1:18 PM, vince wrote: > i just look into the error log for some clean up and found several > ticket with the following errors. i am using 1.74.6, any ideas? > > > Traceback (most recent call last): >  File "/Library/WebServer

[web2py] Re: How to insert javascript?

2010-01-22 Thread DenesL
Nice code but what I meant to say is that allowing the user to add a new option is basically the same as saying accept anything but empty (unless you have a list of all fruits somewhere). Just changing the validator to IS_NOT_EMPTY would do. On Jan 22, 2:02 pm, mdipierro wrote: > something like

[web2py] EOFError?

2010-01-22 Thread vince
i just look into the error log for some clean up and found several ticket with the following errors. i am using 1.74.6, any ideas? Traceback (most recent call last): File "/Library/WebServer/Documents/web2py/gluon/restricted.py", line 173, in restricted exec ccode in environment File "/Li

[web2py] Re: Jython options.py fix

2010-01-22 Thread mdipierro
thanks! On Jan 22, 12:56 pm, Timothy Farrell wrote: > Oh right, the patch patch.  Here you go for both of them. > > -tim > > On 1/22/2010 11:36 AM, mdipierro wrote: > > > patch patch ... > > > notice that web2py worked with jthon2.5rc2 but not with table > > jython2.5 apparently because of a runa

[web2py] Re: update a form field after validation

2010-01-22 Thread mdipierro
I still do not understand. I want to know what you try to accomplish, not how you do it. On Jan 22, 12:38 pm, leone wrote: > Very simple:  IS_AUTONUMBER return an incremental value. > It runs well if I use SQLFORM with a db  linking the validator to a > field before > calling SQLFORM, so I view

[web2py] Re: How to insert javascript?

2010-01-22 Thread mdipierro
something like this?

Re: [web2py] db.export_to_csv_file error

2010-01-22 Thread Alexandre Andrade
really thanks. 2010/1/22 Thadeus Burgess > You have to define your tables before you export to csv, web2py will > only export the tables it knows about. > > so > > db = DAL('...') > > db.define_table(...) > > db.export_to_csv_file(open(file)) > > -Thadeus > > > > > > On Fri, Jan 22, 2010 at 12

Re: [web2py] Re: Jython options.py fix

2010-01-22 Thread Timothy Farrell
Oh right, the patch patch. Here you go for both of them. -tim On 1/22/2010 11:36 AM, mdipierro wrote: patch patch ... notice that web2py worked with jthon2.5rc2 but not with table jython2.5 apparently because of a runaway bin in Java regex that sun marked as "won't fix". This was a problem in

Re: [web2py] db.export_to_csv_file error

2010-01-22 Thread Thadeus Burgess
You have to define your tables before you export to csv, web2py will only export the tables it knows about. so db = DAL('...') db.define_table(...) db.export_to_csv_file(open(file)) -Thadeus On Fri, Jan 22, 2010 at 12:51 PM, Alexandre Andrade wrote: > I trying to export a sqlite db with

[web2py] db.export_to_csv_file error

2010-01-22 Thread Alexandre Andrade
I trying to export a sqlite db with db = DAL('sqlite://storage.sqlite') db.export_to_csv_file(open('/home/www-data/web2py/convenios.csv', 'wb')) but it creates a file with only: END What could be wrong? Someone have this problem before? Exporting each table works. -- Ate

[web2py] Re: update a form field after validation

2010-01-22 Thread leone
Very simple: IS_AUTONUMBER return an incremental value. It runs well if I use SQLFORM with a db linking the validator to a field before calling SQLFORM, so I view the value in the form. But using SQLFORM.factory I obtain the correct value in form.vars object, but I want to see it on the screen to

[web2py] Re: How to insert javascript?

2010-01-22 Thread DenesL
How would you validate the field?. -- 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+unsubscr...@googlegroups.com. For more option

[web2py] Re: How to insert javascript?

2010-01-22 Thread mdipierro

[web2py] Re: Request/Idea

2010-01-22 Thread DenesL
On Jan 22, 1:14 pm, villas wrote: > Thadeus, stop messing around and get that PluginCentral finished!!! +1 ;) -- 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 t

[web2py] Re: Request/Idea

2010-01-22 Thread villas
Thanks Denes and, I must say, this is the most supportive group I have ever experienced. However, I still think that non-contributors should offer more encouragement than pushiness. Hmm, on the other hand, I guess it's pushiness that gets the job done... Thadeus, stop messing around and get th

[web2py] Re: How to insert javascript?

2010-01-22 Thread NeonGoby
Massimo, That for the above code. I have to change one line: jQuery('#mySelect').prepend('' + prompt("Your choice:","") + ''); to get the new option appended to the select list. However, the validator didn't accept this new option when the form is submitted. H

[web2py] Re: Jython options.py fix

2010-01-22 Thread mdipierro
patch patch ... notice that web2py worked with jthon2.5rc2 but not with table jython2.5 apparently because of a runaway bin in Java regex that sun marked as "won't fix". This was a problem in parsing templates. On Jan 22, 11:00 am, Timothy Farrell wrote: > Here's another quickie: > > Running jyt

[web2py] Re: Jython route fix

2010-01-22 Thread mdipierro
This is a major discovery. Would you send me a patch? On Jan 22, 10:58 am, Timothy Farrell wrote: > So I'm tinkering with Jython again.  Last time I tinkered, I found that > routes didn't work (for static files).  I just found out why...but > before the explanation...the fix: > > change: >      i

[web2py] Re: update a form field after validation

2010-01-22 Thread mdipierro
Not sure I understand what this supposed to do. Would you explain it once more. On Jan 22, 10:47 am, leone wrote: > I suppose that my error is in setting the new value to field. > I am confused. > > def index(): >     form = SQLFORM.factory ( >             Field('autonumber','integer', requires=I

[web2py] Jython options.py fix

2010-01-22 Thread Timothy Farrell
Here's another quickie: Running jython.bat web2py.py -L options.py would fail to load the options file. In widget, line 748, make it try again with fewer parameters: if options.config: try: options = __import__(options.config, [], [], '') except Exception:

[web2py] Jython route fix

2010-01-22 Thread Timothy Farrell
So I'm tinkering with Jython again. Last time I tinkered, I found that routes didn't work (for static files). I just found out why...but before the explanation...the fix: change: if isinstance(stream, str): in response.stream() to: if isinstance(stream, (str, unicode)): The reason wh

[web2py] Re: update a form field after validation

2010-01-22 Thread leone
I suppose that my error is in setting the new value to field. I am confused. def index(): form = SQLFORM.factory ( Field('autonumber','integer', requires=IS_AUTONUMBER (progfile, 1)), ) def upd_auto(form): form.custom.autonumber = form.vars.autonumber

[web2py] Re: update a form field after validation

2010-01-22 Thread DenesL
Can you post your code? On Jan 22, 11:14 am, leone wrote: > I done it, but when I update forms.vars. with the new value it is > not update in the form. > Have you a suggest? > leone > > On 22 Gen, 17:03, DenesL wrote: > > > If I understand correctly you could use onvalidation. > > Example: >

Re: [web2py] Firefox 3.6 file upload

2010-01-22 Thread Alex Fanjul
Very cool indeed, what is the necessary server part? alex f El 22/01/2010 10:15, Anand Vaidya escribió: Firefox 3.6 has been released and opens up some new paradigms for file uploads: Browser supports drag and drop file upload - try it, very cool. Needs server side support though. http://hacks.

[web2py] Re: update a form field after validation

2010-01-22 Thread leone
I done it, but when I update forms.vars. with the new value it is not update in the form. Have you a suggest? leone On 22 Gen, 17:03, DenesL wrote: > If I understand correctly you could use onvalidation. > Example: > > def your_action(): > >   def funcx(): >     # code that runs after validat

[web2py] Re: update a form field after validation

2010-01-22 Thread DenesL
If I understand correctly you could use onvalidation. Example: def your_action(): def funcx(): # code that runs after validation ... if form.accepts(..., onvalidation=funcx): ... On Jan 22, 10:51 am, leone wrote: > I have a SQLFORM.factory with a Field that requires a custom cl

[web2py] update a form field after validation

2010-01-22 Thread leone
I have a SQLFORM.factory with a Field that requires a custom class to incremet a value. It runs, but I can't understand how I can udate the field value after form.accepts and before form is exposed. Have same example? Thanks leone -- You received this message because you are subscribed to the Go

[web2py] Re: Request/Idea

2010-01-22 Thread DenesL
David (and all), do not feel the need to be entitled. Push, push hard if I you believe in it. I consider participation a net positive experience. You either add to the group or learn from your mistakes, as I can attest having made my fair share of them since joining. This group is the medium to c

[web2py] update a form field after validation

2010-01-22 Thread leone
I have a SQLFORM.factory with a Field that requires a custom class to incremet a value. It runs, but I can't understand how I can udate the field value after form.accepts and before form is exposed. Have same example? Thanks leone -- You received this message because you are subscribed to the Go

[web2py] Re: Case Study: RAD development for Haiti Response

2010-01-22 Thread mdipierro
Fantastic, Fran! This is the web2py project that makes most proud. -- 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+unsubscr...@go

[web2py] Re: How to limit access to items in static?

2010-01-22 Thread mdipierro
You get invalid requests if the url is wrong or contains invalid chars (the filename cannot contain special chars or spaces, only alphanumeric and -). On Jan 22, 8:23 am, Johann Spies wrote: > 2010/1/20 mdipierro : > > > > > You should not block access to thinks that are in static. Things in > >

[web2py] Re: Auth when using DAL from Windows "Task Scheduler" started scripts

2010-01-22 Thread mdipierro
I cannot think of any but, if you can, do not use this, it is convoluted. Use web2py.py -S app -M -R yourscript instead On Jan 22, 5:37 am, baloan wrote: > By searching for "exec_environment limitations" I found a recent > thread pointing out to use > > import os > os.chdir('/path/to/web2py/')

[web2py] Re: Firefox 3.6 file upload

2010-01-22 Thread mdipierro
cool! On Jan 22, 3:15 am, Anand Vaidya wrote: > Firefox 3.6 has been released and opens up some new paradigms for file > uploads: Browser supports drag and drop file upload - try it, very > cool. Needs server side support though. > > http://hacks.mozilla.org/2009/12/uploading-files-with-xmlhttpre

[web2py] Re: auth default form prints form:

2010-01-22 Thread mdipierro
If I understand you added a Field to auth_user but you do not want to display it in forms. You can do db.auth_user.fieldname.writable=db.auth_user.readable=False On Jan 21, 11:01 pm, alain wrote: > I have enabled the built-in auth module and it is working fine. > However each form has an >  ex

[web2py] Re: Case Study: RAD development for Haiti Response

2010-01-22 Thread DenesL
"Most excellent" work. -- 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+unsubscr...@googlegroups.com. For more options, visit thi

[web2py] Re: LOAD function anybody?

2010-01-22 Thread kralin
I just discovered thsi LOAD function and I'm loving it! very well done guys!! :) just one question, I'm loading via ajax a div that takes some seconds to come up. in the mean time a 'loading...' string appears in the div. is there a way to specify what has to be written (and how) while loading?

Re: [web2py] Re: How to limit access to items in static?

2010-01-22 Thread Johann Spies
2010/1/20 mdipierro : > You should not block access to thinks that are in static. Things in > static should be considered ublic by default so that you can ask the > web server to serve then and by-pass web2py. This is an optimization > that you will need in production and cannot give up. > > If som

[web2py] Re: Request/Idea

2010-01-22 Thread villas
On Jan 21, 11:11 pm, Thadeus Burgess wrote: >> Like you I also do not feel the need to develop something when there is no >> community >> push for it (hence the reason I have put plugincentral off for so long). Hi Thadeus, Please be aware that the majority (incl. me) who contribute little to th

Re: [web2py] Re: Hosting PHP and Web2py

2010-01-22 Thread Alexandre Andrade
Ubuntu defines apache2-worker when installing mod-wsgi, but don't uninstall when you change to prefork. So you can use the setup_web2py.sh script in ubuntu and after install php. 2010/1/22 Graham Dumpleton > Apache/mod_wsgi can work with prefork, although daemon mode should be > used to avoi

[web2py] Auth when using DAL from Windows "Task Scheduler" started scripts

2010-01-22 Thread baloan
By searching for "exec_environment limitations" I found a recent thread pointing out to use import os os.chdir('/path/to/web2py/') from gluon.shell import env globals().update(env('you_app_name', import_models=True)) # now do whatever you need you can use request, db, helpers, etc. when accessing

Re: [web2py] Firefox 3.6 file upload

2010-01-22 Thread tiago almeida
Sweet. Thanks for the info :) On Fri, Jan 22, 2010 at 9:15 AM, Anand Vaidya wrote: > Firefox 3.6 has been released and opens up some new paradigms for file > uploads: Browser supports drag and drop file upload - try it, very > cool. Needs server side support though. > > http://hacks.mozilla.org/2

[web2py] Re: Hosting PHP and Web2py

2010-01-22 Thread Graham Dumpleton
Apache/mod_wsgi can work with prefork, although daemon mode should be used to avoid problems due to PHP requirement of prefork causing adverse performance issues of Python web application. See: http://blog.dscpl.com.au/2009/03/load-spikes-and-excessive-memory-usage.html If Ubuntu only has PHP f

[web2py] auth default form prints form:

2010-01-22 Thread alain
I have enabled the built-in auth module and it is working fine. However each form has an extra form: label in its html. How do I get rid of it? It is not my app css (I removed it and same things happens). Same proble with the reddit example if I add the auth module to it. http://localhost:8000/my

[web2py] Firefox 3.6 file upload

2010-01-22 Thread Anand Vaidya
Firefox 3.6 has been released and opens up some new paradigms for file uploads: Browser supports drag and drop file upload - try it, very cool. Needs server side support though. http://hacks.mozilla.org/2009/12/uploading-files-with-xmlhttprequest/ -- You received this message because you are sub

Re: [web2py] Re: Cherokee problem

2010-01-22 Thread Johann Spies
2010/1/21 Ivan P : > Although, I take my words back. My way is not the simplest. =) But it > is not hard at all and is powerful. Thanks. I will try it. Regards Johann -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send

[web2py] Re: Case Study: RAD development for Haiti Response

2010-01-22 Thread Yarko Tymciurak
On Jan 22, 1:56 am, Fran wrote: > We've been building a framework for disaster response for over a year > now & Haiti put it to the test as we went live with it. Congratulations! I heard a Hillary Clinton say something today about technology being a resource that can be put to good or not; Cle

[web2py] Re: suggestion: decouple tickets from admin interface

2010-01-22 Thread howesc
I sent massimo the source as requested. note that my code does not display your source code in the ticket when running on GAE, and perhaps when running elsewhere, and except when the problem is in my view it's good enough for me. thanks, cfh On Jan 21, 3:47 pm, Jeff Bauer wrote: > Thanks, howe