[web2py] book chapters

2010-03-23 Thread mdipierro
If you make a major contribution to the book (like a new section), you should sign it with your name. This is because if I incorporate the chapter in a future printed version, I will want to acknowledge your contribution. The changelog may give me your email address but not the name you want me to

[web2py] Re: Python 2.4 compatibility issues

2010-03-23 Thread mdipierro
fixed On Mar 23, 10:26 pm, "mr.freeze" wrote: > In appadmin.html > > line 75 change this: >       {{cond = '!=""' if table[fieldname].type in ['string','text'] > else '>0'}} > to this: >       {{cond = '>0'}} >       {{if table[fieldname].type in ['string','text']:}} >       {{cond = '!=""'}} >  

[web2py] Re: Python 2.4 compatibility issues

2010-03-23 Thread mr.freeze
In appadmin.html line 75 change this: {{cond = '!=""' if table[fieldname].type in ['string','text'] else '>0'}} to this: {{cond = '>0'}} {{if table[fieldname].type in ['string','text']:}} {{cond = '!=""'}} {{pass}} line 95 do the same thing. On Mar 23, 10:10 pm, m

[web2py] Re: using syslog from a web2py app

2010-03-23 Thread mdipierro
You can redefine response._caller= lambda a: a() but that only wraps controllers, not views. On Mar 23, 10:07 pm, Jonathan Lundell wrote: > I'd like to use syslog from my > app. However, it's a .so on my system, so I can't see what it is and how it

[web2py] Re: Python 2.4 compatibility issues

2010-03-23 Thread mdipierro
Yes. Please report them. This was tested once but somethink may have slipped is with patches On Mar 23, 10:01 pm, "mr.freeze" wrote: > Are we aiming to be 2.4 compatible? There are several more problems > that I've found but I won't worry about it if not. > > On Mar 23, 6:41 pm, "mr.freeze" wrot

[web2py] using syslog from a web2py app

2010-03-23 Thread Jonathan Lundell
I'd like to use syslog from my app. However, it's a .so on my system, so I can't see what it is and how it works, exactly. So my question is: If I open syslog and use it, and don't close it, will it get closed when my controller exits and the object

[web2py] Re: Python 2.4 compatibility issues

2010-03-23 Thread mr.freeze
Are we aiming to be 2.4 compatible? There are several more problems that I've found but I won't worry about it if not. On Mar 23, 6:41 pm, "mr.freeze" wrote: > On python 2.4, I had to make these changes to tools.py to get web2py > running: > > line 2562: > > Before: > data = data if

[web2py] Re: Survey: Functionality of the Drop Boxes widget

2010-03-23 Thread mdipierro
Fixed text cannot be set by default, because default is set outside the app and therefore would not be internationalized. On Mar 23, 7:24 pm, Alex Fanjul wrote: > Sorry, maybe I come late, but the best default option for me is: > > "Please choose an option" at the first place, with null or empty

[web2py] Re: Displaying Foreign Key

2010-03-23 Thread mdipierro
No joins on gae. On Mar 23, 6:12 pm, Al wrote: > Would this work in GAE which does not handle table join? or the DAL > automatically handle this for you? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web.

[web2py] Re: clueless about db insert: IntegrityError: participant.type may not be NULL

2010-03-23 Thread mdipierro
On Mar 23, 5:49 pm, Sven wrote: > Thanks! Adding the field as invisible works. But I prefer to dump - > drop - create - restore approach. After fiddling around I have two > questions about that though > > 1) Why can I see the db object with corresponding tables in shell, but > not access the dat

Re: [web2py] web2py production deployment on vps.net (VIDEO)

2010-03-23 Thread Álvaro Justen [Turicas]
On Tue, Mar 23, 2010 at 12:49, mdipierro wrote: > The video: > >    http://vimeo.com/10377947 > > Please use this link below to sign up for vps.net. > >   http://www.vps.net/?bid=190&aid=CD3792&opt= > > If you want to use vps.net, by using the link to register you will be > making a zero cost dona

Re: [web2py] web2py production deployment on vps.net (VIDEO)

