[web2py:12549] Re: create a drop down list in form

2008-11-26 Thread somebody
in normal FORM not SQLFORM --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to [EM

[web2py:12548] Re: create a drop down list in form

2008-11-26 Thread somebody
in normal FORM not SLQFORM --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to [EMAI

[web2py:12547] create a drop down list in form

2008-11-26 Thread somebody
Is it possible to create a drop down list which listed sql value in form without any button.. jus pure drop down list.. i have a a drop down list but do not know for what reason there is a summit button which i do not want.. thanks --~--~-~--~~~---~--~~ You receiv

[web2py:12546] Re: input type

2008-11-26 Thread somebody
so i cannot choose my own directory to save my file.. ok --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe fro

[web2py:12545] t2 static and wsgi

2008-11-26 Thread Wes James
I finally got wsgi working (osx 10.5) and wanted to mention that the t2 static pages work fine with wsgi vs, with mod_rewrite I had to create a folder under apache root docs with t2 statics. I like wsgi better :) -wj --~--~-~--~~~---~--~~ You received this messag

[web2py:12544] Re: input type

2008-11-26 Thread mdipierro
if you just say form=FORM(INPUT(_type='file',_name='data',requires=IS_NOT_EMPTY ()),INPUT(_type='submit')) if form.accept(request,vars,session): filename=form.vars.data.filename data=form.vars.data.read() # do what you want with it if you use form=SQLFORM or form=form_factory is h

[web2py:12543] input type

2008-11-26 Thread somebody
input type "file" is to choose a file to be uploaded then wad input type is used to select a directory where a file wan tto be saved to? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" g

[web2py:12542] Re: non-ascii chars URL

2008-11-26 Thread mdipierro
I am not sure. This needs a lot of testing. On Nov 26, 10:00 pm, "jessinio liang" <[EMAIL PROTECTED]> wrote: > On Thu, Nov 27, 2008 at 11:55 AM, mdipierro <[EMAIL PROTECTED]> wrote: > > > The question is: > > > Assume a url likehttp://hostname/app/default/action/data > > > and data is in unicode

[web2py:12541] Re: non-ascii chars URL

2008-11-26 Thread jessinio liang
On Thu, Nov 27, 2008 at 11:55 AM, mdipierro <[EMAIL PROTECTED]> wrote: > > The question is: > > Assume a url like http://hostname/app/default/action/data > > and data is in unicode and passes validation. > is it safe to open(data,'r') ? i change the path( string object ) to unicode before rege

[web2py:12540] Re: non-ascii chars URL

2008-11-26 Thread mdipierro
The question is: Assume a url like http://hostname/app/default/action/data and data is in unicode and passes validation. is it safe to open(data,'r') ? On Nov 26, 9:41 pm, "jessinio liang" <[EMAIL PROTECTED]> wrote: > 2008/11/27 mdipierro <[EMAIL PROTECTED]> > > > > > Thank you Jessinio, > >

[web2py:12539] Re: help please...

2008-11-26 Thread mdipierro
In two weeks they will be merged into one app with lots of new features. On Nov 26, 9:39 pm, Zoom.Quiet <[EMAIL PROTECTED]> wrote: > 2008/11/27 Zoom. Quiet <[EMAIL PROTECTED]>:> 2008/11/27 mdipierro <[EMAIL > PROTECTED]>: > > >> If you asked a question and you found an useful answer (posted by m

[web2py:12538] Re: non-ascii chars URL

2008-11-26 Thread jessinio liang
2008/11/27 mdipierro <[EMAIL PROTECTED]> > > Thank you Jessinio, > > could you please email me the patch as an attachment? I cannot read it > properly. > > Does anybody have any objection to this patch? sorry , i don't know , i know it work well (^_^) see diff file attachment -- 身体是革命的本钱

[web2py:12537] Re: help please...

2008-11-26 Thread Zoom . Quiet
2008/11/27 Zoom. Quiet <[EMAIL PROTECTED]>: > 2008/11/27 mdipierro <[EMAIL PROTECTED]>: >> >> If you asked a question and you found an useful answer (posted by me >> or not), please create an entry about it on AlterEgo. >> >> http://mdp.cti.depaul.edu/AlterEgo/default/add >> > COOL! web2py Knowledg

[web2py:12536] Re: help please...

2008-11-26 Thread Zoom . Quiet
2008/11/27 mdipierro <[EMAIL PROTECTED]>: > > If you asked a question and you found an useful answer (posted by me > or not), please create an entry about it on AlterEgo. > > http://mdp.cti.depaul.edu/AlterEgo/default/add > COOL! web2py KnowledgeBase! we try collection us experience into > We are

[web2py:12535] help on something else

2008-11-26 Thread mdipierro
There is a serious possibility the web2py will be used for the registration at PyCon 2009. Could you please try use the beta site and send me some feedback? https://mdp.cti.depaul.edu/web2conf The source code is on launchpad (web2conf) https://code.launchpad.net/~mdipierro/web2conf/deve

[web2py:12534] help please...

2008-11-26 Thread mdipierro
If you asked a question and you found an useful answer (posted by me or not), please create an entry about it on AlterEgo. http://mdp.cti.depaul.edu/AlterEgo/default/add We are working to move to a better system. Massimo --~--~-~--~~~---~--~~ You received this me

[web2py:12533] Re: non-ascii chars URL

2008-11-26 Thread mdipierro
Thank you Jessinio, could you please email me the patch as an attachment? I cannot read it properly. Does anybody have any objection to this patch? Massimo On Nov 26, 8:00 pm, jessinio <[EMAIL PROTECTED]> wrote: > my project want web2py support non-ascii char URL, example: > > http://127.0.0.1

[web2py:12532] non-ascii chars URL

2008-11-26 Thread jessinio
my project want web2py support non-ascii char URL, example: http://127.0.0.1:8000/welcome/default/index/中国 because the URL have chinese's char , so web2py will report : Invalid request resolve: edit gluon/main.py file, diff output: 39c39 < regex_url=re.compile('(?:^$)|(?:^\w+/?$)|(?:^\w+/\w+/

[web2py:12531] Re: Field alias

2008-11-26 Thread mdipierro
You can since 1.49 >>> db=SQLDB() >>> db.define_table('t',SQLField('a','integer'),SQLField('b','integer')) >>> db.t.insert(a=2,b=3) 1 >>> db.t.insert(a=3,b=7) 2 >>> shortname=db.t.a.sum()+db.t.b.sum() >>> rows=db(db.t.id>0).select(shortname) >>> print rows[0]._extra[shortname] 15 On Nov 26, 7:55

[web2py:12530] Field alias

2008-11-26 Thread Tari
I thought I'd go ahead and ask, and stop googling in vain... Is there a way to rename a field in a select, e.g. as in "SELECT SUM(column1) + SUM(column2) AS shortname ..." Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

[web2py:12529] Re: manual

2008-11-26 Thread Zoom . Quiet
China 中国 ;-) 2008/11/26 Massimo Di Pierro <[EMAIL PROTECTED]>: > > In which country are you? > > Massimo > -- http://zoomquiet.org''' 过程改进乃是催生可促生靠谱的人的组织! PE keeps evolving organizations which promoting people be good!''' [HR]金山软件常年招聘大量Py/C++人才! https://groups.google.com/group/python-cn/web/ot-

[web2py:12528] Re: Join + Update a field

2008-11-26 Thread Tito Garrido
Thank you Massimo. On Wed, Nov 26, 2008 at 10:17 PM, mdipierro <[EMAIL PROTECTED]> wrote: > > You cannot update the result of a JOIN. > > On Nov 26, 5:55 pm, "Tito Garrido" <[EMAIL PROTECTED]> wrote: > > Hey DenisL, > > > > What about the update method? > > db((db.character.id==1)&(db.character.i

[web2py:12527] Re: manual

2008-11-26 Thread Tito Garrido
Brazil :) On Wed, Nov 26, 2008 at 10:29 AM, Massimo Di Pierro <[EMAIL PROTECTED] > wrote: > > In which country are you? > > Massimo > > > > -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ --~--~-~--~~~---~--~~ Y

[web2py:12526] Re: Join + Update a field

2008-11-26 Thread mdipierro
You cannot update the result of a JOIN. On Nov 26, 5:55 pm, "Tito Garrido" <[EMAIL PROTECTED]> wrote: > Hey DenisL, > > What about the update method? > db((db.character.id==1)&(db.character.id > ==db.characterHasAttribute.id_character)&(db.characterHasAttribute.id_attribute==3)).update(characterH

[web2py:12525] Re: Join + Update a field

2008-11-26 Thread Tito Garrido
Hey DenisL, What about the update method? db((db.character.id==1)&(db.character.id ==db.characterHasAttribute.id_character)&(db.characterHasAttribute.id_attribute==3)).update(characterHasAttribute.total_value=2) Doesn't work... On Wed, Nov 26, 2008 at 10:36 AM, Tito Garrido <[EMAIL PROTECTED]>wr

[web2py:12524] Re: initial table data ?

2008-11-26 Thread achipa
...another issue is that you cannot delete all the rows from such table as you will trigger the defaults reload. On Nov 21, 7:45 pm, achipa <[EMAIL PROTECTED]> wrote: > Yes, I use something similar ATM, but I'm concerned about the overhead > if you have a large number of tables... > > On Nov 21,

[web2py:12523] Re: How to download archive dumps?

2008-11-26 Thread Snaky Love
Hi, well, I am waiting for an answer in Google Groups Help forum, maybe they have a tip. If they do not come up with something, maybe anybody here would be able to upload the archive to some place? BTW would be a good enhancement for Google Groups: automatic upload monthly mail archive to "files"

[web2py:12522] Re: form validation

2008-11-26 Thread DenesL
mmstud, you can do: if request.vars.a: db.t.b.requires=IS_NOT_EMPTY() before you create the form in the controller. On Nov 26, 8:02 am, mmstud <[EMAIL PROTECTED]> wrote: > How would you do such a validation, that when one field is filled, for > should check, that another field is filled als

[web2py:12521] Re: How to download archive dumps?

2008-11-26 Thread mdipierro
Good point. That would be useful but I cannot find any way to do it from the google groups management interface. Massimo On Nov 26, 9:43 am, Snaky Love <[EMAIL PROTECTED]> wrote: > Hi, I am just digging into web2py - what I see now is really very > exciting! > > I would like to download the grou

[web2py:12520] Re: Date

2008-11-26 Thread mdipierro
you can either set a value of response.message in the if accepts(...) or you can do {{=response.message or "Say something here"}} On Nov 26, 10:22 am, annet <[EMAIL PROTECTED]> wrote: > Massimo, > > I am afraid, I did not fully understand your former reply then. > > This is t

[web2py:12519] Re: UTF-8 strings are truncated?

2008-11-26 Thread mdipierro
patch in trunk! Thanks Sergey On Nov 26, 9:48 am, SergeyPo <[EMAIL PROTECTED]> wrote: > This worked: > > ur=unicode(r,'utf8') > if len(ur)>truncate: r=ur[:truncate-3].encode('utf8') + '...' > > Thank you! > > On Nov 26, 6:18 pm, mdipierro <[EMAIL PROTECTED]> wrote: > > > It is a bug in the sense

[web2py:12518] How to download archive dumps?

2008-11-26 Thread Snaky Love
Hi, I am just digging into web2py - what I see now is really very exciting! I would like to download the group archives, but I could not find a way to do it... isn´t there a tar.gz mbox file or anything similar to download anywhere? That would help very much understanding past discussions. Thank

[web2py:12517] Re: Date

2008-11-26 Thread annet
Massimo, I am afraid, I did not fully understand your former reply then. This is the controller: def byplace(): response.view='clubs/view.html' response.functionname=T('Club locator op plaats') form=FORM('Type een plaatsnaam:', INPUT(_name='plaatsnaam',requires=IS_NOT_EMPTY(

[web2py:12515] Re: your recommended way of calling controllers from the command line ?

2008-11-26 Thread Yarko
Hi Jonathan - Could you write this up? Some (me?!) might find it interesting / useful. Thank you. Yarko -Original Message- From: Jonathan Benn <[EMAIL PROTECTED]> Sent: Wednesday, November 26, 2008 6:55 AM To: web2py Web Framework Subject: [web2py:12499] Re: your recommended way of

[web2py:12516] Re: UTF-8 strings are truncated?

2008-11-26 Thread SergeyPo
This worked: ur=unicode(r,'utf8') if len(ur)>truncate: r=ur[:truncate-3].encode('utf8') + '...' Thank you! On Nov 26, 6:18 pm, mdipierro <[EMAIL PROTECTED]> wrote: > It is a bug in the sense that the utf8 is truncated while it should be > converted to unicode, then truncated. > This line in glu

[web2py:12514] Re: UTF-8 strings are truncated?

2008-11-26 Thread mdipierro
It is a bug in the sense that the utf8 is truncated while it should be converted to unicode, then truncated. This line in gluon/sqlhtml.py needs to be fixed: if len(r)>truncate: r=r[:truncate-3]+'...' perhaps replace by ur=unicode(r,'utf8) if len(

[web2py:12513] Re: Date

2008-11-26 Thread mdipierro
It should not display none because of {{ if not clubs:}} {{}} No clubs {{else:}} {{}} and you can customize the message. Massimo On Nov 26, 8:59 am, annet <[EMAIL PROTECTED]> wrote: > One more question on this topic: > >

[web2py:12512] Re: FORM and

2008-11-26 Thread mdipierro
FROM is just a helper (makes ...) and it is not much smarter than that. You can use form_factory or options=[OPTION(k,_value=v) for v,k in db.training.training.options()] > form=FORM('Type een plaatsnaam:', > INPUT(_name='plaatsnaam',requires=IS_NOT_EMPTY()), > 'Selecteer een act

[web2py:12511] Re: UTF-8 strings are truncated?

2008-11-26 Thread SergeyPo
Here is a screenshot: http://zarealye.com/snapshot.jpg Here I try to use flexigrid but the same happens with web2py db administration page. You will see black diamonds with questionmark... These are Russian strings (UTF-8) truncated. Is it possible to increase the length? Is there not a bug in utf

[web2py:12510] Re: Date

2008-11-26 Thread annet
One more question on this topic: The code above works fine, however, when there are no matching records in the database the word 'none' appears where normally the table displays the resulting records. I would like a message to appear telling the visitor that there are no records in the database t

[web2py:12508] winpdb

2008-11-26 Thread mdipierro
Has anybody tried winpdb with web2py? Massimo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group,

[web2py:12509] FORM and

2008-11-26 Thread annet
In a controller I have got the following code to build a form: form=FORM('Type een plaatsnaam:', INPUT(_name='plaatsnaam',requires=IS_NOT_EMPTY()), 'Selecteer een activiteit:' SELECT(_name='training',requires=IS_IN_DB (db,'training.training','%(training)s')), INPUT

[web2py:12507] Re: UTF-8 strings are truncated?

2008-11-26 Thread mdipierro
Can you show us a screen shot to make sure I understand? It is true that SQLTABLE (on purpose) truncates strings to a fix number of characters. Perhaps this is your problem. If you need a table that displays long string you should make your own table {{ for row in db().select(db.data_storage

[web2py:12506] UTF-8 strings are truncated?

2008-11-26 Thread SergeyPo
Hello Group! When I do in controller: table=SQLTABLE(db().select(db.data_storage.ALL, limitby=(0,20)), _class='flexit', _width='100%') return dict(table = table) strings that are in database (utf-8 coded) are displayed truncated : part of the string, than question mark in diamond symbol

[web2py:12505] Re: multi db.table.field support

2008-11-26 Thread mdipierro
If I understand, you can already what you suggest. db.define_table('t',SQLField('a')) form=SQLFORM(db.t) in view: {{if form.errors.a:}} {{=form.errors.a}}{{pass}} On Nov 26, 7:10 am, mmstud <[EMAIL PROTECTED]> wrote: > Do you think it would be possible and not too much work to do such a

[web2py:12504] Re: Join + Update a field

2008-11-26 Thread Tito Garrido
Oh, thanks DenesL. I did a dir(new) but I didn't notice that :) Thanks! On Tue, Nov 25, 2008 at 10:27 PM, DenesL <[EMAIL PROTECTED]> wrote: > > Tito, > > change: > new.update_record(characterHasAttribute.total_value=2) > > to: > new.characterHasAttribute.update_record(total_value=2) > > Do a dir

[web2py:12503] Re: form validation

2008-11-26 Thread mdipierro
something like this db.define_table('t','SQLField('a'),SQLField('b')) db.t.a.requires=IS_NOT_EMPTY() db.t.b.requires=IS_EXPR('value==%s' % repr(request.vars.a)) a,b have to be not null and the same. On Nov 26, 7:02 am, mmstud <[EMAIL PROTECTED]> wrote: > How would you do such a validation, that

[web2py:12502] manual

2008-11-26 Thread Massimo Di Pierro
In which country are you? Massimo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email

[web2py:12501] multi db.table.field support

2008-11-26 Thread mmstud
Do you think it would be possible and not too much work to do such a form checker, that takes field names like: and does automatic value population, submit validation, perhaps even insert/update with those fields? Is there somekind of connection pool, that could be used to pass to form creat

[web2py:12500] form validation

2008-11-26 Thread mmstud
How would you do such a validation, that when one field is filled, for should check, that another field is filled also? That means one field is dependent on another field. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

[web2py:12499] Re: your recommended way of calling controllers from the command line ?

2008-11-26 Thread Jonathan Benn
Hi Achipa, On Nov 25, 1:55 pm, achipa <[EMAIL PROTECTED]> wrote: > The subject says it all. I know a couple of methods (python -R > wrapper, the older -S patch, piping, etc), but was wondering which you > think is the cleanest (and cross platform) as I'd like to integrate it > into my cron patch

[web2py:12498] Re: PDF manual on Lulu downloaded fine...

2008-11-26 Thread achipa
I must be off of this Earth. It does not have my country in the list :S On Nov 26, 12:09 pm, Coalescence <[EMAIL PROTECTED]> wrote: > Bought this the other day > > Liking it already! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[web2py:12497] Re: PDF manual on Lulu downloaded fine...

2008-11-26 Thread Coalescence
Bought this the other day Liking it already! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group,