[web2py:21851] Re: Lighttpd streaming limitations?

2009-05-14 Thread Richard
hello, to upload the data I'm using the copystream example provided in this thread: http://groups.google.com/group/web2py/browse_thread/thread/67912959c7f021e1/ random_name=str(time.time())+str(randint(1,9)) filename=os.path.join(request.folder,'uploads',random_name) copystream(request.

[web2py:21852] Re: new Auth in trunk

2009-05-14 Thread Álvaro Justen [Turicas]
On Thu, May 14, 2009 at 1:59 AM, mdipierro wrote: > we have settings and we have messages. The latter do not need T. > > auth.messages are a special class and values are treated as-if they > had a T. I know (!!!) about Messages. ;-) Sorry, I don't understand what you said. Why we can't translate

[web2py:21853] Re: Lighttpd streaming limitations?

2009-05-14 Thread mdipierro
I am not sure this is what you want. Why is the data in the body and not in a request.vars.file? If you are uploading a file via a multipart form than there is no size limitation. I tried one gigabyte from a virtual machine with 256M Ram. gmail.com> wrote: > hello, > > to upload the data I'm usin

[web2py:21854] Re: new Auth in trunk

2009-05-14 Thread mdipierro
I did not express myself properly. Yes you can translate them. On May 14, 7:43 am, Álvaro Justen [Turicas] wrote: > On Thu, May 14, 2009 at 1:59 AM, mdipierro wrote: > > we have settings and we have messages. The latter do not need T. > > > auth.messages are a special class and values are treat

[web2py:21855] Re: new Auth in trunk

2009-05-14 Thread Álvaro Justen [Turicas]
On Thu, May 14, 2009 at 9:56 AM, mdipierro wrote: > I did not express myself properly. Yes you can translate them. Ok, so my question is: can we have: self.messages.submit_button = 'Submit' instead of: self.settings.submit_button = 'Submit' ? Aply this question to: self.

[web2py:21856] Re: new Auth in trunk

2009-05-14 Thread mdipierro
YES for self.settings.submit_button = 'Submit' self.settings.delete_label = 'Check to delete:' not convinced on whether the log messages should be translated. Other opinions? Massmo On May 14, 8:12 am, Álvaro Justen [Turicas] wrote: > On Thu, May 14, 2009 at 9:56 AM, mdipierr

[web2py:21857] how to deploy web2py app with lighttpd server on windows xp

2009-05-14 Thread durga
hi all, I have downloaded web2py_win and lighttpd(windows ver) on my windows machine. configured as below but still its not working can somebody help me in web2py app deployment web2py at C:\Apps\web2py_win\web2py lighttpd at C:\apps\LightTPD in lighttpd i have configured server.modules

[web2py:21858] Re: Edit View(layout.html) does not matter, does not reflect this.

2009-05-14 Thread allieus
Modify the following temporary and is being developed. # gluon/compileapp.py : 301 def run_view_in(environment): # ... if is_gae: # ccode = getcfs(layer, filename, lambda : \ #compile(parse_template(response.view, #

[web2py:21859] Re: new Auth in trunk

2009-05-14 Thread Álvaro Justen [Turicas]
On Thu, May 14, 2009 at 11:49 AM, mdipierro wrote: > YES for >         self.settings.submit_button = 'Submit' >         self.settings.delete_label = 'Check to delete:' Ok! > not convinced on whether the log messages should be translated. > Other opinions? I can have two type of users in my sys

[web2py:21860] Re: new Auth in trunk

2009-05-14 Thread mdipierro
OK. can you send me a patch? Massimo On May 14, 10:13 am, Álvaro Justen [Turicas] wrote: > On Thu, May 14, 2009 at 11:49 AM, mdipierro wrote: > > YES for > >         self.settings.submit_button = 'Submit' > >         self.settings.delete_label = 'Check to delete:' > > Ok! > > > not convinced o

[web2py:21861] Importing modules from controller folder

2009-05-14 Thread voltron
I have several forms and accompanying functions, I would like to be able to import them from the controller folder as in: /controlllers /forms/__init__ /forms/ reg_form.py mycontroller.py #in mycontroller.py import forms.reg_form ### ERROR This is n

[web2py:21862] Re: how to deploy web2py app with lighttpd server on windows xp

2009-05-14 Thread Yarko Tymciurak
. > > cgi.assign = ( ".fcgi" => "C:/Apps/web2py_win/ > web2py/web2py.exe") Since you mention WinXP, and since you show web2py.exe - web2py.exe is all you need to run (no need for lighthttp).web2py.exe has a built in server; try that first. Maybe you are trying to

[web2py:21863] bug in form behavior?

