[web2py:31593] Re: crud.create(db...,next="...[id]") error

2009-09-24 Thread szimszon
>From my point of view I don't care. I just pointed out that the documentation isn't exact and not only the next=URL(...) doesn't working but next='/some/path/[id]' too. Anyway great software! Tnx Massimo! --~--~-~--~~~---~--~~ You received this message because

[web2py:31594] executesql

2009-09-24 Thread shuval
Hi! How use executesql for rows? controller def statistic(): results = dbstat.executesql("""select ip_user,strafb1,strafb3,sostname,site from ip_adm_hist('01.09.09', '30.09.09',0)""") return dict(results=results) view {{extend 'layout.html'}} {{for person in results:}} {{=person.ip_

[web2py:31595] Re: executesql

2009-09-24 Thread Mladen Milankovic
Hi. executesql will return results in "natural" form, as the library gives it. Don't know for others, but mysql (try for others), will return a list of tuples of results. In your case: person.ip_user is person[0] person.strafb1 is person[1] try this: {{for person in results:}} {{=person[0]

[web2py:31596] Re: full text index for postgres

2009-09-24 Thread max
Thanks massimo, worked for me. On 22 Sep., 15:28, mdipierro wrote: > No but assuming you have done this: > > 1. ALTER TABLE blog_entry ADD COLUMN body_tsv tsvector; > 2. CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE ON > blog_entry > FOR EACH ROW EXECUTE PROCEDURE tsvector_update_tr

[web2py:31597] Render a page using strings instead of a views

2009-09-24 Thread leone
There is a mode to render a page using a string that contain html syntax and special web2py command {{=variable}} ecc. valorized by dictionary? Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2

[web2py:31598] Re: executesql

2009-09-24 Thread shuval
Thank's. How is this rows use in view SQLTABLE? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send e

[web2py:31599] Re: Render a page using strings instead of a views

2009-09-24 Thread Thadeus Burgess
XML() might be what your looking for. {{=XML(variable)}} -Thadeus On Thu, Sep 24, 2009 at 4:07 AM, leone wrote: > > There is a mode to render a page using a string that contain html > syntax and special web2py command {{=variable}} ecc. valorized by > dictionary? > Thanks in advance. > >

[web2py:31600] Re: Render a page using strings instead of a views

2009-09-24 Thread leone
Not exactly what I try to do. In advance I used webpy and I have same classes that produce specialize pages. The class has a complete view in a string, compiled by a dictionary and returns the html code to send to the browser. It is an exception to MCV approach but is useful for specialized works

[web2py:31601] Re: executesql

2009-09-24 Thread shuval
executesql2 http://web2py.com/AlterEgo/default/show/243 http://web2py.com/AlterEgo/default/show/234 For sqlite and mssql. I need executesql with args for firebird. Somebody decided this problem? Thank's help --~--~-~--~~~---~--~~ You received this message because

[web2py:31602] Licensing conundrum

2009-09-24 Thread Joe Barnhart
Here is a perfect application for web2py, but it leaves me scratching my head with respect to the license for web2py. I want to use web2py to deliver a webapp that will be used at a sporting event (can't get too specific). The signups for the sporting event will be done online using an applicatio

[web2py:31603] Re: executesql

2009-09-24 Thread shuval
I decided problem executesql2 for firebird controller results = dbstat.executesql2("""select orgname,ip_user,strafb1,sostname,site from ip_adm_hist(?,?,?) order by orgname""",['01.09.09','30.09.09',0]) --~--~-~--~~~---~--~~ You received this message because yo

[web2py:31604] Selecting data from existing MySQL database

2009-09-24 Thread Elcimar L. Santos
Due to some life problems I stopped studying web2py for a while. I am getting back to it trying to create a fast viewer for an existing MySQL database. Well, what I am asking is that right now is there a way to do this without changing anything on the source database? Atenciosamente, Elcimar Le

[web2py:31605] Re: Flex3: how to get remote service exposed by Web2Py

2009-09-24 Thread 陶艺夫
The address turns out to be: http://docs.turbogears.org/2.0/TGandPyAMF. Any idea? 2009/9/23 陶艺夫 > I'm trying to get a remote call from service exposed by web2py in flex 3. > The Turbogears gateway example on PyAmf site shows that you should get a > remote object to make it's methods called(*thi

[web2py:31606] spanish language file (es-es.py)

2009-09-24 Thread DenesL
The spanish language file is available from: http://drop.io/web2py_DenesL/asset/es-es-py It is probably more latin-american than european spanish but it can be used as the basis for other translations, which is encouraged. I will soon post Chapter 1 of the book in spanish. Currently changing th

[web2py:31607] Re: Render a page using strings instead of a views

2009-09-24 Thread DenesL
Hi leone, if you want to use the {{=var}} syntax then the easiest way to go is with a view. An alternative would be to use string formatting with a dictionary as explained in the Python 2.5 help file, section 3.6.2: >>> print '%(language)s has %(#)03d quote types.' % \ {'language': "P

[web2py:31608] Re: Selecting data from existing MySQL database

2009-09-24 Thread DenesL
Hi Elcimar, not currently but I am waiting for Massimo to review some code that would enable us to do so. The code I sent him supports MSSQL but yesterday I added DB2/400, and I am currently able to perform all basic CRUD operations plus joins and even create SQLFORMs with some validators using

[web2py:31609] Re: Almost working on the dreamhost server... $50 to the person that can make this a script!

2009-09-24 Thread pwoolf
Thanks for the suggestion Yarko. Here is the script attached.--Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe f

[web2py:/] Re: Licensing conundrum

2009-09-24 Thread DenesL
On Sep 24, 5:50 am, Joe Barnhart wrote: > Here is a perfect application for web2py, but it leaves me scratching my > head with respect to the license for web2py. > > I want to use web2py to deliver a webapp that will be used at a sporting > event (can't get too specific). The signups for the spo

[web2py:31611] [OT] ssl + webfaction

2009-09-24 Thread Jose
Hello, Anybody know how to implement ssl on WebFaction. I read [1], I create a new website with the option to enable https. What I could do, as shown in [2], forcing some controllers to use https. SSLRequireSSL directive fails because the mod_ssl module may not load. [1] https://help.webfact

[web2py:31612] Re: web shell interface buggy

2009-09-24 Thread szimszon
confirm. I have the some problem. On Sep 24, 4:13 am, Richard wrote: > yeah, that session was with postgres. > > On Sep 24, 11:59 am, mdipierro wrote: > > > Yes. It is buggy. I have not got to the bottom of it. Have you tried > > it with anything other than sqlite? > > > Massimo > > > On Sep 23

[web2py:31613] Re: Licensing conundrum

2009-09-24 Thread Anand Vaidya
On Sep 24, 10:47 pm, DenesL wrote: > IMHO that's OK, per the latest manual, section 1.8: > > The web2py license also includes a commercial exception: > > You may distribute an application you developed with web2py together > with an unmodified official binary distribution of web2py, as > downlo

[web2py:31614] Re: Almost working on the dreamhost server... $50 to the person that can make this a script!

2009-09-24 Thread Jonathan Lundell
On Sep 24, 2009, at 7:40 AM, pwoolf wrote: > Thanks for the suggestion Yarko. Here is the script attached. A small correction. I'm doubtful that os.system("cd ~/") will work as you expect, since it's going to change the directory in a child process, and not affect the caller's environment (

[web2py:31615] Re: statement ev=db(db.events.person==db.person.id).select()

2009-09-24 Thread DenesL
Hi jayvandal, when you do a join the columns names include the table name so the proper column name for 'description' would be 'events.description'. Note also that: for ev in ev: # destroys the original ev DenesL --~--~-~--~~~---~--~~ You received this message

[web2py:31616] Re: Almost working on the dreamhost server... $50 to the person that can make this a script!

2009-09-24 Thread Jonathan Lundell
On Sep 24, 2009, at 8:27 AM, Jonathan Lundell wrote: > > On Sep 24, 2009, at 7:40 AM, pwoolf wrote: > >> Thanks for the suggestion Yarko. Here is the script attached. > > A small correction. I'm doubtful that > > os.system("cd ~/") > > will work as you expect, since it's going to change the dire

[web2py:31617] Re: web shell interface buggy

2009-09-24 Thread DenesL
Never had a problem with it running on a LAN. I can see why the last error "InterfaceError: cursor already closed" could happen but I fail to see how the NameError could occur, unless the error is misleading and both are connectivity problems. DenesL --~--~-~--~~~--

[web2py:31618] Re: Render a page using strings instead of a views

2009-09-24 Thread leone
Does not exist a function that compile a view passed as a string and return a rendered page. Is it possible? -leone On Sep 24, 4:29 pm, DenesL wrote: > Hi leone, > > if you want to use the {{=var}} syntax then the easiest way to go is > with a view. > > An alternative would be to use string form

[web2py:31619] Re: Render a page using strings instead of a views

2009-09-24 Thread mdipierro
page=response.render(cStringIO.StringIO('{{for i in range(n):}} Hello World{{pass}}',n=10) On Sep 24, 11:40 am, leone wrote: > Does not exist a function that compile a view passed as a string and > return a rendered page. > Is it possible? > -leone > > On Sep 24, 4:29 pm, DenesL wrote: > > > Hi

[web2py:31620] Re: Selecting data from existing MySQL database

2009-09-24 Thread mdipierro
Sorry it is taking me so long. On Sep 24, 9:39 am, DenesL wrote: > Hi Elcimar, > > not currently but I am waiting for Massimo to review some code that > would enable us to do so. > > The code I sent him supports MSSQL but yesterday I added DB2/400, and > I am currently able to perform all basic

[web2py:31621] Re: Render a page using strings instead of a views

2009-09-24 Thread leone
Thanks. It is simple and clear. -leone On Sep 24, 6:44 pm, mdipierro wrote: > page=response.render(cStringIO.StringIO('{{for i in range(n):}} > Hello World{{pass}}',n=10) > > On Sep 24, 11:40 am, leone wrote: > > > Does not exist a function that compile a view passed as a string and > > return

[web2py:31622] Re: Licensing conundrum

2009-09-24 Thread mdipierro
Notice that I am not changing the GPL license. Summary: Basically the source code is GPL, not BSD. The official binaries (from me) are freeware. Explanation: I just specify that your applications are not considered derivative work unless 1) you cut and paste web2py code in your applications, 2)

[web2py:31623] Re: Client tools for web2py

2009-09-24 Thread Thadeus Burgess
Solved the problem. You give every function a uuid. I spend last night and wrote my own module based off of yours. Here is the lastest version of the code: http://pastebin.com/m570fe50a It is a bit more involved to set up than your clienttools, however it uses polymorphism and interfaces (I neve

[web2py:31624] Ajax call to Controller - can it return data as it receives it?

2009-09-24 Thread Rob Scheibel
Seeing if anyone has any ideas on a better way to do this... I've got a view that has a button. When the user presses the button, an ajax call is made to one of my functions in a controller. This function runs several large database queries. Currently, it returns the results (simple small amount

[web2py:31625] Re: web2py on shared hosting

2009-09-24 Thread Jon Romero
I've spent the last two days trying to figure out a sane way to do this and I still can't make routes.py work for domains Please take a look here (http://groups.google.com/group/web2py/msg/ 8616fc8bfc9c05a3). Are routes.py not working for domains? I think more examples are needed for mapping with

[web2py:31626] Re: Ajax call to Controller - can it return data as it receives it?

2009-09-24 Thread Thadeus Burgess
Perhaps you should run only one query at a time, and in your handler function specify a response.vars that tells it what query to run. In your ajax, have it callback using the first query, and in the success function, display the html, and then issue another callback for the next query. This way

[web2py:31627] Re: Almost working on the dreamhost server... $50 to the person that can make this a script!

2009-09-24 Thread Thadeus Burgess
I dont' know what the reason for having a script for dreamhost is... All I did, was create a new subdomain, with mod_passenger (wsgi). wget web2py and extract. simlink wsgihandler.py to wsgi_passenger.py Boom. web2py ready and running. and if I keep my web2py app under version control, all I ha

[web2py:31628] Re: Ajax call to Controller - can it return data as it receives it?

2009-09-24 Thread Rob Scheibel
Thanks for the suggestions Thadeus. I did think about using callbacks to issue further requests, but I'm trying to keep the overhead down by not establishing additional requests to the server. I mean the connection is already open and waiting, so I guess I'm looking for a way to send partial conte

[web2py:31629] bad double conversion

2009-09-24 Thread DenesL
While running some tests I came across this. I was updating a field (NACTNB) defined as double with a value of 123456789.1234 but the actual command to the DB was: UPDATE SRBNAM SET NACTNB=123456789.123 WHERE SRBNAM.NANUM='99'; note the missing 4 at the end of the value. This seems to be a

[web2py:31630] Re: Serving different applications on shared hosting

2009-09-24 Thread Mladen Milankovic
Hi. I think it's a bug in rewrite.py modul. If you open the file, it's in gluon directory, on line 54 you can see the following: if k.find(':/') > 0: i = k.find(':/') k = r'%s:https?://[^:/]+:[a-z]+ %s' % (k[:i], k[i+1:]) Think this should insert regex part for the domain when written

[web2py:31631] Re: Licensing conundrum

2009-09-24 Thread Joe Barnhart
>From this description it sounds like my use is covered by the existing license. I do not plan to make changes to the underlying web2py code -- I certainly would not make changes and refuse to offer them back to the project. >From looking at the packaging angle, it appears the Windows package mu

[web2py:31632] Re: Licensing conundrum

2009-09-24 Thread mdipierro
On Sep 24, 1:41 pm, Joe Barnhart wrote: > From this description it sounds like my use is covered by the existing > license. I do not plan to make changes to the underlying web2py code > -- I certainly would not make changes and refuse to offer them back to > the project. Yes it is covered >

[web2py:31633] Re: Ajax call to Controller - can it return data as it receives it?

2009-09-24 Thread Thadeus Burgess
I don't know if this is possible with web2py unless you write your own interface to WSGI. I know in PHP or ASP when you print output it is displayed to the browser when it receives it, so on PHP websites that don't use template rendering, as soon as the print statement is executed it automatically

[web2py:31634] Python 3

2009-09-24 Thread Wobmofo
Hello, Does web2py have a plan/schedule/roadmap for Python 3 ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from th

[web2py:31635] Re: Python 3

2009-09-24 Thread mdipierro
why should we? web2py IS NOT moving to python3 because that would break backward compatibility. All existing web2py apps will break because of unicode vs string issues. Moreover Python 3 is not mature enough and most of the required database drivers are missing. This does not exclude that if p

[web2py:31636] web2py design, future, license, and other thoughts

2009-09-24 Thread mdipierro
Once in a while I get questions about license (why not BSD?) or future (why not change it and break backward compatibility? why not move to python3). Well. There are many frameworks that do that. I wrote web2py because I do not like it. Web2py was not designed to please web2py contributors (sorr

[web2py:31637] Formating forms manually

2009-09-24 Thread BG
Hello, I am new to web2py and am in process of implementing a form. I would like to be able to format the form layout manually in the view. Is there a way to do this? How can I individually render form elements in the view? Using FORM() helper to create the form. Thanking you in advance Bil

[web2py:31638] Re: Formating forms manually

2009-09-24 Thread waTR
See this post: http://groups.google.com/group/web2py/browse_thread/thread/2f2d117574b3bd2e# On Sep 24, 4:41 pm, BG wrote: > Hello, > > I am new to web2py and am in process of implementing a form.  I would > like to be able to format the form layout manually in the view.  Is > there a way to

[web2py:31639] Re: web2py on shared hosting

2009-09-24 Thread Yarko Tymciurak
Perhaps read thru the thread here - I thought Massimo did a nice job of explaining the flexibility and operation of routes.py here: http://groups.google.com/group/web2py/browse_thread/thread/4768cc04ad88c48d# On Thu, Sep 24, 2009 at 12:37 PM, Jon Romero wrote: > > I've spent the last two days t

[web2py:31640] Re: crud.create(db...,next="...[id]") error

2009-09-24 Thread Yarko Tymciurak
On Thu, Sep 24, 2009 at 1:21 AM, Iceberg wrote: > > I don't really care which question is the primary one but, it doesn't > harm to go back to the beginning point: Currently, the way code is > written, [id] in a URL will > be replaced by the created/modified id of the record, ONLY IF it is > r

[web2py:31641] Re: web2py design, future, license, and other thoughts

2009-09-24 Thread Álvaro Justen [Turicas]
This email should be in web2py's site. These concepts and ideias need to me more explicity than implicity! ;-) I think we also need to include that web2py is not only a web framework that we import tools and use: web2py, really, create Python code for us (yes! And because of it we don't need to us

[web2py:31642] Re: Python 3

2009-09-24 Thread Álvaro Justen [Turicas]
On Thu, Sep 24, 2009 at 17:39, mdipierro wrote: > It will have a different name ... web3py? ;-) -- Álvaro Justen Peta5 - Telecomunicações e Software Livre 21 3021-6001 / 9898-0141 http://www.peta5.com.br/ --~--~-~--~~~---~--~~ You received this message beca

[web2py:31643] Re: Python 3

2009-09-24 Thread Yarko Tymciurak
On Thu, Sep 24, 2009 at 7:33 PM, Álvaro Justen [Turicas] < alvarojus...@gmail.com> wrote: > > On Thu, Sep 24, 2009 at 17:39, mdipierro wrote: > > It will have a different name ... > > web3py? ;-) > web2py3? :-/ --~--~-~--~~~---~--~~ You received this message beca

[web2py:31644] Re: web2py on shared hosting

2009-09-24 Thread Jon Romero
Whoa! This is an excellent thread (I didn't find it will I was searching in the list!). But even though I did this: routes_in = ( ('^.*?:(http|https):www.mydomain.com(get|post) /', '/myapp/ default'),) it stills redirects to /welcome/default/index. In order to run my application, I must g

[web2py:31645] Re: Python 3

2009-09-24 Thread mdipierro
Yes. I claimed the Trademark on that already :-) http://groups.google.com/group/web2py/browse_thread/thread/5fcd0e97452e9ab8 Massimo On Sep 24, 7:33 pm, Álvaro Justen [Turicas] wrote: > On Thu, Sep 24, 2009 at 17:39, mdipierro wrote: > > It will have a different name ... > > web3py? ;-) > > -

[web2py:31646] Re: web2py on shared hosting

2009-09-24 Thread mdipierro
It should be routes_in = (('^.*?:https?://www.mydomain.com:(get|post) /', '/myapp/ default'),) let us know if it works On Sep 24, 7:46 pm, Jon Romero wrote: > Whoa! This is an excellent thread (I didn't find it will I was > searching in the list!). > But even though I did this: > routes_in = (

[web2py:31647] Re: ssl + webfaction

2009-09-24 Thread Jose
On 24 sep, 14:49, Jose wrote: > Hello, > > Anybody know how to implement ssl on WebFaction. I read [1], I create > a new website with the option to enable https. > > What I could do, as shown in [2], forcing some controllers to use > https. > > SSLRequireSSL directive fails because the mod_ssl

[web2py:31648] Re: Formating forms manually

2009-09-24 Thread BG
Hi waTR, Thank you for your help. Although, like Arvind in the conversation you send me, I have objects that span multiple tables. Is there any other way of getting at the form elements with FORM() or utilizing SQLFORM across multiple models? Bill --~--~-~--~~~---~-

[web2py:31649] Re: Almost working on the dreamhost server... $50 to the person that can make this a script!

2009-09-24 Thread Thadeus Burgess
Have you looked into modifying the django dreamhost installer script for web2py? This is what I used to originally install django Heres a paste of it http://pastebin.com/m3dd1a90 -Thadeus On Thu, Sep 24, 2009 at 12:47 PM, Thadeus Burgess wrote: > I dont' know what the reason for having a

[web2py:31650] How personalize submit button?

2009-09-24 Thread Alexandre Andrade
I cant figure how to do it with form = FORM form = SQLFORM form = SQLFORM.factory -- Atenciosamente -- = Alexandre Andrade Hipercenter.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

[web2py:31651] Re: How personalize submit button?

2009-09-24 Thread weheh
I do this with factory: #view {{=form.custom.begin}} {{=INPUT(_type='image',value='submit',_src=URL (r=request,c='static',f='image.gif')}} {{=form.custom.end}} On Sep 24, 11:31 pm, Alexandre Andrade wrote: > I cant figure how to do it with > form = FORM > form = SQLFORM > form = SQLFORM.fact

[web2py:31652] Re: Formating forms manually

2009-09-24 Thread weheh
You need to use SQLFORM.factory and then you can use custom forms in view by bracketing the form content with {{=form1.custom.begin}} custom form content {{=form1.custom.end}}. Be sure to have a hidden input with the form name and that the form name is referenced in the controller's accept

[web2py:31653] Re: Web2py prosperity

2009-09-24 Thread weheh
I'm a little confused. Vidul wants to write an AI that generates applications automatically. And then he wants to marry it to web2py. So there won't be any jobs for software developers or, for that matter, web2py programmers. So why, then, would there be a need for a web2py jobs board? Anecdotall

[web2py:31654] Re: How personalize submit button?

2009-09-24 Thread Richard
If you just want to customize the submit button label you can use: form = SQLFORM(db.mytable, submit_button='new submit label') Or if you need to customize more probably you should use FORM: FORM( INPUT(_name='name', requires=IS_NOT_EMPTY()), INPUT(_type='submit', _value='new submit labe

[web2py:31655] Re: How personalize submit button?

2009-09-24 Thread Richard
I somehow missed the custom form section in the manual - thanks for the example. On Sep 25, 2:16 pm, weheh wrote: > I do this with factory: > > #view > {{=form.custom.begin}} > {{=INPUT(_type='image',value='submit',_src=URL > (r=request,c='static',f='image.gif')}} > > {{=form.custom.end}} > >

[web2py:31656] Re: How personalize submit button?

2009-09-24 Thread Álvaro Justen [Turicas]
On Fri, Sep 25, 2009 at 01:50, Richard wrote: > > If you just want to customize the submit button label you can use: > form = SQLFORM(db.mytable, submit_button='new submit label') > > > Or if you need to customize more probably you should use FORM: > FORM( >    INPUT(_name='name', requires=IS_NOT

[web2py:31657] Re: Web2py prosperity

2009-09-24 Thread mdipierro
On Sep 24, 11:43 pm, weheh wrote: > I'm a little confused. Vidul wants to write an AI that generates > applications automatically. And then he wants to marry it to web2py. > So there won't be any jobs for software developers or, for that > matter, > web2py programmers. So why, then, would there