2010-03-23 Thread Tiago Almeida
The video is great and the deployment process is braindead simple. Awesome. Thanks! :) Keep up the good work. Tiago - On Tue, Mar 23, 2010 at 3:49 PM, mdipierro wrote: > The video: > >http://vimeo.com/10377947 > > Please use this link below to sign up for vps.net. > > http://www.vps.n

Re: [web2py] web2py production deployment on vps.net (VIDEO)

2010-03-23 Thread Alex Fanjul
Of course you dont avoid the "selfcertificate" warning El 24/03/2010 1:46, Alex Fanjul escribió: Massimo, If Im not wrong you should put your real hostname (myvps.example.com) in the "Common Name" field of the selfsign certificate to avoid certificate errors refering to incorrect domain ce

Re: [web2py] web2py production deployment on vps.net (VIDEO)

2010-03-23 Thread Alex Fanjul
Massimo, If Im not wrong you should put your real hostname (myvps.example.com) in the "Common Name" field of the selfsign certificate to avoid certificate errors refering to incorrect domain certificate association alex El 23/03/2010 16:49, mdipierro escribió: The video: http://vim

Re: [web2py] Survey: Functionality of the Drop Boxes widget

2010-03-23 Thread Alex Fanjul
Sorry, maybe I come late, but the best default option for me is: "Please choose an option" at the first place, with null or empty value associate. Even better if we can customize the text like: "Please choose your country", "Please choose your gender", etc. Of course we should be able to valid

[web2py] Python 2.4 compatibility issues

2010-03-23 Thread mr.freeze
On python 2.4, I had to make these changes to tools.py to get web2py running: line 2562: Before: data = data if data is None else urllib.urlencode(data) After: if data !=None: data = urllib.urlencode(data) --

[web2py] Re: Displaying Foreign Key

2010-03-23 Thread Al
Would this work in GAE which does not handle table join? or the DAL automatically handle this for you? -- 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,

[web2py] Re: clueless about db insert: IntegrityError: participant.type may not be NULL

