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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 <[
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
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
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
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.+?
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
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
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.
--~--~-~--~~
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/
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
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
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
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
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:
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
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
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
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
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
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
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
37 matches
Mail list logo