[web2py:10580] geocoding on GAE?

2008-10-23 Thread mdipierro
Why does this not work on gae? def urlopen(url): try: from google.appengine.api.urlfetch import fetch if url.find('?')>=0: url,payload=url.split('?') return fetch(url,payload=payload).content return fetch(url).content

[web2py:10579] Re: Lost some work tonite

2008-10-23 Thread mdipierro
Hi Joe, actually both the administrative interface and apps based on T2 do exctly that. The timeout, by default, is set to one hour of inactivity and can be changed. Massimo On Oct 23, 7:45 pm, Joe Barnhart <[EMAIL PROTECTED]> wrote: > Maybe this is too simplistic But how about redirectin

[web2py:10578] Re: Lost some work tonite

2008-10-23 Thread Joe Barnhart
Maybe this is too simplistic But how about redirecting to the signon page the moment the session times out? This might be more of an AJAX thing. The only problem that occurred is that some dummy (i.e. me) entered a lot of text into the pane AFTER the timeout occurred because I had no idea th

[web2py:10577] Re: How to implement RESTful requests? A proposal

2008-10-23 Thread billf
Voltron I have read through the threads you referenced again and I think I can see where you are coming from. I think that part of the problem is that examples of REST rarely seem to include the parts of the user interaction where the user requests an HTML form to be used to create/update/delete

[web2py:10576] Re: Lost some work tonite

2008-10-23 Thread mdipierro
T2 it does that already. admin does it too. It is post/get vars that are lost. Massimo On Oct 23, 4:43 pm, achipa <[EMAIL PROTECTED]> wrote: > Massimo, what do you think about the login (esp in T2) remembering the > landing URL/FORM and redirecting/submitting to it again after a > successful log

[web2py:10575] Re: Lost some work tonite

2008-10-23 Thread achipa
Massimo, what do you think about the login (esp in T2) remembering the landing URL/FORM and redirecting/submitting to it again after a successful login ? On Oct 23, 7:41 pm, mdipierro <[EMAIL PROTECTED]> wrote: > Strange. ANyway, I would just increate the timeout time so that the > problem does n

[web2py:10574] Re: Lost some work tonite

2008-10-23 Thread mdipierro
Strange. ANyway, I would just increate the timeout time so that the problem does not arise again. Massimo On Oct 23, 12:38 pm, Joe Barnhart <[EMAIL PROTECTED]> wrote: > Actually, this did not work for me in FireFox 3. As soon as I used > the back key, the edit control refreshed itself and lost

[web2py:10573] Re: Lost some work tonite

2008-10-23 Thread Joe Barnhart
Actually, this did not work for me in FireFox 3. As soon as I used the back key, the edit control refreshed itself and lost all of my edits. There was no way to recover my edits from the browser at all. I am surprised that you say it works for you. As for editing files instead of using the web

[web2py:10572] Re: How to implement RESTful requests? A proposal

2008-10-23 Thread billf
Voltron As I say, REST is new to me, but I believe the practical problem is the lack of true REST clients. Most of us have to make do with HTML forms from clients that only support GET and POST. If someone wants to develop a real-world app using REST "style" URIs then I think something like I p

[web2py:10568] Re: pycon2009

2008-10-23 Thread mdipierro
Will you send me a patch to cache bytecode compiled apps? On Oct 23, 10:18 am, Robin B <[EMAIL PROTECTED]> wrote: > As long as the CGI handler defines a main() function, the handler and > all imports are cached between requests. > > Robin > > On Oct 23, 9:30 am, mdipierro <[EMAIL PROTECTED]> wrot

[web2py:10571] Re: pycon2009

2008-10-23 Thread mdipierro
Can you elaborate on 2). I do nor understand. Massimo On Oct 23, 2:35 am, "Steve Shepherd" <[EMAIL PROTECTED]> wrote: > Massimo > > After 20mins testing I ran into only a few probs. > > 1. The google map key is wrong. Refer to the png attached. > > 2. You probably need to include a check box tog

[web2py:10570] Re: How to implement RESTful requests? A proposal

2008-10-23 Thread voltron
I am not sure if your proposal would work with RESTful clients because you are not using the HTTP protocol to differentiate the actions taken. What about using decorators? http://pylonshq.com/docs/0.9/module-pylons.decorators.rest.html Or a workaround as Massimo suggested once http://groups.g

[web2py:10569] Re: joining three tables.