2010-03-23 Thread Sven
Thanks! Adding the field as invisible works. But I prefer to dump - drop - create - restore approach. After fiddling around I have two questions about that though 1) Why can I see the db object with corresponding tables in shell, but not access the database behind it? (ProgrammingError: Cannot ope

[web2py] Re: jqGrid plugin + ajax search and pagination + ui themes

2010-03-23 Thread Yarko Tymciurak
This _is_ nice; looking at source of some of the examples, I see stuff that looks like webpy templating in setup, so the challenge will be to keep it clear which parts are client-dynamic, and which parts should be served by the server (i.e. static within a view)... I want to play with this one! ;

[web2py] Re: Displaying Foreign Key

2010-03-23 Thread Greg
Ah, very simple. Thanks, guys. P.S. It's a good thing web2py makes it easy to rename tables. :) On Mar 22, 6:07 pm, mdipierro wrote: > You can just replace > > {{=event.room_id}} > > with > > {{=event.room_id.name}} > > This will result in one extra select per record. > > You can also use a joi

[web2py] Re: Mercurial or Bazaar?

2010-03-23 Thread Yarko Tymciurak
On Mar 23, 8:36 am, mdipierro wrote: > They are clones of each other but I'd like to stop mantaining the > bazaar one. It would be good to update the main page, and put a note on the branches... Also, since people will find launchpad of web2py, the links (which now still go the depaul.edu subd

[web2py] Re: Survey: Functionality of the Drop Boxes widget

2010-03-23 Thread Yarko Tymciurak
On Mar 23, 4:22 am, Thadeus Burgess wrote: > It is not so trivial to search and replace. For one, you cannot place > keyword arguments before non-keyword args. So it is not a simple > matter of find/replace IS_IN_SET(... with IS_IN_SET(zero=None..., > there will have to be parsing of the syntax to

[web2py] Re: joins, geraldo and possible alias

2010-03-23 Thread jonatron
I get the following: SELECT Calls.id, Calls.CallerName, Calls.CreatedBy, Calls.HandledBy, Users.Name, Users.Name FROM Users, Calls LEFT JOIN Users AS created_by ON created_by.id=Calls.CreatedBy LEFT JOIN Users AS handled_by ON handled_by.id=Calls.HandledBy WHERE Calls.id>0; On Mar 23, 6:06 pm, md

[web2py] Re: Debian / Ubuntu packager needed!

2010-03-23 Thread Mark Breedveld
i'm looking forward to your design plan. It sounds good and i'm confident that it will. regards Mark Breedveld, On Mar 23, 7:47 pm, mdipierro wrote: > I understand. You do not have to develop the all thing. Can you show a > pseudcode example of what the script would do? > > On Mar 23, 1:40 pm,

[web2py] Re: for testers

2010-03-23 Thread mdipierro
the problem with web2py.exe -h not printing has been resolved. On Mar 22, 4:11 pm, mdipierro wrote: > http://web2py.com/examples/static/nightly/web2py_src.ziphttp://web2py.com/examples/static/nightly/web2py_win.ziphttp://web2py.com/examples/static/nightly/web2py_osx.zip > > It is not yet complete

[web2py] Re: Debian / Ubuntu packager needed!

2010-03-23 Thread mdipierro
I understand. You do not have to develop the all thing. Can you show a pseudcode example of what the script would do? On Mar 23, 1:40 pm, Dima Barsky wrote: > On Mar 23, 6:00 pm, mdipierro wrote: > > > I do not have any object. I think I need more details to understand it > > better. I think you

[web2py] Re: MySQL server has gone away

2010-03-23 Thread mdipierro
For now do this: try: db=DAL("mysql://a:b...@localhost/c", pool_size=5) except: db=DAL("mysql://a:b...@localhost/c", pool_size=5) It should fix the probelm. If not, set pool_size=0 in the second call. On Mar 23, 1:40 pm, David Zejda wrote: > Hi Massimo, please, were you able to look at

[web2py] Re: Debian / Ubuntu packager needed!

2010-03-23 Thread Dima Barsky
On Mar 23, 6:00 pm, mdipierro wrote: > I do not have any object. I think I need more details to understand it > better. I think you should give it a shot and we'll see later if we > find any problem. I'm not very happy about this, I would prefer to reach an agreement before I start. I would not w

[web2py] Re: MySQL server has gone away

2010-03-23 Thread David Zejda
Hi Massimo, please, were you able to look at it? I'm getting the same error relatively often, several times a day one a site with about 1 daily requests. Thanks :) David On Feb 23, 9:31 am, mdipierro wrote: > will look into this. -- You received this message because you are subscribed to t

[web2py] Re: joins, geraldo and possible alias

2010-03-23 Thread mdipierro
hmmm. it could be a bug. What do you get if you do: print db(db.Calls.id>0)._select(db.Calls.ALL,db.created_by.name,db.handled_by.name, left=[created_by.on(created_by.id==db.Calls.CreatedBy), handled_by.on(handled_by.id==db.Calls.HandledBy)]) On Mar 23, 11:31 am, jonatron wrote: >

[web2py] Re: joins, geraldo and possible alias

2010-03-23 Thread jonatron
Thanks, This is close, but it does not quite get the result I'm looking for, I basically need the following MySQL query: SELECT Calls . * , created_by.Name, handled_by.Name FROM ( Calls LEFT JOIN Users AS created_by ON Calls.CreatedBy = created_by.ID ) LEFT JOIN Users AS handled_by ON Calls.Handl

[web2py] Re: get value of an combo box (select tag)

2010-03-23 Thread mdipierro
Sorry. can you explain more in detail? On Mar 23, 10:33 am, tandnk50 wrote: > I write a combo box to select all table in the database > I want to get tabe name after select > I could get the table name if i use form to click submit button, > but now I want get table without form?? > > in sectionh

[web2py] Re: Debian / Ubuntu packager needed!

2010-03-23 Thread mdipierro
I do not have any object. I think I need more details to understand it better. I think you should give it a shot and we'll see later if we find any problem. On Mar 23, 12:37 pm, Dima Barsky wrote: > > I am not sure I understand. If I understand you are proposing: > > > 1) installing web2py into /

[web2py] Re: jqGrid plugin + ajax search and pagination + ui themes

2010-03-23 Thread mdipierro
nice On Mar 23, 12:09 pm, dspiteself wrote: > I have been using another jquery grid. look at how custimizable the > formatters and editors are. Would anyone be interested in us making a > web2py plugin for it? If so what type of api should be supported. My > current version does ajax add edit and

Re: [web2py] Re: Debian / Ubuntu packager needed!

2010-03-23 Thread Dima Barsky
> I am not sure I understand. If I understand you are proposing: > > 1) installing web2py into /usr/ as it (it will not run there) > 2) provide a script to allow users to make a copy of what is needed > for runtime (inluding applications/) > 3) allow the user to run from the folder where files ha

