[web2py] Re: rocket performance issues

2010-07-26 Thread Rahul
Thanks everyone, for getting this issue resolved... Web2py rocks! Cheers, Rahul On Jul 24, 6:25 pm, Phyo Arkar wrote: > Yes , Since from start of web2py , Massimo and Us never recommend to use > built-in web2py server at production. They are mainly for development > purpose. > Since Very start of

[web2py] Re: cPickle large object causes web2py to crash

2010-07-26 Thread mdipierro
If you have only one such objects, shared between all users than cache.ram may be a solution. I am surprised cPickle fails since the data is not so large. Are you sure it is a file size problem? Is it possible that the object simply contains unpicklable references? try store it on the filesystem

[web2py] Re: Trouble with lazy virtual fields

2010-07-26 Thread szimszon
I'll if I found time for that :-) On júl. 26, 12:14, mdipierro wrote: > I completely missed this thread. I think this is fixed now. Can > somebody try it? > > On Jun 29, 1:25 am, szimszon wrote: > > > > > > > > > Can I help or do something to track it down? > > > On jún. 28, 20:52, szimszon wro

Re: [web2py] Re: book revision

2010-07-26 Thread Thadeus Burgess
IS_IN_SET zero changes and how they work and why it is that way now. -- Thadeus On Mon, Jul 26, 2010 at 11:20 PM, Iceberg wrote: > On Jul 24, 5:53am, mdipierro wrote: >> I am revising the book. >> >> Please list what features are not mentioned in the book or deserve >> more space they corre

[web2py] Re: IS_IN_SET syntax