2009-05-14 Thread mgbeli...@gmail.com
Hello, This is my first question on the mailing lists, so I must say that I like web2py a lot! I've noticed some strange behavior with the form.vars, I'll try to explain it with a quick example here in an imaginary default.py controller. # defuault.py controller. def index(): form = FORM(

[web2py:21864] Re: Importing modules from controller folder

2009-05-14 Thread mdipierro
put them in applications/yourapp/modules and exec('import application.%s.modules.forms.reg_form as reg_form' % request.application) On May 14, 11:47 am, voltron wrote: > I have several forms and accompanying functions, I would like to be > able to import them from the controller folder as in:

[web2py:21865] Re: bug in form behavior?

2009-05-14 Thread mdipierro
you may have found a bug. I will look at it asap. Massimo On May 14, 1:02 pm, "mgbeli...@gmail.com" wrote: > Hello, > > This is my first question on the mailing lists, so I must say that I > like web2py a lot! > > I've noticed some strange behavior with the form.vars, I'll try to > explain it w

[web2py:21866] Re: Importing modules from controller folder

2009-05-14 Thread Voltron
Done that, was a pain Massimo as I explained in my first post: "This is not possible for some reason. I could have put them in the "modules" folder, but that involves import gluon.html.gluon.languages e.t.c which is also a headache. Is there any workaround? " it is a headache, I donot want to tr

[web2py:21867] Re: Importing modules from controller folder

2009-05-14 Thread Álvaro Justen [Turicas]
On Thu, May 14, 2009 at 3:54 PM, Voltron wrote: > > Done that, was a pain Massimo as I explained in my first post: > > "This is not possible for some reason. I could have put them in the > "modules" folder, but that involves import gluon.html.gluon.languages > e.t.c which is also a headache. Is t

[web2py:21868] Re: Importing modules from controller folder

2009-05-14 Thread Voltron
I tried that out Alvar, I know about python packages, and I have been using them for a while in the modules folder, but since its a subfolder in the Controllers folder, the FORM class and other things are missing. Oh well On May 14, 9:10 pm, Álvaro Justen [Turicas] wrote: > On Thu, May 14, 2009

[web2py:21869] Re: bug in form behavior?

