[web2py:12588] Re: web2py book in PDF at $12.50

2008-11-28 Thread cjparsons
For an index I guess Joe means a hyperlinked index / table of contents where you can click on an entry to go to the page. This would need to be generated by re-PDFing the original document I guess. I made the document easier to view in the small window of my eee pc by using printing the PDF I dow

[web2py:12589] Re: web2py book in PDF at $12.50

2008-11-28 Thread Daniel Contag
I know that LaTeX can do the linking in a table of content automatically. Perhaps the publishing system used for Massimo's book can do it also, then it would just be a matter of flipping a switch. Daniel On Fri, Nov 28, 2008 at 09:27, cjparsons <[EMAIL PROTECTED]> wrote: > > For an index I guess

[web2py:12590] one to many relations

2008-11-28 Thread pmate
Hi, in my model i have: db.define_table('violazioni', SQLField('codice','integer',requires=IS_NOT_IN_DB (db,'violazioni.codice',error_message="codice duplicato")), SQLField('infrazione','text',requires=IS_NOT_EMPTY()), SQLField('note','text')) db.define_table('sanzi

[web2py:12591] Re: new T2

2008-11-28 Thread Jose
On 28 nov, 03:13, mdipierro <[EMAIL PROTECTED]> wrote: > You need the latest version of t2 > > http://mdp.cti.depaul.edu/example/static/web2py.app.plugin_t2.tar > Massimo: The link does not work. Regards Jose --~--~-~--~~~---~--~~ You received this message beca

[web2py:12592] Re: one to many relations

2008-11-28 Thread DenesL
pmate, what you probably want is to show the codice (not the id) but the relation is still built on the id: db.define_table('sanzioni', SQLField('violazioni_id',db.violazioni), SQLField('descrizione','text'), SQLField('sanzione',length=32), SQLField('note',

[web2py:12593] Re: Field alias

2008-11-28 Thread Tari
I'm using 1.50, and tried the EXACT same code you provided as an example... On Nov 28, 2:31 am, mdipierro <[EMAIL PROTECTED]> wrote: > which version do you have? Could you show me the exact code you are > using? > > On Nov 27, 6:17 pm, Tari <[EMAIL PROTECTED]> wrote: > > > Tnaks for the quick re

[web2py:12594] Re: select all tables in sql

2008-11-28 Thread DenesL
db.tables has the names of all the tables in db, so you could do: for tbl in db.tables: rows=db().select(db[tbl].ALL) print rows --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To p

[web2py:12595] Re: web2py book in PDF at $12.50

2008-11-28 Thread mdipierro
I get it now. I will investigate and replace the document in the second edition. Massimo On Nov 28, 2:32 am, "Daniel Contag" <[EMAIL PROTECTED]> wrote: > I know that LaTeX can do the linking in a table of content automatically. > Perhaps the publishing system used for Massimo's book can do it al

[web2py:12596] Downside / Critique of web2py

2008-11-28 Thread 43gm
I have done my research, and have a good impression of web2py. When I read articles on the net, I am amazed at the earnest effort of the web2py creator to add his comments especially when are there are reviews and opinions comparing various frameworks. Here I would kindly like to request a honest

[web2py:12597] Re: new T2

2008-11-28 Thread mdipierro
http://mdp.cti.depaul.edu/examples/static/web2py.app.plugin_t2.tar oops, missed and "s" On Nov 28, 6:17 am, Jose <[EMAIL PROTECTED]> wrote: > On 28 nov, 03:13, mdipierro <[EMAIL PROTECTED]> wrote: > > > You need the latest version of t2 > > >http://mdp.cti.depaul.edu/example/static/web2py.app.pl

[web2py:12598] Re: Field alias

2008-11-28 Thread mdipierro
This is because of a bug fixed in 1.51. Replace print rows[0]._extra[shortname] with print rows[0]._extra[str(shortname)] and it should work. Massimo On Nov 28, 8:15 am, Tari <[EMAIL PROTECTED]> wrote: > I'm using 1.50, and tried the EXACT same code you provided as an > example... > > On N

[web2py:12599] Affiliate marketing program is a way to...

2008-11-28 Thread bith ghosh
*What is an Affiliate Program Or Online Jobs ?* Affiliate marketing program is a way to achieve higher targeted traffic for your online business. It allows to create own advertising network of partners ... *Read this article at : http://www.tutorial4u.coz.bz * --~--~-~--~~---

[web2py:12600] Re: Downside / Critique of web2py

2008-11-28 Thread mdipierro
Hi 43gm, if I understand your email you are seeking critiques form other users. You are particularly interested in potential scalability problems. did I understand? If I do I would rephrase your request into the following explicit questions to the users: 1) did you experience any scalability pr

[web2py:12601] Re: GAE suggestion

2008-11-28 Thread Robin B
Now in GAE SDK 1.1.6 (released 11/17/08), you can filter and sort based on entity key as __key__ which is useful for efficient pagination. http://code.google.com/appengine/docs/datastore/queriesandindexes.html#Queries_on_Keys Web2py does not yet offer support, since it is a new feature for GAE.

[web2py:12602] Re: one to many relations

2008-11-28 Thread pmate
Thanks for your quick replay. My problem is there: i don't want the relation on id of violazioni because if i delete a record the id sequence would change. For example in violazioni: id codice violazione 1 1 something 2 2 other thing 3 3 an other thing Well, if i delete

[web2py:12603] Re: GAE suggestion

2008-11-28 Thread mdipierro
Robin, should I expect a patch? ;-) Massimo On Nov 28, 9:17 am, Robin B <[EMAIL PROTECTED]> wrote: > Now in GAE SDK 1.1.6 (released 11/17/08), you can filter and sort > based on entity key as __key__ which is useful for efficient > pagination. > > http://code.google.com/appengine/docs/datastore

[web2py:12604] Re: one to many relations

2008-11-28 Thread mdipierro
You cannot do it. I do not consider this a good software engineering practice. You reference a record, not a field. The record should therefore be referenced by its unique id. Different is the issue of representing the reference field. You can make a join and display codice instead of id in view

[web2py:12605] Re: Downside / Critique of web2py

2008-11-28 Thread Robin B
> 1) did you experience any scalability problems with web2py? More of an efficiency problem: web2py's exec magic means models, views and controllers are read, parsed and compiled for every request on GAE. > 2) How large did you scale it? Not large > 3) What are the features that you believe ar

