[web2py:33897] Re: bug in Rows.last()

2009-10-28 Thread Joe Barnhart
I love the functionality, but doesn't calling the function "where" conjure up the SQL WHERE clause? I might think it was doing something with SELECT...WHERE in the underlying DB. -- Joe B. On Oct 27, 10:11 pm, "mr.freeze" wrote: > Works! Would you be interested in these for sql.py Rows class?:

[web2py:33898] image manipulation

2009-10-28 Thread Pepe
Hello! somebody know how to make versions of images upon upload? something like "full-image", "medium-image" and "thumbnail" ?? thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post t

[web2py:33899] Insert Element into FORM()?

2009-10-28 Thread Sebastian Brandt
Hello everyone, I have a question regarding the FORM() Element: I have a variable table which contains a table that is build by a for loop from a DB Query. able = TABLE(_class='data', _id='example') table.append(THEAD(TH('Severity'),TH('Status'), TH('Time submitted'), TH('Host'), TH('Message

[web2py:33900] Re: Google Groups is Dead

2009-10-28 Thread salingrosso
I think that we could use something like mailman for the mailing list (but I must say that for now I hadn't problems with google groups) and we should have also a forum. I don't think that we must necessarily use a forum software realized in web2py, not immediately at least. 2009/10/28 mdipierro

[web2py:33901] GAE "DALRef" error

2009-10-28 Thread Richard
hello, I noticed the following error with GAE (both dev server and real) after updating from trunk: ERROR2009-10-28 09:09:53,800 restricted.py:154] Traceback (most recent call last): File "/web2py/gluon/main.py", line 424, in wsgibase session._try_store_in_db(request, response) File

[web2py:33902] Re: image manipulation

2009-10-28 Thread Richard
in the upload part of the controller you could create different sized images with PIL. On Oct 28, 6:55 pm, Pepe wrote: > Hello! > > somebody know how to make versions of images upon upload? something > like "full-image", "medium-image" and "thumbnail" ?? > > thanks! --~--~-~--~~

[web2py:33903] doctesting

2009-10-28 Thread hamdy.a.farag
sorry for the inconvenience, this question may be repeated a friend of mine can't just post in the group (may be he's just not approved to join) but he's having a problem testing SQLFORM using doctesting So how can this be done ? def using_doc_testing(): ''' >>> contactForm1 = SQLFOR

[web2py:33904] Re: GAE caching

2009-10-28 Thread Richard
that's really useful - thanks Robin! if Python handlers last ~15 seconds then wouldn't cron be fast enough (at 1/sec)? Task queue is labelled experimental so I am wary to use it at the moment. Richard On Oct 28, 4:13 pm, Robin B wrote: > > How long does it stay cached? > > Inactive Python han

[web2py:33905] Re: image manipulation

2009-10-28 Thread Sebastian Brandt
Hi Pepe, I haven't tried it but it seems that there is a python library for image processing. You may want to have a look @ http://www.pythonware.com/products/pil/index.htm The Handbook (with an example for thumbnails) is located @ http://www.pythonware.com/library/pil/handbook/introduction.htm

[web2py:33906] Re: Insert Element into FORM()?

2009-10-28 Thread DenesL
Sebastian, you must always pass arguments in proper sequence, first the ones without keywords (e.g. table) then the keyword ones (e.g. _id): form = FORM( table, INPUT (_type="submit",_value="SUBMIT"),_id='form_22') Denes. --~--~-~--~~~---~--~~ You received this

[web2py:33907] Re: Insert Element into FORM()?

2009-10-28 Thread Sebastian Brandt
Hey Denes, thank you very much, I didn't know yet that the order was important. I will try it :-) Sebastian On 28 Okt., 11:46, DenesL wrote: > Sebastian, > > you must always pass arguments in proper sequence, > first the ones without keywords (e.g. table) > then the keyword ones (e.g. _id): >

[web2py:33909] w2p as wsgi middleware

2009-10-28 Thread hcvst
Hi, can I dispatch from a w2p controller to another wsgi app? Sth like: def index(): wsgiapp(env, start_response) Alternatively, is there a method to write the HTTP response directly, where 'directly' could mean directly to the socket itself? Thanks,. HC --~--~-~--~~--

[web2py:/] How to prevent an ldap-login to auto-register

2009-10-28 Thread Johann Spies
I am using ldap-authentication and it seems that a successful login against the ldap-tree results in automatic access to the system as a registered user. I do not want that. How can I redirect login to the registration function if a non-existing user tries to login? I have the following authent

[web2py:33910] Re: auth.settings.controller is not backward compatible

2009-10-28 Thread Alex Fanjul
The same for me... El 28/10/2009 7:29, Russell escribió: > Hi, > > Upgrading to Version 1.68.2 broke the Auth in my applications. The > bug: when a user is visiting a controller other than 'default' and the > the login cookie expires, the ?_next parameter incorrectly bounces > them back to the '

[web2py:33911] Re: GAE caching

2009-10-28 Thread Robin B
Oops typo: I said cron is 1/sec it actually its 1/minute, task queue is 10/second, so cron is not fast enough but task queue is plenty fast. Robin On Oct 28, 4:18 am, Richard wrote: > that's really useful - thanks Robin! > > if Python handlers last ~15 seconds then wouldn't cron be fast enough

[web2py:33912] Re: Google Groups is Dead

2009-10-28 Thread Timbo
The forum option has been discussed multiple times. Let me (once again) throw in my support for it. pyForum: - Provides working search-ability (sorry Groups still sucks hard in this area) - Allows one to still receive emails - Fills a gap for those of us who want to keep up with the community bu

[web2py:33913] Re: Google Groups is Dead

2009-10-28 Thread Timbo
One more note against Google Groups. I've been flagged as a spammer before and got kicked off the list because my email was self-hosted for a time. For a week, I thought the list was dead. Then I logged in and saw the note. This is the point at which I switched to digest mode. On Oct 28, 8:09

[web2py:33914] Re: bug in Rows.last()

2009-10-28 Thread mr.freeze
Sounds good. Modify at will! On Oct 28, 12:26 am, mdipierro wrote: > Very much! > I propose one change. Just one API (filter) and an extra parameter > (inplace=True|False). > What you think? > > On Oct 28, 12:11 am, "mr.freeze" wrote: > > > Works! Would you be interested in these for sql.py Ro

[web2py:33915] Re: bug in Rows.last()

2009-10-28 Thread mr.freeze
No, anything post 'select' is done after the db call, including first () and last(). On Oct 28, 2:51 am, Joe Barnhart wrote: > I love the functionality, but doesn't calling the function "where" > conjure up the SQL WHERE clause?  I might think it was doing something > with SELECT...WHERE in the

[web2py:33916] IS_LOWER() validator bug

2009-10-28 Thread Doxaliber
This is my model: - db.define_table('autori', Field('nome_autore', 'string', length=300), Field('bio', 'text')) db.define_table('case_discografiche', Field('nome_casa_discog

[web2py:33917] web2py doctest with SQLFORM

2009-10-28 Thread Hamadaaway
who to use doctest with SQLFORM def test(): ''' This is a docstring. The following 3 lines are a doctest: >>> request.vars.name='Max' >>> contactForm = SQLFORM.factory(Field('name')) >>> test() {'name': 'Max' ,'contactForm':?? } ''' contactForm = SQLFORM.factor

[web2py:33918] testing a SQLFORM with doctest

2009-10-28 Thread Hamadaaway
Supposing I've a method like : def test(): ''' This is a docstring. The following 3 lines are a doctest: >>> request.vars.name='Max' >>> contactForm1 = SQLFORM(db.demo) >>> test() {'name': 'Max' ,'contactForm':contactForm1} ''' contactForm = SQLFORM(db.demo) re

[web2py:33919] Re: GAE "DALRef" error

2009-10-28 Thread mdipierro
oops. Fixed in trunk now, please try. On Oct 28, 4:13 am, Richard wrote: > hello, > > I noticed the following error with GAE (both dev server and real) > after updating from trunk: > > ERROR    2009-10-28 09:09:53,800 restricted.py:154] Traceback (most > recent call last): >   File "/web2py/gluo

[web2py:33920] Re: w2p as wsgi middleware

2009-10-28 Thread mdipierro
On Oct 28, 7:05 am, hcvst wrote: > Hi, > > can I dispatch from a w2p controller to another wsgi app? Sth like: > > def index(): >     wsgiapp(env, start_response) No > Alternatively, is there a method to write the HTTP response directly, > where 'directly' could mean directly to the socket itse

[web2py:33921] Re: auth.settings.controller is not backward compatible

2009-10-28 Thread mdipierro
Actually it was a bug before and this fixed it. In your app you can do: auth.settings.controller = response.controller auth.settings.controller = response.controller Massimo On Oct 28, 1:29 am, Russell wrote: > Hi, > > Upgrading to Version 1.68.2 broke the Auth in my applications.  The > bug:

[web2py:33922] Re: IS_LOWER() validator bug

2009-10-28 Thread mdipierro
validators are also filters so the order is important. IS_LOWER goes before IS_IN_DB On Oct 28, 8:57 am, Doxaliber wrote: > This is my model: > - > db.define_table('autori', >     Fiel

[web2py:33923] RSS service problem

2009-10-28 Thread selecta
i created a rss service with adding the following to the default controller @service.rss def showLatest(): shopnames = db().select(db.shopname.ALL,limitby=(0,20)) return dict( title=response.title, link=URL(request.application,'default','call',args= ['rss','showLat

[web2py:33925] Re: powered by web2py?

2009-10-28 Thread ont.rif
Oh, yes, I take this sign from early version of web2py. Now we use mini-banner. On Oct 27, 12:20 pm, mdipierro wrote: > Nice and useful! > > Thank you for the acknowledgment. I would prefer if you just mention > web2py and not my name (and this applies to everybody else too). It is > important t

[web2py:33924] Re: w2p as wsgi middleware

2009-10-28 Thread hcvst
Hi Massimo, I am trying to write a Google wave bot and use the wavebot client api as directly as possible as the internals are likely to change. Bots are just wsgi apps. I've changed routes_in to map all calls originating from wave to one controller function. Perhaps I should just emulate env a

[web2py:33926] yet more stuff in trunk

2009-10-28 Thread mdipierro
### given: db=DAL('sqlite://storage') db.define_table('a',Field('b')) db.a.insert(b='aaa') db.a.insert(b='aab') db.a.insert(b='abb') db.a.insert(b='bbb') row=db(db.a.id>0).select().first() ### you can do, as before print row.b row.update_record(b='yyy') ### or as you used to do in Django (NEW to

[web2py:33927] Re: RSS service problem

2009-10-28 Thread mdipierro
One of your variables (response.description, response.title, ..?) is a T(), it should be a str(T()) else it cannot be serialized in XML. On Oct 28, 9:28 am, selecta wrote: > i created a rss service with adding the following to the default > controller > > @service.rss > def showLatest():

[web2py:33928] Re: bug in Rows.last()

2009-10-28 Thread Joe Barnhart
I know, that's what I'm saying the word "where" suggests it is an SQL verb but it has nothing to do with SQL. I was just thinking it might be confusing to new users of w2p. On Wed, Oct 28, 2009 at 6:32 AM, mr.freeze wrote: > > No, anything post 'select' is done after the db call, including

[web2py:33929] Re: w2p as wsgi middleware

2009-10-28 Thread mdipierro
I would do the same, the problem is the original environment is not passed to the function there should be a hook for that. Something like: request._wsgi_environ Massimo On Oct 28, 9:42 am, hcvst wrote: > Hi Massimo, > > I am trying to write a Google wave bot and use the wavebot client api >

[web2py:33930] Re: bug in Rows.last()

2009-10-28 Thread mdipierro
OK I just put the where function in trunk but renamed it filter (sorry for the confusion). On Oct 28, 10:11 am, Joe Barnhart wrote: > I know, that's what I'm saying the word "where" suggests it is an SQL > verb but it has nothing to do with SQL.  I was just thinking it might be > confusing

[web2py:33931] Re: Google Groups is Dead

2009-10-28 Thread Julio
- Provides working search-ability (sorry Groups still sucks hard in this area) Timbo - Can you explain what you mean by "groups" in pyforum (and any suggestions you may have that might be useful to implement)? (if this goes a bit off-topic, feel free to reply to me directly) - Thanks.. On Oct 2

[web2py:33932] Re: yet more stuff in trunk

2009-10-28 Thread Alex Fanjul
We will have to document this 'database stuffs' very well because I'm lost with so many new features. The best documentation for me is finally an example like this (maybe in more real context). Thanks for new features Massimo, Alex F El 28/10/2009 16:08, mdipierro escribió: > ### given: > db=D

[web2py:33933] Re: Making a reference to an auth_user

2009-10-28 Thread Thadeus Burgess
Congratz! -Thadeus On Tue, Oct 27, 2009 at 10:22 PM, Wiiboy wrote: > > Wait. They do have date valuesI'm just accessing them wrong. > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users"

[web2py:33934] Re: yet more stuff in trunk

2009-10-28 Thread mdipierro
You are right and it is still changing. Correction on previous post: ### given: db=DAL('sqlite://storage') db.define_table('a',Field('b')) db.a.insert(b='aaa') db.a.insert(b='aab') db.a.insert(b='abb') db.a.insert(b='bbb') row=db(db.a.id>0).select().first() ### you can do, as before print row.b

[web2py:33935] Re: bug in Rows.last()

2009-10-28 Thread Alex Fanjul
But filter function is in use for remove items, isnt it? maybe im wrong def filter(self,f): > > > > if not self.response: > > > > return None > > > > rows = self.response > > > > removed = [] > > > > for i in range(0,len(self)): > > > >

[web2py:33936] Re: More experimental stuff in trunk

2009-10-28 Thread Thadeus Burgess
Yes, but I want to be able to apply the virtualfield to every row, like how SUM or AVG would work. In this example, I would print a spreadsheet view of all sales, and I would want at the very bottom of the report, GROSS TOTAL SALES w/ TAX. For this to happen, I would need to SUM my virtualfield V

[web2py:33937] Re: bug in Rows.last()

2009-10-28 Thread mr.freeze
Now I'm confused :) What if you just changed the 'where' to 'find' and kept both. Filter should reduce the actual set, returning the removed rows. Find should just return the matched rows. On Oct 28, 10:15 am, mdipierro wrote: > OK I just put the where function in trunk but renamed it filter

[web2py:33938] Searching

2009-10-28 Thread __Kyo__
Hi everyone, i have to make a searcher, i have to put in my input a letter like "a" and then i want to search this letter in all the tables that are in the database. i made this code, but the problem i have in the moment i have to show or capture the solution. Could you please help me with this?

[web2py:33939] Re: bug in Rows.last()

2009-10-28 Thread Thadeus Burgess
So... filter is to "if a != b" find is to "if a == b" -Thadeus On Wed, Oct 28, 2009 at 10:51 AM, mr.freeze wrote: > > Now I'm confused :) What if you just changed the 'where' to 'find' > and kept both. Filter should reduce the actual set, returning the > removed rows. Find should just re

[web2py:33940] Re: bug in Rows.last()

2009-10-28 Thread mdipierro
Ok, I am going with filter (same as your find) and extract (same as your filter with some changes to make it faster and issue that caused it to skip some rows). In trunk now. Massimo On Oct 28, 10:51 am, "mr.freeze" wrote: > Now I'm confused :)  What if you just changed the 'where' to 'find' >

[web2py:33941] Re: Searching

2009-10-28 Thread mdipierro
Do not use exec: exec('selected=[db.%s.fields]' % (i)) #The list of the rewrite as selected = db[i].fields This exec('datos=[m.id for m in db().select(db.%s.ALL) if string.lower(str(request.vars.dato))\ in string.lower(str(m.%s))]' % (i, j[

[web2py:33942] Re: bug in Rows.last()

2009-10-28 Thread mdipierro
On a third thougth. Mr Freeze original names are better (find and filter it is). I added slices too. Here is an example: b=DAL('sqlite://storage') db.define_table('a',Field('b')) db.a.insert(b='aaa') db.a.insert(b='aab') db.a.insert(b='abb') db.a.insert(b='bbb') ### return rows that match condi

[web2py:33943] Re: bug in Rows.last()

2009-10-28 Thread mr.freeze
Very nice. On Oct 28, 11:58 am, mdipierro wrote: > On a third thougth. Mr Freeze original names are better (find and > filter it is). I added slices too. Here is an example: > > b=DAL('sqlite://storage') > db.define_table('a',Field('b')) > db.a.insert(b='aaa') > db.a.insert(b='aab') > db.a.inser

[web2py:33944] Re: w2p as wsgi middleware

2009-10-28 Thread hcvst
Rough and dirty - but works for capabilities.xml already. It's odd that google's start_response returns a write method - at least it's not what the wsgi tutorials do - and does not return anything from the app (env, start_response) call. Oh well. --- # coding: utf8 import sys import cStringIO

[web2py:33945] Re: bug in Rows.last()

2009-10-28 Thread Jonathan Lundell
On Oct 28, 2009, at 9:58 AM, mdipierro wrote: > > On a third thougth. Mr Freeze original names are better (find and > filter it is). Your use of 'filter' (or my confusion about it) for both cases illustrates its ambiguity. How about 'find' and 'exclude'? > I added slices too. Here is an examp

[web2py:33946] Re: bug in Rows.last()

2009-10-28 Thread mr.freeze
I think you may be right. What about 'remove' instead of filter? On Oct 28, 12:23 pm, Jonathan Lundell wrote: > On Oct 28, 2009, at 9:58 AM, mdipierro wrote: > > > > > On a third thougth. Mr Freeze original names are better (find and > > filter it is). > > Your use of 'filter' (or my confusion a

[web2py:33947] Re: bug in Rows.last()

2009-10-28 Thread Jonathan Lundell
On Oct 28, 2009, at 10:28 AM, mr.freeze wrote: > > I think you may be right. What about 'remove' instead of filter? Sure. > > On Oct 28, 12:23 pm, Jonathan Lundell wrote: >> On Oct 28, 2009, at 9:58 AM, mdipierro wrote: >> >> >> >>> On a third thougth. Mr Freeze original names are better (find

[web2py:33948] Re: bug in Rows.last()

2009-10-28 Thread Alex Fanjul
I agree with Jonathan, (find) and (exclude) are the best. Filter is like "let me this in the result" (just the opposite sense), and remove is like "real remove this from my database" So... '*Find*' this in my rows, BUT also *Exclude *this from my results! Alex F El 28/10/2009 18:23, Jonathan Lu

[web2py:33949] Re: w2p as wsgi middleware

2009-10-28 Thread mdipierro
cool! would you make a pyslice? On Oct 28, 12:20 pm, hcvst wrote: > Rough and dirty - but works for capabilities.xml already. It's odd > that google's start_response returns a write method - at least it's > not > what the wsgi tutorials do - and does not return anything from the app > (env, star

[web2py:33950] Re: bug in Rows.last()

2009-10-28 Thread mdipierro
deal! uploading. On Oct 28, 12:42 pm, Alex Fanjul wrote: > I agree with Jonathan, (find) and (exclude) are the best. > Filter is like "let me this in the result" (just the opposite sense), > and remove is like "real remove this from my database" > > So... '*Find*' this in my rows, BUT also *Excl

[web2py:33951] New web2pyslice on deploying web2py to slicehost, or other VPS.

2009-10-28 Thread Thadeus Burgess
Here is a quickstart guide to deploying web2py on slicehost vps. This is how I set up surrenderthebooty.thadeusb.com http://www.web2pyslices.com/main/slices/take_slice/14 -Thadeus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

[web2py:33952] Re: New web2pyslice on deploying web2py to slicehost, or other VPS.

2009-10-28 Thread mr.freeze
Excellent! I gave it 5 stars. Don't forget to subscribe to comments if you want to be alerted when people post feedback. On Oct 28, 1:08 pm, Thadeus Burgess wrote: > Here is a quickstart guide to deploying web2py on slicehost vps. This is how > I set up surrenderthebooty.thadeusb.com > > http:/

[web2py:33953] Re: Searching

2009-10-28 Thread __Kyo__
Thanks, it will be very helpful, but how can i solve the initial problem? On Oct 28, 11:21 am, mdipierro wrote: > Do not use exec: > >     exec('selected=[db.%s.fields]' % (i))  #The list of the > > rewrite as > >     selected = db[i].fields > > This > >     exec('datos=[m.id for m in db().sele

[web2py:33954] AlterEgo entry on new features (OR, LIKE, BELONGS, etc. on GAE!)

2009-10-28 Thread mdipierro
http://www.web2py.com/AlterEgo/default/show/248 Please give this a try before we make it stable --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@google

[web2py:33955] Re: AlterEgo entry on new features (OR, LIKE, BELONGS, etc. on GAE!)

2009-10-28 Thread mdipierro
I should have made a slice. I will when it is stable. On Oct 28, 1:41 pm, mdipierro wrote: > http://www.web2py.com/AlterEgo/default/show/248 > > Please give this a try before we make it stable --~--~-~--~~~---~--~~ You received this message because you are subscri

[web2py:33956] Re: Searching

2009-10-28 Thread mdipierro
It does not. can you make a concrete example of data and what you expect in the output? Massimo On Oct 28, 1:13 pm, __Kyo__ wrote: > Thanks, it will be very  helpful, but how can i solve the initial > problem? > > On Oct 28, 11:21 am, mdipierro wrote: > > > Do not use exec: > > >     exec('se

[web2py:33957] new web2py book in the works?

2009-10-28 Thread Nick
Hello All, I'm a fan of web2py, bought the ebook this past spring, even went down to the printers and paid to have it printed out and binded (hate reading books off my computer screen). Didn't have a chance to get too much development with web2py over the summer unfortunately. However, now that

[web2py:33958] Re: Google Groups is Dead

2009-10-28 Thread snfctech
Is maintaining a forum really a significant time drain for a serious FOSS project? Can someone help me understand why it is okay to let a thread expire on a group? I can't count the number of times I have resurrected an old thread to add more info that I have found out - or have messages sent to

[web2py:33959] Re: new web2py book in the works?

2009-10-28 Thread mdipierro
The printed second edition is already available (and cheaper): http://he-cda.wiley.com/WileyCDA/Section/id-321954.html but somehow Amazon did not pick that up. I have been complaining with the publisher for one month. Massimo On Oct 28, 1:06 pm, Nick wrote: > Hello All, > >  I'm a fan of web2

[web2py:33960] Re: AlterEgo entry on new features (OR, LIKE, BELONGS, etc. on GAE!)

2009-10-28 Thread Thadeus Burgess
There is a typo rows = db(purchase.product==product.id)(purchase.buyer==buyer.id).select() Should be rows = db((purchase.product==product.id)(purchase.buyer==buyer.id)).select() -Thadeus On Wed, Oct 28, 2009 at 1:42 PM, mdipierro wrote: > > I should have made a slice. I will when it is s

[web2py:33961] Re: Google Groups is Dead

2009-10-28 Thread mdipierro
Good points. On Oct 28, 1:46 pm, snfctech wrote: > Is maintaining a forum really a significant time drain for a serious > FOSS project? Mantaining the mailing list is not a dignificant drain. repeatedly answering the same emails it. A for can chance that only maintaining the forum does not make

[web2py:33962] Re: AlterEgo entry on new features (OR, LIKE, BELONGS, etc. on GAE!)

2009-10-28 Thread mdipierro
No rows = db(purchase.product==product.id) (purchase.buyer==buyer.id).select() is correct (subset of a set) and equivalent to rows = db((purchase.product==product.id)& (purchase.buyer==buyer.id)).select() This rows = db((purchase.product==product.id) (purchase.buyer==buyer.id)).selec

[web2py:33963] Re: AlterEgo entry on new features (OR, LIKE, BELONGS, etc. on GAE!)

2009-10-28 Thread Thadeus Burgess
Ah. I see. Sorry. -Thadeus On Wed, Oct 28, 2009 at 1:55 PM, mdipierro wrote: > > No > > rows = db(purchase.product==product.id) > (purchase.buyer==buyer.id).select() > > is correct (subset of a set) and equivalent to > > rows = db((purchase.product==product.id)& > (purchase.buyer==buyer.

[web2py:33964] Re: new web2py book in the works?

2009-10-28 Thread Nick
Unfortunately, since I live in the Czech Republic, it's cheaper for me to buy the eBook & print/bind it - rather than pay shipping. Is there a 3rd edition planned anytime soon? On Oct 28, 7:46 pm, mdipierro wrote: > The printed second edition is already available (and cheaper): > > http://he-c

[web2py:33965] Re: new web2py book in the works?

2009-10-28 Thread mdipierro
There is a second edition on lulu: http://www.lulu.com/content/4968879 There will be a 3rd ed but not too soon. massimo On Oct 28, 2:10 pm, Nick wrote: > Unfortunately, since I live in the Czech Republic, it's cheaper for me > to buy the eBook & print/bind it - rather than pay shipping. > >

[web2py:33966] Re: bug in Rows.last()

2009-10-28 Thread mr.freeze
Interested in these? Handy for paging through stuff you've already pulled from the db (otherwise limitby is best): rows = db().select(db.things.ALL) skip - bypass the specified number of elements and return the rest take - return the specified number of elements from the beginning >page = rows.

[web2py:33967] Re: bug in Rows.last()

2009-10-28 Thread mdipierro
Thanks. I just implemented. I guess we had the same idea. page = rows[pagenum*pagesize:pagenum*pagesize+pagesize] I am about to release 1.69.1 in 5 minutes. Any more ideas to hold on for? Massimo On Oct 28, 2:59 pm, "mr.freeze" wrote: > Interested in these? Handy for paging through stuff you'

[web2py:33968] Re: bug in Rows.last()

2009-10-28 Thread mr.freeze
I wanted to do an 'each' to process all rows in place but it got too complicated trying to convert the DALStorage back into a Rows object. Nothing else from me. On Oct 28, 3:03 pm, mdipierro wrote: > Thanks. I just implemented. I guess we had the same idea. > > page = rows[pagenum*pagesize:pagen

[web2py:33969] Re: bug in Rows.last()

2009-10-28 Thread Thadeus Burgess
Is expressions that get applied to all rows for a column on hold? I still would like a way to sum an integer virtualfield. -Thadeus On Wed, Oct 28, 2009 at 3:10 PM, mr.freeze wrote: > > I wanted to do an 'each' to process all rows in place but it got too > complicated trying to convert the D

[web2py:33970] +new class and functions

2009-10-28 Thread haftish21
I've my own class & some functions, that need db back-end. I want to embed it in my application by running it right from the model. How? can any1 help me plz. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-us

[web2py:33971] Re: bug in Rows.last()

2009-10-28 Thread mr.freeze
Like sum/avg/min/max? On Oct 28, 3:13 pm, Thadeus Burgess wrote: > Is expressions that get applied to all rows for a column on hold? I still > would like a way to sum an integer virtualfield. > > -Thadeus > > On Wed, Oct 28, 2009 at 3:10 PM, mr.freeze wrote: > > > I wanted to do an 'each' to pr

[web2py:33972] Re: bug in Rows.last()

2009-10-28 Thread Thadeus Burgess
Yes, but for virtualfields. -Thadeus On Wed, Oct 28, 2009 at 3:36 PM, mr.freeze wrote: > > Like sum/avg/min/max? > > On Oct 28, 3:13 pm, Thadeus Burgess wrote: > > Is expressions that get applied to all rows for a column on hold? I still > > would like a way to sum an integer virtualfield.

[web2py:33973] Re: bug in Rows.last()

2009-10-28 Thread mr.freeze
I'm not sure. That would be handy though. On Oct 28, 3:38 pm, Thadeus Burgess wrote: > Yes, but for virtualfields. > > -Thadeus > > On Wed, Oct 28, 2009 at 3:36 PM, mr.freeze wrote: > > > Like sum/avg/min/max? > > > On Oct 28, 3:13 pm, Thadeus Burgess wrote: > > > Is expressions that get appli

[web2py:33974] Re: bug in Rows.last()

2009-10-28 Thread Thadeus Burgess
Guess I could always do it manually as I loop through the records :) Think of an invoice. It has items on it, each has a price, and tax, and a total. Total is a virtualfield calculated from price * tax. At the end of the invoice, it needs to display the total for all items on the invoice. Now thi

[web2py:33975] Re: bug in Rows.last()

2009-10-28 Thread mr.freeze
If min/max/sum/avg functions were added to Rows it would work on Rows with or without virtualfields since setvirtualfields returns Rows. On Oct 28, 3:49 pm, Thadeus Burgess wrote: > Guess I could always do it manually as I loop through the records :) > > Think of an invoice. It has items on it,

[web2py:33976] GAE don't create table ?

2009-10-28 Thread Leandro - ProfessionalIT
Hi, I'm testing a new app in GAE but after upload the app, it don't create the tables. Any idea ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py

[web2py:33977] 1.69.1 is OUT

2009-10-28 Thread mdipierro
Please check it form mistakes. There many many new features in trunk. too many that I do not have the time to describe them all. Here is a partial list: 1) Lots of new DAL API described briefly here: http://www.web2py.com/AlterEgo/default/show/248 2) Support for legacy databases and non

[web2py:33978] Re: GAE don't create table ?

2009-10-28 Thread mdipierro
I think it does so only after you insert some data in it. Did you try? On Oct 28, 4:07 pm, Leandro - ProfessionalIT wrote: > Hi, > >   I'm testing a new app in GAE but after upload the app, it don't > create the tables. > >   Any idea ? --~--~-~--~~~---~--~~ You r

[web2py:33979] Re: +new class and functions

2009-10-28 Thread mdipierro
Not sure I understand. If you want to use you classes/model form web2py, just include the files and make sure they are in PYTHONPATH If you want to run your programs from a shell and allow them to access models and web2py API do python web2py.py -S appname -M -R yourprogram.py check out

[web2py:33980] Re: bug in Rows.last()

2009-10-28 Thread mr.freeze
Massimo, should 'sort' be modified to return a Rows object instead of a list so that you can keep chaining?: rows.sort(lambda row: row.quantity)[0:100].find(lambda row: row.cost > 100) On Oct 28, 3:03 pm, mdipierro wrote: > Thanks. I just implemented. I guess we had the same idea. > > page = ro

[web2py:33981] Re: GAE don't create table ?

2009-10-28 Thread Leandro - ProfessionalIT
On Oct 28, 7:09 pm, mdipierro wrote: > I think it does so only after you insert some data in it. Did you try? > Master, Sorry by my stupid question...but how to insert a data if the table not exists ? -- Leandro. --~--~-~--~~~---~--~~ You received this messag

[web2py:33982] Re: bug in Rows.last()

2009-10-28 Thread mdipierro
In reference to the last example in http://www.web2py.com/AlterEgo/default/show/248 you can do total_revenues = sum([row.revenues for row in rows]) I do not think the total by columns belong to the table itself. Massimo On Oct 28, 3:13 pm, Thadeus Burgess wrote: > Is expressions that get

[web2py:33983] Re: GAE don't create table ?

2009-10-28 Thread mdipierro
Good point. I guess I do not understand the question. Do you have a define_table ('mytable'..) in the models? How and where are you trying to perform the db.mytable.insert(...) Please show us some code? Massimo On Oct 28, 4:11 pm, Leandro - ProfessionalIT wrote: > On Oct 28, 7:09 pm, mdipierr

[web2py:33984] Re: New web2pyslice on deploying web2py to slicehost, or other VPS.

2009-10-28 Thread Alex Fanjul
Definitelly I Lilke web2py slices!! Great Slice, I hope it works for vps.net too. thanks Thadeus, Alex F El 28/10/2009 19:11, mr.freeze escribió: > Excellent! I gave it 5 stars. Don't forget to subscribe to comments > if you want to be alerted when people post feedback. > > On Oct 28, 1:08 pm,

[web2py:33985] Re: New web2pyslice on deploying web2py to slicehost, or other VPS.

2009-10-28 Thread Thadeus Burgess
Np. It should work for any Ubuntu system, VPS or box. The steps are definitely valid for other distributions as well, the commands will just need to be altered, since every distribution likes to put apache config files in different locations etc etc -Thadeus On Wed, Oct 28, 2009 at 4:22 PM, A

[web2py:33986] Re: GAE don't create table ?

2009-10-28 Thread Leandro - ProfessionalIT
Massimo, You are right !, I need insert a data to create the tables. What I did was create an application called init and upload to the GAE, then I went to see in the "Data View" and the tables were not shown. I register a user and all tables show in Data View. Sorry by my dummie question.

[web2py:33987] Re: mod_wsgi web2py AliasMatch what serves the files apache/web2py?

2009-10-28 Thread Thadeus Burgess
Thank you for your help Graham. I [SOLVED] the problem by moving to slicehost :) -Thadeus On Sat, Oct 24, 2009 at 3:48 AM, Graham Dumpleton < graham.dumple...@gmail.com> wrote: > > The other possibility of why you are having problems is that you have > conflicting VirtualHost definitions due

[web2py:33988] Re: 1.69.1 is OUT

2009-10-28 Thread mr.freeze
With each keystroke web2py grows stronger... On Oct 28, 4:08 pm, mdipierro wrote: > Please check it form mistakes. > > There many many new features in trunk. too many that I do not have the > time to describe them all. > Here is a partial list: > > 1) > Lots of new DAL API described briefly here

[web2py:33989] Re: new web2py book in the works?

2009-10-28 Thread Nick
Thanks Massimo, with the frequency of new releases, it seems odd to buy the same book every year. as most second edition books don't come out one year after the original. Not trying to complain here, but just trying to raise the point that the book may be taking the place of up-to-date documentat

[web2py:33990] Re: 1.69.1 is OUT

2009-10-28 Thread Jason Brower
Wow, I mean, woah, gees cool... J On Wed, 2009-10-28 at 14:41 -0700, mr.freeze wrote: > With each keystroke web2py grows stronger... > > On Oct 28, 4:08 pm, mdipierro wrote: > > Please check it form mistakes. > > > > There many many new features in trunk. too many that I do not have the > > time

[web2py:33991] Re: new web2py book in the works?

2009-10-28 Thread Thadeus Burgess
Documentation is something we are working on right now. I'll let Massimo explain why he has a book :) -Thadeus On Wed, Oct 28, 2009 at 5:05 PM, Nick wrote: > > Thanks Massimo, with the frequency of new releases, it seems odd to > buy the same book every year. as most second edition books do

[web2py:33992] Re: new web2py book in the works?

2009-10-28 Thread Jason Brower
If you buy the book once, you get the "upgrades" for free. :P Jason Brower On Wed, 2009-10-28 at 15:05 -0700, Nick wrote: > Thanks Massimo, with the frequency of new releases, it seems odd to > buy the same book every year. as most second edition books don't come > out one year after the original.

[web2py:33993] Re: Google Groups is Dead

2009-10-28 Thread Richard
I think he was meaning that search sucks in Google Groups (not pyforum). Correct me if wrong. On Oct 29, 2:29 am, Julio wrote: > - Provides working search-ability (sorry Groups still sucks hard in > this area) > > Timbo - Can you explain what you mean by "groups" in pyforum (and any > suggestio

[web2py:33994] Re: GAE caching

2009-10-28 Thread Richard
The docs say a task will run when resources are free. In your experience do the tasks generally run on time? Also how would you make a task run periodically? My understanding is they are for one off events and cron is for periodic. Richard On Oct 28, 11:23 pm, Robin B wrote: > Oops typo: I sai

[web2py:33995] Re: Searching

2009-10-28 Thread __Kyo__
Hi i have 3 tables product, produtType, inventory productType have the default id, name and description Product have the default id productType, price, quantity invetory have the default id, name, location, products So i want to find a product, but i dont remember the exact name of it. So i go

[web2py:33996] Re: new web2py book in the works?

2009-10-28 Thread Richard
yep I can confirm it - I got the 2nd edition (PDF) for free On Oct 29, 9:07 am, Jason Brower wrote: > If you buy the book once, you get the "upgrades" for free. :P > Jason Brower > > On Wed, 2009-10-28 at 15:05 -0700, Nick wrote: > > Thanks Massimo, with the frequency of new releases, it seems

  1   2   >