never tried this, but is it faster/less CPU if you use:
http://code.google.com/appengine/docs/python/datastore/creatinggettinganddeletingdata.html#Deleting_an_Entity
like in second example that you do:
db.delete(trackers)
cheers,
Perica
On Sep 11, 9:00 pm, someone1 wrote:
> I have tried aski
Hi someone1,
You code looks good and prerrty optimized.
Delete takes data store CPU time as it needs to update all indexes you
have on your models.
I see just few areas for improvements.
1. Try to fetch just keys from the "Tracking" kind as you do not need
the model instance to delete it or qu
Hi there
thanks to Dmitriy I fixed the problem. When you check add/remove
programs everything was uninstalled but under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
Installer\UserData\
there was an entry full with properties needed for google app engine.
Removing it with regedi
On Sat, Sep 12, 2009 at 5:46 AM, 老桃 wrote:
>
> ok. codes are:
>
>
> from google.appengine.ext import webapp
>
> class UserMng( webapp.RequestHandler ):
>def get( self ):
>
>a = []
>b = ( a ) and 5
>
> print b
>
>
> outputs:
>
> []
>
I get this behaviour on the Python
We've been getting errors like this in batches (cannot import name
signals) ever since the September 2nd migration, along with generally
elevated error rates. I would love to know what's going on with this.
Are you using use_library('django', '1.0') anywhere in the simplified
version and still ge
I've just written a blog post on my personal blog some of you may find
interesting - it describes a new, more efficient way to memcache models and
lists of models: http://blog.notdot.net/2009/9/Efficient-model-memcaching
--
Nick Johnson, Developer Programs Engineer, App Engine
--~--~-~--
why does this behaviour deffrent from python shell then?
On Sep 12, 11:03 pm, "Nick Johnson (Google)"
wrote:
> On Sat, Sep 12, 2009 at 5:46 AM, 老桃 wrote:
>
> > ok. codes are:
>
> > from google.appengine.ext import webapp
>
> > class UserMng( webapp.RequestHandler ):
> > def get( self ):
>
>
On Sat, Sep 12, 2009 at 5:27 PM, 老桃 wrote:
>
> why does this behaviour deffrent from python shell then?
>
It's not - the behaviour you describe is what I get in a regular Python
shell - and it's the correct behaviour, as far as Python goes.
-Nick
>
> On Sep 12, 11:03 pm, "Nick Johnson (Google
Yes, I'm using use_library('django', '1.0'). I'll will try with the
older version of django but I hope that this is not the solution for
this...
I will post the results.
Regards
On 12 sep, 13:16, Nick Winter wrote:
> We've been getting errors like this in batches (cannot import name
> signals)
Well... it seems that with django 0.96 everything works fine (at least
in my case). So far there's no errors at all. Anyway, it's very
extrange...
Regards
On 12 sep, 13:37, Ernesto Ferro wrote:
> Yes, I'm using use_library('django', '1.0'). I'll will try with the
> older version of django but I
I have the same problem and I found a solution (at least it seems so)
that works for me. If you are using django 1.02 or greater switch to
0.96. If it works for you please post about it.
So far there's no errors in my logs and by now I should have many with
the older version of my app.
Regards
O
Hi Guys,
Just a quick question. Is there a maximum time that eta/countdown that I
can use on Task, for instance can I set a task to run a year into the
future?
I have searched taskqueue.py in the SDK and can't see anything obvious that
indicates that I would be limited, but that might be differen
uProfile = PROFILES.gql("WHERE user = :1", user)
uProfile[0].name = self.request.get('name2')
db.put(uProfile)
I've been racking my brain for several hours on this - is there
anything in the code above that would prevent this particular entity
in PROFILES from not being updated? I can't get the e
I think I answered my own question - I'm retrieving a result set
with .gql - to update an entity I need to specifically grab it with
get_by_id() or get_by_key()...
so for example:
profileToUpdate = PROFILES.gql("WHERE user = :1", user)
updatedProfile = profileToUpdate[0].key().id()
uProfile = PR
Here is my code:
# Database Model
class Employee(db.Model):
id = db.IntegerProperty(required=True)
name = db.StringProperty(required=True)
password = db.IntegerProperty(required=True)
delivery_type = db.StringProperty(choices=set(["pickup", "mail",
"deposit"]))
# following variables has b
Thank u for promoting your code. I'll see you around.
On Sep 12, 11:12 am, GregF wrote:
> On Sep 11, 3:37 pm, BornInMeadowMuffins wrote:
>
> > I just want to know what is the exemplary usage of cookie and session,
> > an easy and simple approach.
>
> Seehttp://code.google.com/p/gmemsess/for a v
Hi, I tested it in Python 2.5.4, that's correct:
>>> [] and 5
[]
>>> [] or 5
5
2009/9/13 Nick Johnson (Google) :
> On Sat, Sep 12, 2009 at 5:27 PM, 老桃 wrote:
>>
>> why does this behaviour deffrent from python shell then?
>
> It's not - the behaviour you describe is what I get in a regular Pytho
I think I got your problem. Thanks for the elegant self-solving.
On Sep 13, 7:13 am, Larkin2 wrote:
> I think I answered my own question - I'm retrieving a result set
> with .gql - to update an entity I need to specifically grab it with
> get_by_id() or get_by_key()...
>
> so for example:
>
> pr
It has been solved here:
http://groups.google.com/group/google-appengine/browse_thread/thread/d8b378828beb726b#
But still, what's wrong with the previous code?
On Sep 13, 9:09 am, BornInMeadowMuffins wrote:
> Here is my code:
> # Database Model
> class Employee(db.Model):
> id = db.IntegerProp
On Sep 3, 1:35 am, "Nick Johnson (Google)"
wrote:
> Hi James,
> There are a number of special headers sent with Task Queue requests,
> including:
> X-AppEngine-QueueName
> X-AppEngine-TaskName
> X-AppEngine-TaskRetryCount
>
Thanks for clarifying this! It would be a nice addition to the Task
Q
To be 100% sure how App Engine will behave, I suggest the free App
Engine Console tool (which I maintain). It's a web-based Python
Console you can run on the SDK or the production servers.
http://con.appspot.com/
On Sep 13, 8:32 am, 风笑雪 wrote:
> Hi, I tested it in Python 2.5.4, that's correct:
Hi All,
i tried migrating my google engine code for my website from windows
vista to snow leopard.. and it doesnt work.. i think it is the same
issue of python 2.6 .. coz snow leopard as u all know comes with 2.6..
i did download 2.5 but still google launcher is unable to take 2.5 ???
any pointer
I think it should work :
res = Employee.gql("WHERE id = :1", some_user_id)
to_put = []
for r in res:
r.delivery_type = some_type
to_put.append(r)
db.put(to_put)
or
res = Employee.gql("WHERE id = :1", some_user_id)
for r in res:
r.delivery_type = some_type
db.put(r)
You change 'r' but
23 matches
Mail list logo