[web2py:12606] Re: one to many relations

2008-11-28 Thread pmate
Yes, but in this case field codice is unique too. The only difference is that i want to choose its value, not the autoincrement of an id field. Paolo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framew

[web2py:12607] Re: Downside / Critique of web2py

2008-11-28 Thread mdipierro
Hi Robin, These are the number I get in one of my test: http://mdp.cti.depaul.edu/AlterEgo/default/show/131 There should be a way to cache the bytecode compiled models/views/ controllers on GAE. It will be implemented soon. Massimo On Nov 28, 9:51 am, Robin B <[EMAIL PROTECTED]> wrote: > > 1)

[web2py:12608] Checkbox processing

2008-11-28 Thread billf
Harking back to an ancient thread, I think I have finally tracked down what I think is a grey area in checkbox processing. The "book" says: (When a form is accepted) "If the keepvalues is set to True the form is pre-populated with the previously inserted values." It doesn't say, specifically wha

[web2py:12609] Re: one to many relations

2008-11-28 Thread mdipierro
I stand by my answer. Let me elaborate on it 1) do what Denes suggest: db.define_table('sanzioni', SQLField('violazioni_id',db.violazioni), SQLField('descrizione','text'), SQLField('sanzione',length=32), SQLField('note','text')) db.sanzioni.violazioni_id.

[web2py:12610] Re: one to many relations