[web2py] Re: jqGrid plugin + ajax search and pagination + ui themes

2010-03-23 Thread dspiteself
I have been using another jquery grid. look at how custimizable the formatters and editors are. Would anyone be interested in us making a web2py plugin for it? If so what type of api should be supported. My current version does ajax add edit and load from a specific web2py model, but I could gener

[web2py] Re: get value of an combo box (select tag)

2010-03-23 Thread tandnk50
I write a combo box to select all table in the database I want to get tabe name after select I could get the table name if i use form to click submit button, but now I want get table without form?? in section http://web2py.com/book/default/section/5/2, OPTION, SELECT information is not enough for

[web2py] web2py production deployment on vps.net (VIDEO)

2010-03-23 Thread mdipierro
The video: http://vimeo.com/10377947 Please use this link below to sign up for vps.net. http://www.vps.net/?bid=190&aid=CD3792&opt= If you want to use vps.net, by using the link to register you will be making a zero cost donation. -- You received this message because you are subscribed

[web2py] Re: Debian / Ubuntu packager needed!

2010-03-23 Thread mdipierro
I am not sure I understand. If I understand you are proposing: 1) installing web2py into /usr/ as it (it will not run there) 2) provide a script to allow users to make a copy of what is needed for runtime (inluding applications/) 3) allow the user to run from the folder where files have been copie

[web2py] Re: for testers

2010-03-23 Thread mdipierro
and it is better but we also need to test the binaries sometimes. On Mar 23, 9:19 am, Albert Abril wrote: > I like to download the dev from mercurial repos, it's more comfortable. > Maybe it's because the habit. > > On Mon, Mar 22, 2010 at 10:11 PM, mdipierro wrote: > >http://web2py.com/examples

[web2py] Re: Debian / Ubuntu packager needed!

2010-03-23 Thread Dima Barsky
Hi Mark, > And I want to make a clear separation in the repo. > Web2py applications for production use are put in the usr folder. >   And copied and protected by a startup script. >   For example you could take the write right from /controllers/models/views >   And store static and upload under

Re: [web2py] Re: href not being rendered

