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.
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
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
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
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.
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
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
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,
#
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
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
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
.
>
> 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
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(
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:
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
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
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
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
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' ?
--~--~-~--~~~
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:
>
> /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
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";
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
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
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
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
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?
>
>
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',
>
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
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
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.
--~--~-
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
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
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
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
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
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
37 matches
Mail list logo