2008-11-28 Thread mdipierro
PS. Of course you can also do: db.define_table('sanzioni', SQLField('violazioni_codice'), SQLField('descrizione','text'), SQLField('sanzione',length=32), SQLField('note','text')) db.sanzioni.violazioni_codice.requires=IS_IN_DB (db,'violazioni.codice','

[web2py:12611] Re: Field alias

2008-11-28 Thread Tari
Thanks a million. I'll do that later, and see what happens. By the way, interestingly enough, I did try a similar approach previously, also with an error which I don't recall right now. The code was: print rows[0]._extra[int(shortname)] (since the fields were integers) On Nov 28, 3:34 pm, mdipie

[web2py:12612] Re: one to many relations

2008-11-28 Thread pmate
Your second solution is exactly that one that i have chosen as alternative to my first question. Thanks a lot Paolo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group,

[web2py:12613] Re: Field alias

2008-11-28 Thread mdipierro
shortname is an object that represents your query. The key in _extra is stored a string representation of the query. That is why you need str(..) not int(...). Since 1.51 the str(...) is automatic. Massimo On Nov 28, 10:25 am, Tari <[EMAIL PROTECTED]> wrote: > Thanks a million. I'll do that late

[web2py:12614] Re: Checkbox processing

2008-11-28 Thread mdipierro
I think you are right! I will put this in the next version. Thank you Bill! Massimo On Nov 28, 10:05 am, billf <[EMAIL PROTECTED]> wrote: > Harking back to an ancient thread, I think I have finally tracked down > what I think is a grey area in checkbox processing. > > The "book" says: (When a fo

[web2py:12615] Re: one to many relations

2008-11-28 Thread DenesL
Note: with the second solution a record from table violazioni will not have an autocreated sanzioni attribute which allows things like: for v in db().select(db.violazioni.ALL): print v.codice for s in v.sanzioni.select(): print '',s.sanzione On Nov 28, 11:34 am, pmate <[EMAI

[web2py:12616] Re: one to many relations

2008-11-28 Thread mdipierro
Should we allow references other than to the id field? Massimo On Nov 28, 2:04 pm, DenesL <[EMAIL PROTECTED]> wrote: > Note: with the second solution a record from table violazioni will not > have an autocreated sanzioni attribute which allows things like: > > for v in db().select(db.violazioni.

[web2py:12617] new in trunk...

2008-11-28 Thread mdipierro
the new admin check for upgrades via ajax thus it does not prevent login when my server is down. Please give it a try. Massimo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to

[web2py:12618] Re: Checkbox processing

2008-11-28 Thread mdipierro
Bill, shouldn't 'ON' in slqhtml.py also be 'on'? On Nov 28, 10:05 am, billf <[EMAIL PROTECTED]> wrote: > Harking back to an ancient thread, I think I have finally tracked down > what I think is a grey area in checkbox processing. > > The "book" says: (When a form is accepted) "If the keepvalues

[web2py:12619] Re: Checkbox processing

2008-11-28 Thread billf
The html created for a checkbox sets the checked= attribute if the field is true but does not set the value= attribute. The default value= is 'on' (lower case) so that is what is in the request.var if the box is checked. Hence , the check for 'on' is correct. There is probably an argument for s

[web2py:12620] Re: web2py book in PDF at $12.50

2008-11-28 Thread Carlos Man
Great! Thanks, Massimo. I just got it. I am from Panama. I had some problems using PayPal, but then I switched to use my credit card directly with Lulu.com (I trust them, since I have bought from them before), and everything went OK. I just transferred your PDF to my Sony PRS-505 eBook reader, a

[web2py:12621] Re: web2py book in PDF at $12.50

2008-11-28 Thread mdipierro
Thank you Carlos. Massimo On Nov 28, 4:15 pm, Carlos Man <[EMAIL PROTECTED]> wrote: > Great! Thanks, Massimo. > > I just got it. I am from Panama. I had some problems using PayPal, but > then I switched to use my credit card directly with Lulu.com (I trust > them, since I have bought from them b