2010-03-23 Thread Jonathan Lundell
On Mar 23, 2010, at 7:40 AM, mdipierro wrote: > I do not think this is the problem. He does not seem to be using the > A(...) helper. Good point; my confusion. OK, then, how about this. If the "link reads like" text is literally true (that is, we're looking at the display text, not the source t

Re: [web2py] Re: proposal: admin-less ticket support

2010-03-23 Thread Jonathan Lundell
On Mar 23, 2010, at 6:00 AM, selecta wrote: > I wrote an issue tracker plugin that can do some of the things (except > for deleting all tickets and downloading) > also tickets are displayed a little different, sorted by number of > error appearance and stacktrace only > if you are interested I cou

[web2py] Re: href not being rendered

2010-03-23 Thread mdipierro
I do not think this is the problem. He does not seem to be using the A(...) helper. On Mar 23, 9:16 am, Jonathan Lundell wrote: > On Mar 23, 2010, at 1:32 AM, annet wrote: > > > In a send_mail.html view I have a link which reads like: > > > Having trouble viewing this email? > href="{{=URL(r=req

[web2py] Re: clueless about db insert: IntegrityError: participant.type may not be NULL

2010-03-23 Thread mdipierro
Because you used sqlite and your made the field "type" as notnull=True. sqlite does not support ALTER TABLE DROP COLUMN so the field is still there. I suggest you dump the dump the db, recerate it and restore the dump or add the field again as invisible (not sure if this will work, give it a try):

Re: [web2py] for testers

2010-03-23 Thread Albert Abril
I like to download the dev from mercurial repos, it's more comfortable. Maybe it's because the habit. On Mon, Mar 22, 2010 at 10:11 PM, mdipierro wrote: > http://web2py.com/examples/static/nightly/web2py_src.zip > http://web2py.com/examples/static/nightly/web2py_win.zip > http://web2py.com/examp

Re: [web2py] href not being rendered

2010-03-23 Thread Jonathan Lundell
On Mar 23, 2010, at 1:32 AM, annet wrote: > In a send_mail.html view I have a link which reads like: > > Having trouble viewing this email? href="{{=URL(r=request,c='clublocatormail',f='browser_version',args=[item.bedrijf])}}" > target="_blank">View it in your browser > > When I send the mail a

[web2py] clueless about db insert: IntegrityError: participant.type may not be NULL

2010-03-23 Thread Sven
Hi, I am new to web2py and really like it so far. I just ran into trouble though, and can't find the solution myself. The error message is: "IntegrityError: participant.type may not be NULL" as a result of calling: "db.participant.insert(unique_ref=ref, batch_type=session.batch_type, batch_name=

[web2py] Re: Mercurial or Bazaar?

2010-03-23 Thread mdipierro
They are clones of each other but I'd like to stop mantaining the bazaar one. On Mar 23, 4:50 am, "Giovanni Giorgi" wrote: > hi all, >  I have seen there are two web2pty repositories: one based on mercurial > and one based on bazaar. > Which is the "official" one? > > By the way, I have tried bot

[web2py] Re: Can't use placeholders when calling stored procedure in DB2

2010-03-23 Thread mdipierro
will do. On Mar 23, 4:12 am, Alexey Nezhdanov wrote: > Problem: > > (Pdb) print db2db.executesql("call webxdsl.abonsearch (123, 'port_id', > '41110', '1', ?, ?);") > *** Error: ('07001', '[07001] [IBM][CLI Driver] CLI0100E  Wrong number of > parameters. SQLSTATE=07001 (-9) (SQLExecDirectW)')

[web2py] Re: How to call other web2py applications from within a web2py application

2010-03-23 Thread mdipierro
1) http://web2py.com/plugins/default/jqgrid 2) I suggest using reportlab+platypus On Mar 23, 2:23 am, Rahul wrote: > Hi All, >        I used this code like below in my view to call other > application as this is something simplest I could find. > > {{=LOAD (url='http://127.0.0.1:8000/wiki/index.

[web2py] Re: proposal: change SQLFORM delete checkbox handling

2010-03-23 Thread mdipierro
The only problem I see but needs testing is what happens to an existing app that uses the new SQLFORM with the existing web2py_ajax.html code? Send me a patch and I will try it. On Mar 23, 12:02 am, Jonathan Lundell wrote: > At the moment, there's a delete-confirmation checkbox that's turned on w

[web2py] Re: proposal: admin-less ticket support

2010-03-23 Thread selecta
I wrote an issue tracker plugin that can do some of the things (except for deleting all tickets and downloading) also tickets are displayed a little different, sorted by number of error appearance and stacktrace only if you are interested I could post the plugin, it has still some issues but you co

[web2py] Re: Debian / Ubuntu packager needed!

2010-03-23 Thread Mark Breedveld
Hi Kuba, Your indeed right that web2py is a higher application. So we could also decide not to pack any web2py applications into the apt repository. This is the most easy solution. Single user web2py server. And to make it according the guidelines, we make a startup script that create a runtime v

[web2py] Re: Debian / Ubuntu packager needed!

2010-03-23 Thread Mark Breedveld
Hi Dimo, I agree on the fact that there more roles. And I want to make a clear separation in the repo. Web2py applications for production use are put in the usr folder. And copied and protected by a startup script. For example you could take the write right from /controllers /mode

Re: [web2py] Re: Debian / Ubuntu packager needed!