2010-07-26 Thread sarsar
Thank you . Now it is clear .Thanks again . Now i have to find the file inside source code that can explain totally my question and help me not making noise with simple questions. Sarados On 27 Ιούλ, 04:00, Thadeus Burgess wrote: > db.candidate.for_language.requires = IS_IN_SET(['english', 'fren

[web2py] Re: ajax widget - asynchronously updated

2010-07-26 Thread Adi
And one more thing, in javascript check if return value is -1 before you refresh your widget via document.yourwidget.innerHTML = msg call. This will make sure the widget refreshes only if you want it to (driven by your controller logic). -- Adi On Jul 27, 9:56 am, Adi wrote: > Hi Tomas, > > Are

[web2py] Re: ajax widget - asynchronously updated

2010-07-26 Thread Adi
Hi Tomas, Are you sure setTimeout is not calling refreshWidget every second? Can you debug the javascript and see what's happening (in Firebug)? Your problem is not to load the widget once by Ajax (which is what I think the LOAD call will do), but to load it repeatedly. Also, if your list of item

[web2py] Re: book revision

2010-07-26 Thread Iceberg
On Jul 24, 5:53am, mdipierro wrote: > I am revising the book. > > Please list what features are not mentioned in the book or deserve > more space they correctly get. > You suggestions will be appreciated. > > Massimo Not sure whether is already mentioned in this 30-post thread, anyway please inc

[web2py] Re: [Plugin_wiki] - Manage categories for blog pages and posts

2010-07-26 Thread Bruno Rocha
It is now posted in web2pySlices[1] I Have a TO-DO List, and I really need help to make it: - remove blank spaces from items in category list (on Insert, in List, On Select) - make category list case unsensitive - Show a list of categories with links as return to categoryAdd - Sho

Re: [web2py] IS_IN_SET syntax

2010-07-26 Thread Thadeus Burgess
db.candidate.for_language.requires = IS_IN_SET(['english', 'french', 'german'], zero=None) If you notice how web2py will put a blank option in the drop down? the zero attribute of IS_IN_SET or IS_IN_DB will control the value of that first dropdown option. To completely rid yourself of the bank opt

[web2py] table migration metadata storage location

2010-07-26 Thread Thadeus Burgess
When migrate = False and fake_migrate = False the .table files are not even read from the filesystem, meaning they do not technically *need* to exist to run your application. Running code on production always uses migrate = False except for when I run migration scripts which allow the DAL to perfo

[web2py] Error after a page is deleted in plugin_wiki

2010-07-26 Thread Bruno Rocha
I found an error in the model plugin_wiki. 1. Create a new page 2. make some changes to include entries in the table plugin_wiki_page_archive 3. Appadmin go through the table .. _archive and view the historic 4. Delete the page you created 5. Visit again .. _archive through appadmin I guess that i

[web2py] Custom Registration form

2010-07-26 Thread elfuego1
In default.py I had defined my registration form lbl=form.custom.label wdgt=form.custom.widget def register(): form=FORM(TABLE(TR(lbl.username), TD(wdgt.username), TR(lbl.password), TD(wdgt.password), TR(lbl.first_name), TD(wdgt.first_name),

[web2py] IS_IN_SET syntax

2010-07-26 Thread sarsar
Hi all, Please help me with the syntax of dropdown selection , because i' ve read a lot of answers and sugestions, AND the book , and i cant find how to do this simple thing . db.candidate.for_language.requires=IS_IN_SET(['english','french','german']),default='english' using crud

[web2py] Re: Sorting alphanumeric data

2010-07-26 Thread DJ
Thanks Thadeus and Jonathan for your suggestions. -S On Jul 23, 10:06 pm, Thadeus Burgess wrote: > It is possible to create SQL functions that will represent your > natural sort. You can use db.executesql("") to call the function. > > Read the following comments in the below link for examples on

[web2py] Re: Ordering page

2010-07-26 Thread Kenneth
Any ideas anyone? My view look like this: {{extend 'layout.html'}} Balance: {{=session.balance}} {{for reward in rewards:}} {{=A(reward.title_fi,_href=URL(r=request,c='troop',f='reward',args=reward.id))}} {{include 'cart_item.html'}} {{pass}} cart_item.html looks like: Quantity in cart: {{=se

[web2py] Re: ajax widget - asynchronously updated

2010-07-26 Thread Tomas Pelka
Hi, where could I find implementation of LOAD (like {{=LOAD('sniffer','getResults',ajax=True)}}) function? Thanks -- Tomas Pelka

[web2py] Re: where to put helper functions?

2010-07-26 Thread Iceberg
Put your helpers into modules, then use local_import(...). See also: http://web2py.com/book/default/search?search=local_import (Sent from my thinkpad) On Jul 27, 1:02am, rochacbruno wrote: > I dont think it is the right way, but I use to create a config.py and a > helper.py in my models. > > Th

[web2py] FORM with CHEKCBOX and IS_IN_DB

2010-07-26 Thread KMax
Hello I had table defined: db.define_table('papers', Field('printdate','date'), Field('printout','boolean',default=False)) So I need FORM with checkboxes for each printdate, but if printout for particular date gets 'True' (mean to app user 'CLOSED FOR ACCEPT NEW POST' ) error message print

[web2py] Re: chat appliance (newbie)

2010-07-26 Thread GoldenTiger
Awesome ! Just the lost web2py tool! ^^ On 26 jul, 12:07, Stef Mientki wrote: > thanks for your efforts Massimo, > indeed the "invitation" is gone now, > but it still crashes when trying to accept an invitation > > 2. > 3. > 4. > 5. > 6. > > Traceback (most recent call last): >   File "gluon/res

[web2py] Re: cPickle large object causes web2py to crash

2010-07-26 Thread topher.baron
937984 Bytes is the size of the file when I pickle a large object to a file. This is protocol 0. When I attempted to use protocol 2, it failed. I recently realized that the session itself is pickled, so I tried to simply add the object to the session to see what would happen. Same result. I'm

[web2py] Re: Any movement on implementing inline-tables functionality?

2010-07-26 Thread mdipierro
not yet. sorry On Jul 26, 10:39 am, mwolfe02 wrote: > I need to be able to perform multiple LEFT JOINs on sub-SUM queries. > For example: > > SELECT C.Name, O.TotalOrderAmt, R.TotalRefundAmt > FROM Customers AS C > LEFT JOIN (SELECT CustomerID, Sum(Amount) AS TotalOrderAmt FROM Orders > GROUP BY

Re: [web2py] where to put helper functions?

2010-07-26 Thread rochacbruno
I dont think it is the right way, but I use to create a config.py and a helper.py in my models. The classes, methods, functions defined in model are available to cobtroller and views. But I think the best way is creating external modules. Sent from my iPhone On 26/07/2010, at 13:04, VP wrote

[web2py] non empty fields in Crud Read

2010-07-26 Thread Julius Minka
Is it possible to display just lines with non-empty values in Crud Read or readonly SQLFORM? If not, should I do it through custom form? Julius

[web2py] Re: book revision

2010-07-26 Thread VP
I think the book needs some work. I'm learning web2py. I like it. But I feel there are some "mysteries" that have not been explained in the book. I hope you put a team on the book. Chapter 3 needs to be thoughtfully expanded. I saw some usage inconsistencies in examples in Chapter 3, regardin

[web2py] where to put helper functions?

2010-07-26 Thread VP
I have a bunch of functions that are not meant to be exposed (via URL) but rather to be helping out with things (and to be called by functions defined in controllers). Where do I put these? And how do I import them into controllers? I tried to place them in private or modules, but it doesn't see

[web2py] Any movement on implementing inline-tables functionality?

2010-07-26 Thread mwolfe02
I need to be able to perform multiple LEFT JOINs on sub-SUM queries. For example: SELECT C.Name, O.TotalOrderAmt, R.TotalRefundAmt FROM Customers AS C LEFT JOIN (SELECT CustomerID, Sum(Amount) AS TotalOrderAmt FROM Orders GROUP BY CustomerID) O ON C.id = O.CustomerID LEFT JOIN (SELECT CustomerID,

[web2py] Re: ajax modal not working anymore with 1.81.5

2010-07-26 Thread web2py noob
Yeah! now works, thanks professor :) On 26 jul, 05:39, mdipierro wrote: > I am surprised it ever worked. > > DIV(LOAD(request.controller,request.action,args=request.args, >                      vars=dict(_ajax_add=field),ajax=True),_id='TB_%s' > % key,_class='hidden')) > > should have been > > DI

Re: [web2py] Re: Strange problem about the time from Request.now

2010-07-26 Thread Vasile Ermicioi
8 hours difference is the time diff from Europe to USA, that means GAE is hosted the USA (on a google server) and you are in Europe, or something like that Massimo says "request.now is always the time of the server" and you should understand that this has nothing to do with rocket web server, thi

[web2py] Re: Strange problem about the time from Request.now

2010-07-26 Thread mdipierro
I do not know. What is slow? On Jul 26, 9:09 am, NoNoNo wrote: > Thanks Massimo, that explains a lot. As long as all the timestamps are > consistent it is ok. I guess SERVER is also the reason that it's slow > when opening a page even I'm running it locally. > > On Jul 26, 10:03 pm, mdipierro wr

[web2py] Re: Strange problem about the time from Request.now

2010-07-26 Thread NoNoNo
Thanks Massimo, that explains a lot. As long as all the timestamps are consistent it is ok. I guess SERVER is also the reason that it's slow when opening a page even I'm running it locally. On Jul 26, 10:03 pm, mdipierro wrote: > request.now is always the time of the server. > > On Jul 26, 8:50 a

[web2py] Re: Strange problem about the time from Request.now

2010-07-26 Thread mdipierro
request.now is always the time of the server. On Jul 26, 8:50 am, NoNoNo wrote: > Hi guys, > > In my db there is a field of datetime, as a time stamp of a post. By > default it's Request.now. I test my app in web2py, and this field was > filled with right date and time (my computer time). Howeve

[web2py] Strange problem about the time from Request.now

2010-07-26 Thread NoNoNo
Hi guys, In my db there is a field of datetime, as a time stamp of a post. By default it's Request.now. I test my app in web2py, and this field was filled with right date and time (my computer time). However, when import it to GAE Launcher, the field was filled with a time of 8hr delay... Is there

Re: [web2py] Re: keepvalues per field?

2010-07-26 Thread Johann Spies
Fantastic. Thanks. Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth, that shall he also reap."                                   Galatians 6:7

[web2py] Re: keepvalues per field?

2010-07-26 Thread mdipierro
You can use db.table.field.default=previous_form.vars.field to propagate the values forward.. On Jul 26, 6:41 am, Johann Spies wrote: > Is there a way to do the "keepvalues"  thing per field?  I have forms > which have up to 40 fields. Datacapturers will have to enter of forms > of which the fi

[web2py] Re: book revision

2010-07-26 Thread mdipierro
The fact is the purpose of 3.9 is not to build a wiki but teach web2py programming. If we use plugin_wiki there users would not learn much. Moreover plugin_wiki may change after the book is completed therefore I want to use it as an example of plugin but not suggest its API will be supported in the

[web2py] keepvalues per field?

2010-07-26 Thread Johann Spies
Is there a way to do the "keepvalues" thing per field? I have forms which have up to 40 fields. Datacapturers will have to enter of forms of which the first 5-7 fields will be identical for the batch. Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth,

[web2py] Re: inserting attributes into form.custom.begin

2010-07-26 Thread mdipierro
Custom forms were added long after the SQLFORM concept was designed. This is the only way it can form for now. On Jul 26, 5:27 am, ciastek wrote: > Is it desired behaviour? > -- Sebastian > > On 6 Lip, 20:55, "mr.freeze" wrote: > > > It looks like the custom components are only built in the init

Re: [web2py] Re: book revision

2010-07-26 Thread Johann Spies
On 25 July 2010 00:54, Garrafa Pet 2 Litros wrote: > I think it's good to review the section 3.9 that discusses the wiki > and add documentation of new features found in the plugin wiki. +1 Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth, that shall

[web2py] Re: inserting attributes into form.custom.begin

2010-07-26 Thread ciastek
Is it desired behaviour? -- Sebastian On 6 Lip, 20:55, "mr.freeze" wrote: > It looks like the custom components are only built in the init of > SQLFORM so you will have to pass it in the constructor:>>>form= > SQLFORM(db.things, _class='small') > >>>form.custom.begin.xml() > > ' method="post">'

[web2py] Re: epub version of official book?

2010-07-26 Thread mdipierro
I will send you something to do. ;-) On Jul 26, 5:20 am, Pystar wrote: > Hello Massimo, > Pls count me in on this, I just have to give back to this awesome > community. How may I help in the revision of the web2py book? > > On Jul 25, 11:12 pm, mdipierro wrote: > > > Sure. I am making many revis

[web2py] Re: epub version of official book?

2010-07-26 Thread Pystar
Hello Massimo, Pls count me in on this, I just have to give back to this awesome community. How may I help in the revision of the web2py book? On Jul 25, 11:12 pm, mdipierro wrote: > Sure. I am making many revisions to the book. I hope to have the third > edition out by the end of August. > > I w

[web2py] Re: book revision

2010-07-26 Thread mdipierro
I think the problem is fixed in trunk. can you try? On Jul 26, 4:51 am, Nico de Groot wrote: > Info about vitualfields, some links I use: > > http://groups.google.com/group/web2py/browse_thread/thread/fa7936be97... > > Thadeus' blog about vitual links including lazy fields using a > 'inline' func

[web2py] Re: Trouble with lazy virtual fields

2010-07-26 Thread mdipierro
I completely missed this thread. I think this is fixed now. Can somebody try it? On Jun 29, 1:25 am, szimszon wrote: > Can I help or do something to track it down? > > On jún. 28, 20:52, szimszon wrote: > > > The virtualfields class is not a common python class? > > > On jún. 28, 09:35, szimszon

Re: [web2py] Re: chat appliance (newbie)

2010-07-26 Thread Stef Mientki
thanks for your efforts Massimo, indeed the "invitation" is gone now, but it still crashes when trying to accept an invitation 2. 3. 4. 5. 6. Traceback (most recent call last): File "gluon/restricted.py", line 178, in restricted File "S:\Python_26\web2py_win\web2py\applications\Ch

[web2py] Re: book revision

2010-07-26 Thread Nico de Groot
Info about vitualfields, some links I use: http://groups.google.com/group/web2py/browse_thread/thread/fa7936be97a82fec Thadeus' blog about vitual links including lazy fields using a 'inline' function , not working anymore in latest releases http://thadeusb.com/weblog/2009/12/31/web2py_virtualfiel

[web2py] Re: book revision

2010-07-26 Thread mdipierro
P.S. I added this to my provate latex source (after incorporating the corrections editors posted online). I still need to convert everything in markmin syntax to post it online... this will take another month but will make some chapters available for review asap. On Jul 26, 4:43 am, mdipierro wro

[web2py] Re: book revision

2010-07-26 Thread mdipierro
Here is where we stand: So far I added this: [x] compute fields [x] virtual fields [x] upload separate [x] crud.search [x] RPXAccount [x] new validators [x] run background tasks [x] recursive queries [x] MARKMIN helper [x] Informix support [x] named id fields [x] keyedtables [x] first() last() [x]

[web2py] Re: ajax modal not working anymore with 1.81.5

2010-07-26 Thread mdipierro
I am surprised it ever worked. DIV(LOAD(request.controller,request.action,args=request.args, vars=dict(_ajax_add=field),ajax=True),_id='TB_%s' % key,_class='hidden')) should have been DIV(LOAD(request.controller,request.function,args=request.args, vars=d

[web2py] Re: book revision

2010-07-26 Thread Timmie
Hello, will the plugin system be documented? What about isses mentioned in: New features not documented in PDF book (2 ed) http://groups.google.com/group/web2py/browse_frm/thread/208cdabdba546cd0? best regards, Timmie On 25 Jul., 02:25, mdipierro wrote: > I have identified the following items

[web2py] ajax modal not working anymore with 1.81.5

2010-07-26 Thread web2py noob
Hi, I just tryied the same code with an old 1.80 web2py_src.zip I have and can affirm that the Ajax dropbox modal[1] for references doesn't work for me (and perhaps someone else) anymore with the last 1.81.5 update: Traceback (most recent call last): File "/home/dac/web2py/gluon/restricted.py",

[web2py] Re: book revision

2010-07-26 Thread mdipierro
That is already there at the beginning of chapter 6. On Jul 26, 3:05 am, Ramjee Ganti wrote: > Hi, > > For people new to web2py like me a section which mentions all the third > party libraries that are used in web2py. eg. pyodbc for MSSQL, Mysql > conncetor for MYSQL etc. would be great help. > >

Re: [web2py] book revision

2010-07-26 Thread Ramjee Ganti
Hi, For people new to web2py like me a section which mentions all the third party libraries that are used in web2py. eg. pyodbc for MSSQL, Mysql conncetor for MYSQL etc. would be great help. rAm i Think, i Wait, i Fast -- Siddhartha http://sodidi.ramjeeganti.com rAm i Think, i Wait, i Fast --

Re: [web2py] Re: Ordering page

2010-07-26 Thread Kenneth Lundström
Waauu, many thanks Massimo, that was exactly what I was looking for. I installed it and it works nicely but after modifying to fit my database model I can´t the +1 and -1 buttons to work. Or they work but quantity and balance is not updated. If I reload the page numbers are updated and show co