2009-05-14 Thread DenesL
Besides the problem in the INPUT class _validate function there is one more problem here, note that given: inp=INPUT(_name='field') then inp.attributes is: {'type': 'text', 'value' :None, "_name': 'field'} shouldn't that be '_type' instead of 'type' ? --~--~-~--~~~

[web2py:21870] Re: PIL on GAE

2009-05-14 Thread Tito Garrido
Works Perfectly! I'm not suprised hahaha Thank you very much Maximo! Tito Garrido On Wed, May 13, 2009 at 12:12 AM, mdipierro wrote: > > I think you want a resize validator that resizes a file as it is > uploaded. this should do it but I let you do the debugging. ;-) > > class RESIZE: >

[web2py:21871] Re: Importing modules from controller folder

2009-05-14 Thread Mark Larsen
> /controlllers >              /forms/__init__ >              /forms/ reg_form.py You are missing .py on the __init__, was that a typo? > import forms.reg_form ### ERROR Since web2py runs out of it's root maybe (this as worked for me with things out of my modules directory): import application

[web2py:21872] Re: new scaffolding app?

2009-05-14 Thread Álvaro Justen [Turicas]
Two issues: 1- Character encoding: I see "Olá Mundo" instead of "Olá Mundo". 2- Language in HTML: this page is translated (there is "Bem-vindo ao web2py", don't "Welcome to web2py") so I think HTML can be modified: http://www.w3.org/1999/xhtml"; xml:lang="en"> to: http://www.w3.org/1999/xhtml";

[web2py:21873] Re: Lighttpd streaming limitations?

2009-05-14 Thread Richard
the data is in the body because it is posted from an external application (like what was described in that thread) instead of from a HTML form. Are there additional limitations in this case? Richard On May 14, 10:55 pm, mdipierro wrote: > I am not sure this is what you want. Why is the data in

[web2py:21874] Is there a way to set attributes of a field on model?

2009-05-14 Thread Tito Garrido
Is there a way to set attributes of a field on model? Like: db.define_table('album', SQLField('name',"string",length=50,default=""), SQLField("thumbnail","upload",default="",autodelete=True,* attr=dict(class='multi')*), <- SQLField("description","text",default=""), SQLField("da

[web2py:21875] Re: Is there a way to set attributes of a field on model?

2009-05-14 Thread DenesL
The only way I can think of is thru a widget, but not as clear cut as your pseudo syntax. Look at the UploadWidget class in gluon/sqlhtml. On May 14, 7:59 pm, Tito Garrido wrote: > Is there a way to set attributes of a field on model? > > Like: > db.define_table('album', >     SQLField('name',"s

[web2py:21876] Re: Edit View(layout.html) does not matter, does not reflect this.

2009-05-14 Thread mdipierro
Please do not change that. It is a speedup technique that is important on GAE. This is a false problem. You are modifying your app while running the dev_appengine. You should be surprised that some some changes are reflected in the app not that some aren't. You should not develop on the google ap

[web2py:21877] Re: Lighttpd streaming limitations?

2009-05-14 Thread mdipierro
not if the content-length header is set properly. Massimo On May 14, 7:45 pm, Richard wrote: > the data is in the body because it is posted from an external > application (like what was described in that thread) instead of from a > HTML form. > Are there additional limitations in this case? > >

[web2py:21878] Re: Is there a way to set attributes of a field on model?

2009-05-14 Thread mdipierro
Notice that by default that field has id "album_thumbnail" so you can do form the view $(document).ready(function(){$('#album_thumbnail').class('multi');}); On May 14, 7:59 pm, Tito Garrido wrote: > Is there a way to set attributes of a field on model? > > Like: > db.define_table('album', >

[web2py:21879] Re: bug in form behavior?

2009-05-14 Thread mdipierro
Do this instead: if form.accepts(request.vars, session): return len(request.vars.field) I am not sure whether this should be considered a bug since the process of supporting multiple fields with the same name is only supported for checkboxes. I will look into this some more anyway. I s

[web2py:21880] Re: Is there a way to set attributes of a field on model?

2009-05-14 Thread Steve Shepherd
While we are talking about this topic. Is it appropriate to be able to put calculated fields into the model. ie SQLFIELD('totalprice',eval('quantity * price')) or something. This way we can simply call these calculated fields in our views or selects. I realise the selects would be harder as thes

[web2py:21881] Re: bug in form behavior?

2009-05-14 Thread mgbeli...@gmail.com
Thanks massimo. At your convenience of course. I will usually give different names, but the identical field names helped me out in this app https://www.lemurstrikes.com/portfolio/default/sudoku right here. By the way, I'll be adding my first app to the KPAX app list here soon. -Matt B. --~--~-

[web2py:21882] Re: Lighttpd streaming limitations?

2009-05-14 Thread Richard
hmm, it is set properly. Soon I will be transferring to a Linux/Apache server so hopefully the problem goes away. Richard On May 15, 12:27 pm, mdipierro wrote: > not if the content-length header is set properly. > > Massimo > > On May 14, 7:45 pm, Richard wrote: > > > the data is in the body b

[web2py:21883] Re: Lighttpd streaming limitations?

2009-05-14 Thread mdipierro
Can you also try using the provided wsgiserver? Which python version are you using? Massimo On May 15, 12:54 am, Richard wrote: > hmm, it is set properly. > Soon I will be transferring to a Linux/Apache server so hopefully the > problem goes away. > Richard > > On May 15, 12:27 pm, mdipierro

[web2py:21884] Re: Importing modules from controller folder

2009-05-14 Thread mdipierro
Hi voltron. was this resolved? Glad to have you back from php. ;-) On May 14, 7:38 pm, Mark Larsen wrote: > > /controlllers > >              /forms/__init__ > >              /forms/ reg_form.py > > You are missing .py on the __init__, was that a typo? > > > import forms.reg_form ### ERROR > > S

[web2py:21885] Re: new scaffolding app?

2009-05-14 Thread mdipierro
Yes http://www.w3.org/1999/xhtml"; xml:lang="{{=T.accepted_language or 'en'}}"> will post tomorrow. Massimo On May 14, 7:40 pm, Álvaro Justen [Turicas] wrote: > Two issues: > > 1- Character encoding: I see "Olá Mundo" instead of "Olá Mundo". > 2- Language in HTML: this page is translated (th

[web2py:21886] Re: Is there a way to set attributes of a field on model?

2009-05-14 Thread mdipierro
I do not like this notation but some time ago Robin proposed allowing funcitons to be passed to default and update SQLField('totalprice',default=lambda record: record.quantity*record.price) This is actually easy and I could implement it tomorrow. I will think about your other proposal. My first

[web2py:21887] Re: Can't get web2py to run as Windows service

2009-05-14 Thread weheh
Iceberg mentions: On May 7, 10:12 am, Iceberg wrote: > So the following trick might be worth looking at. I build another > web2py.exe by py2exe, to hide the web2py.exe 's console when running. > In this way, it runs almost like a background service, yet you can > still control the web2py runnin