2010-03-23 Thread Dima Barsky
On Tue, 23 Mar 2010 02:06:16 -0700 (PDT), Mark Breedveld wrote: > I'll see both problems and another solution to work around this. > We could install web2py into /usr/ directories with apt. > > Then create a startup script that makes a copy of web2py and the > web2py applications that are instal

[web2py] Mercurial or Bazaar?

2010-03-23 Thread Giovanni Giorgi
hi all, I have seen there are two web2pty repositories: one based on mercurial and one based on bazaar. Which is the "official" one? By the way, I have tried both revision control system... I am sticking on mercurial because it seems more popular. I got a very bad feeling with subversion, and I g

[web2py] Re: is there a way to communicate with Web2Py from an external program?

2010-03-23 Thread canna
thank you. I understand that I have to publish a service that can send and receive calls from clients what do I need to look for on the client side? meaning, what ability 3dsMax should have in order to use this service? On 22 מרץ, 21:28, mdipierro wrote: > Perhaps you can use XMLRPC described

Re: [web2py] Re: Survey: Functionality of the Drop Boxes widget

2010-03-23 Thread Thadeus Burgess
It is not so trivial to search and replace. For one, you cannot place keyword arguments before non-keyword args. So it is not a simple matter of find/replace IS_IN_SET(... with IS_IN_SET(zero=None..., there will have to be parsing of the syntax to determine where to place zero=. I am perfectly cap

[web2py] get value of an combo box (select tag)

2010-03-23 Thread tandnk50
Hi all, anyone show me how to I get selected value of combo box ?? thank you very much -- 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] Can't use placeholders when calling stored procedure in DB2

2010-03-23 Thread Alexey Nezhdanov
Problem: (Pdb) print db2db.executesql("call webxdsl.abonsearch (123, 'port_id', '41110', '1', ?, ?);") *** Error: ('07001', '[07001] [IBM][CLI Driver] CLI0100E Wrong number of parameters. SQLSTATE=07001 (-9) (SQLExecDirectW)') (Pdb) print db2db._execute("call webxdsl.abonsearch (?)",(1,2)) **

[web2py] Re: Debian / Ubuntu packager needed!

2010-03-23 Thread Mark Breedveld
I'll see both problems and another solution to work around this. We could install web2py into /usr/ directories with apt. Then create a startup script that makes a copy of web2py and the web2py applications that are installed trough apt to the /var folder. A so called runtime version of web2py.

[web2py] Re: Debian / Ubuntu packager needed!

2010-03-23 Thread Dima Barsky
On Mar 23, 1:15 am, mdipierro wrote: > The main "feature" of web2py is that appliances are data and are > treated as such. Consider a CMS app that wants to install, for > example, a plugin. A plugin contains code and needs to be installable > at runtime. The plugin may also modify other applicatio

[web2py] href not being rendered

2010-03-23 Thread annet
In a send_mail.html view I have a link which reads like: Having trouble viewing this email? View it in your browser When I send the mail and open it this link reads like: Having trouble viewing this email? View it in your browser Does one of you know why the href isn't being rendered? Kind reg

[web2py] Re: Survey: Functionality of the Drop Boxes widget

2010-03-23 Thread Yarko Tymciurak
Thadeus - I initially commiserated with you: "backward compatipility is backward compatibility" --- but I alwasy thought Massimo held on to that phrase too strongly, too tightly. It's important for the "big" things, but it _always_ gets in the way of meaningful, useful change... I think perhap

Re: [web2py] Re: Survey: Functionality of the Drop Boxes widget

2010-03-23 Thread Thadeus Burgess
weheh, Massimo, The issue is the same for me, I have several web2py applications, each commanding over 20 forms which make use of IS_IN_SET. I am dealing with a sizable number of forms that I need to update just to fix this. The fact is that web2py changed the output of how drop boxes are rendered

[web2py] Re: How to call other web2py applications from within a web2py application

2010-03-23 Thread Rahul
Hi All, I used this code like below in my view to call other application as this is something simplest I could find. {{=LOAD (url='http://127.0.0.1:8000/wiki/index.html'}} It did the job. But it overrides my selected application template and if I try to access a url in the index.html pag