2008-10-23 Thread annet
Massimo, Thanks for your reply, problem solved: def byplace(): records=db((db.company.id==db.address.company)&(db.company.id==db.companyLOB.company)& \ (db.address.cityName=='Eindhoven')&(db.address.typeOfAddress==1)&(db.companyLOB.lineOfBusiness==1)) \ .select(db.company.companyName,db

[web2py:10567] Re: pycon2009

2008-10-23 Thread Robin B
As long as the CGI handler defines a main() function, the handler and all imports are cached between requests. Robin On Oct 23, 9:30 am, mdipierro <[EMAIL PROTECTED]> wrote: > but what about caching gluon/*py files? > > On Oct 23, 9:16 am, Robin B <[EMAIL PROTECTED]> wrote: > > > The poor perfor

[web2py:10561] Re: joining three tables.

2008-10-23 Thread annet
Denes and Timothy, Thanks for answering my question about the [0] thing. Denes, Adding a closing parenthesis did not solve my problem. I am struggling with what's between the db() parenthesis. As far as I can judge both my JOIN and WHERE clause should be in db(), like db((JOIN),(WHERE)). As I

[web2py:10566] Re: joining three tables.

2008-10-23 Thread Timothy Farrell
I like to do things the hard way. DenesL wrote: > Code? what code? :P > I used the DAL diagram. > Gotta have it (and the core one) pinned to the wall. > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web

[web2py:10565] Re: Lost some work tonite

2008-10-23 Thread Yarko
This is a bit of a tangent, but I've experienced this enogh that (on Firefox) I started using the plugin IT'S ALL TEXT Opens the item in your local editor of choice... This might be a good strategy in general - local composition and saving... -Original Message- From: Joe Barnhart <[

[web2py:10564] Re: pycon2009

2008-10-23 Thread mdipierro
but what about caching gluon/*py files? On Oct 23, 9:16 am, Robin B <[EMAIL PROTECTED]> wrote: > The poor performance is not a configuration problem, web2py must be > modified to cache the compiled code of models, views and controllers > instead of reading, parsing and compiling them on every req

[web2py:10563] Re: joining three tables.

2008-10-23 Thread DenesL
Code? what code? :P I used the DAL diagram. Gotta have it (and the core one) pinned to the wall. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2

[web2py:10562] Re: joining three tables.

2008-10-23 Thread mdipierro
No. db(query).select(*fields,**parameters) query is just the WHERE. If the query involves more than one table, web2py interprets it as an INNER JOIN. query can be None (or nothing) if fields are specified. If you want a LEFT OUTER JOIN db(query).select(db.table1.ALL,db.table2.ALL,left=db.table

[web2py:10560] Re: pycon2009

2008-10-23 Thread Robin B
The poor performance is not a configuration problem, web2py must be modified to cache the compiled code of models, views and controllers instead of reading, parsing and compiling them on every request. But, there is a configuration problem with the static files config in app.yaml. - url: /(?P.+?

[web2py:10559] Re: joining three tables.

2008-10-23 Thread Timothy Farrell
That's fine, I (obviously) didn't look at the code. =) DenesL wrote: > On Oct 23, 9:45 am, Timothy Farrell <[EMAIL PROTECTED]> wrote: > >> The select() call returns an SQLSet >> instance (which is an iterateable(sp?) type). >> > > Tim, sorry to nitpick here but actually select() is a metho

[web2py:10558] Re: How to implement RESTful requests? A proposal

2008-10-23 Thread mdipierro
Thank you Bill, Give me some time to digest this. This is a busy week. I would also like to hear more opinions in this regard. Massimo On Oct 23, 7:52 am, Timothy Farrell <[EMAIL PROTECTED]> wrote: > I like this a lot. If Massimo agrees this could be the "official > recommendation" for CRUD ope

[web2py:10557] Re: joining three tables.

2008-10-23 Thread DenesL
On Oct 23, 9:45 am, Timothy Farrell <[EMAIL PROTECTED]> wrote: > The select() call returns an SQLSet > instance (which is an iterateable(sp?) type). Tim, sorry to nitpick here but actually select() is a method of a SQLSet object which returns a SQLRows object. --~--~-~--~~

[web2py:10556] Re: Lost some work tonite

2008-10-23 Thread mdipierro
And you can always use the browser to go [back] and retrieve work at any previous stage (works for me with firefox). Massimo On Oct 23, 8:58 am, mdipierro <[EMAIL PROTECTED]> wrote: > I know but once you are aware of this problem it is gone because you > have the options to: > 1) edit the admin/

[web2py:10555] Re: Lost some work tonite

2008-10-23 Thread mdipierro
I know but once you are aware of this problem it is gone because you have the options to: 1) edit the admin/models/0.py file and increase the expiration time 2) you can edit the files without the web based interface using any other editor you like Massimo On Oct 23, 4:59 am, "Phyo Arkar" <[EMAIL

[web2py:10553] Re: joining three tables.

2008-10-23 Thread DenesL
Your syntax error comes from a missing closing parenthesis ')' just before the return: orderby=db.company.ranking|db.company.companyName) ) # <--- On Oct 23, 5:22 am, annet <[EMAIL PROTECTED]> wrote: > I have got the following SQL query which I need to rewrite as a web2py > function: > > SELECT

[web2py:10554] Re: pycon2009

2008-10-23 Thread mdipierro
Thank you Steve. On Oct 23, 2:35 am, "Steve Shepherd" <[EMAIL PROTECTED]> wrote: > Massimo > > After 20mins testing I ran into only a few probs. > > 1. The google map key is wrong. Refer to the png attached. > > 2. You probably need to include a check box toggling image so that people > know they

[web2py:10551] Re: joining three tables.

2008-10-23 Thread annet
I have rebuilt the function from scratch: def byplace(): records=db((db.company.id==db.address.company)&(db.company.id==db.companyLOB.company)) \ .select(db.company.companyName,db.company.ranking,db.address.streetName,db.companyLOB.lineOfBusiness, \ orderby=db.company.ranking|db.compan

[web2py:10552] Re: joining three tables.

2008-10-23 Thread Timothy Farrell
I can't comment for the rest of stuff, but the last zero means to return the first item in the list. The select() call returns an SQLSet instance (which is an iterateable(sp?) type). The [0] grabs the first SQLRow out of that set. -tim annet wrote: > I have rebuilt the function from scratch:

[web2py:10550] Re: How to implement RESTful requests? A proposal

2008-10-23 Thread Timothy Farrell
I like this a lot. If Massimo agrees this could be the "official recommendation" for CRUD operations via a RESTful URL interface. Such concepts would have been helpful for me whenever I started into web development since it would show me how to look at data manipulation. Thanks for your effor

[web2py:10549] How to implement RESTful requests? A proposal

2008-10-23 Thread billf
I have put together a page that proposes an approach to handling requests in a RESTful manner - well it looks RESTful to me. As Steve Shepherd has said, the benefit of a group like this is the ability to comment and provide feedback, so please see the example as a starting point and feel free to

[web2py:10548] Re: Lost some work tonite

2008-10-23 Thread Phyo Arkar
It wont be hard to make ajax saves . On Thu, Oct 23, 2008 at 9:37 AM, achipa <[EMAIL PROTECTED]> wrote: > > The real question here is what web2py can/could do about people > landing on unexpected pages, which then go to login. A form submission > on a web2py restart, loss of cookie, browser resta

[web2py:10547] Re: Lost some work tonite

2008-10-23 Thread achipa
The real question here is what web2py can/could do about people landing on unexpected pages, which then go to login. A form submission on a web2py restart, loss of cookie, browser restart, session timeout, etc could, in theory, be preserved (the login page should redirect/ resubmit to the original

[web2py:10546] joining three tables.

2008-10-23 Thread annet
I have got the following SQL query which I need to rewrite as a web2py function: SELECT company.companyname, streetname FROM company JOIN address ON company.id=address.company JOIN companyLOB ON company.id=companyLOB.company WHERE address.cityname='Eindhoven' AND address.typeofaddress=1 A

[web2py:10545] Re: pycon2009

2008-10-23 Thread Steve Shepherd
Massimo After 20mins testing I ran into only a few probs. 1. The google map key is wrong. Refer to the png attached. 2. You probably need to include a check box toggling image so that people know they should click one or many of the categories. see the pic attached. 3. The URl http://web2py.app

[web2py:10544] Re: Lost some work tonite

2008-10-23 Thread Keith Edmunds
On Wed, 22 Oct 2008 23:12:24 -0700 (PDT), [EMAIL PROTECTED] said: > This is one reason > why many people don't trust web editors -- they are too prone to lose > work. Whilst I agree with the basic point you make about somehow saving the context of the editing if possible, if you don't trust web