[google-appengine] Re: why does Foo.all.filter get nothing?

2009-01-20 Thread Qian Qiao
On Tue, Jan 20, 2009 at 15:58, dd wjtbo...@gmail.com wrote:

 Qian Qiao 写道:
 Have you tried the using the same filter like this?

 db.Query(Foo)
 query.filter(your_filter)

 HTH.

 -- Joe
 yh.
 i have  a record like :
 c = Cat(name='c',year=2009,month=1)
 , i want to query and get this record,so i use:
 Cat.all().filter('name =','c').filter('year =',2009).filter('month =',1)
 ,and get nothing.the result is [].
 does not the query get the record Cat(name='d',year=2009,month=1)?
 what is wrong with my comprehension?? and why??
 thx!

Hmm, the query LGTM, I can't think of anything wrong with it. Try run
the same query in the the development console and see if that give you
anything?

-- Joe

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: what is wrong with Category.all().filter(c_name=,'ddd'),return nothing?

2009-01-20 Thread djidjadji

Category.all().filter(c_name =,ddd)

Watch the space character after c_name

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: why does Foo.all.filter get nothing?

2009-01-20 Thread djidjadji

query  = Cat.all().filter('name =','c').filter('year
=',2009).filter('month =',1)
Gives a Query object as return, not a [].
you have to fetch() or get() from this query

query.fetch(limit=100)
query.get()   # get the first one

2009/1/20 dd wjtbo...@gmail.com:
 i have  a record like :
 c = Cat(name='c',year=2009,month=1)
 , i want to query and get this record,so i use:
 Cat.all().filter('name =','c').filter('year =',2009).filter('month =',1)
 ,and get nothing.the result is [].
 does not the query get the record Cat(name='d',year=2009,month=1)?
 what is wrong with my comprehension?? and why??
 thx!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Rendring data on django from ulrfetch

2009-01-20 Thread djidjadji

Have you tried it with a smaller/shorter 'full_page_content'?
template_values = {'full_page_content': 'My Test String', }
The doc in the example is pretty big. Or after your conversion it is big.
Python complains that the data is too large for a string.

 page_content = 'pre%s/pre'
 My test_page_date.html contains :
 pre{{ full_page_content }}/pre

Why do you need a pre-tag inside a pre-tag?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: what is wrong with Category.all().filter(c_name=,'ddd'),return nothing?

2009-01-20 Thread dd

djidjadji 写道:
 Category.all().filter(c_name =,ddd)

 Watch the space character after c_name
   
yes ,you are right. In the first instance i ignore the space character ,
And think it is not important.
Is there anyother one like me ?
This is my fault.and luckily i find it.
thank djidjadji!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: why does Foo.all.filter get nothing?

2009-01-20 Thread Qian Qiao

On Tue, Jan 20, 2009 at 18:36, dd wjtbo...@gmail.com wrote:
 what means LGTM?what is your suggestion about this query?
 i know django can test in dos commandline,
 how can gae run in commandline?

LGTM = looks good to me.

You can fire up the dev server, then point your browser to
http://localhost:8080/_ah/admin to see the development console, you
can then your query there to see the results and, if any, error
messages.

-- Joe

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: why does Foo.all.filter get nothing?

2009-01-20 Thread dd

Qian Qiao 写道:
 Hmm, the query LGTM, I can't think of anything wrong with it. Try run
 the same query in the the development console and see if that give you
 anything?

 -- Joe
   
what means LGTM?what is your suggestion about this query?
i know django can test in dos commandline,
how can gae run in commandline?



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: why does Foo.all.filter get nothing?

2009-01-20 Thread dd

Qian Qiao 写道:
 LGTM = looks good to me.
 You can fire up the dev server, then point your browser to
 http://localhost:8080/_ah/admin to see the development console, you
 can then your query there to see the results and, if any, error
 messages.
   
oh,actually i do not know this skill,it it strong like admin of django.
thx,it is useful for me.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] how to do both filter and order

2009-01-20 Thread lookon

I got this error:
BadArgumentError: First ordering property must be the same as
inequality filter property, if specified for this query; received
liked, expected date

The things I want to do is getting hot items. My query is

q.filter('date ',yesterday).order(-liked)

So, the error message told me that I cannot do this through gql. Wish
anyone can tell me the proper way to do this. Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Google login in a lightbox?

2009-01-20 Thread gops

Cool Idea !!


On Jan 18, 11:34 pm, emi420 emi...@proyecto83.com wrote:
 I want to show the Google login form in a lightbox, like this:

 http://microbloog.appspot.com/

 It works, but isn't an elegant solution.

 Any suggestions?

 Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Can I See Google Product Ideas Code?

2009-01-20 Thread Barry Hunter

'Product ideas' seems to be just an adaptation of Google Moderator

http://moderator.appspot.com/

And AFAIK appspot.com is App Engine, so everything thats a subdomain
of appspot is almost certainly App Engine based.

See:
http://googleappengine.blogspot.com/2008/09/introducing-google-moderator-on-app.html
as its based on an internal tool, I dont think the code is available.

the good(ish) news is you can use Google Moderator for yourself.

2009/1/19 sweed erik.sw...@gmail.com:

 Hi everyone

 I've recently started experimenting with App Engine and love it so
 far.

 My question is two-fold, first, is Google Product Ideas
 (productideas.appspot.com) written using App Engine?

 Second, is there any way that I can view the code behind this App?

 I want to create something similar and would love to be able to learn
 from the devs themselves.

 




-- 
Barry

- www.nearby.org.uk - www.geograph.org.uk -

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: hiding private key

2009-01-20 Thread thebrianschott

Dave,

Excellent question. Thanks.

I have been putting my code on the google svn service. And in
principle I would like my code to be public for this project.

I have been reading in the docs about using the urlfetch.Fetch()
method to get movies from a static file and thought I might adapt that
method to getting the private key, if the file is secure there.

Another possiibility is using md5, but I cannot find any documentation
on decoding something that has been hashed with md5 and I worry that
there is a password required for that, too, so I would be in a circle.

I am not asking people to have accounts, so I cannot use that
information to validate humans.

I was looking for a Am I human or maybe it was Are you human
application that I thought I noticed somewhere at GAE, but cannot find
that. Can someone give me a link for that, instead?

On Jan 19, 7:12 pm, David Symonds dsymo...@gmail.com wrote:

 What are youhidingit from? People can't download your source code
 from App Engine.

 Dave.

Brian in Atlanta
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: how to do both filter and order

2009-01-20 Thread Barry Hunter

Its not strictly a gql limitation, but rather a datastore limitation.

http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Restrictions_on_Queries

If your 'date' property really is a date, and not a date+time, you
should be ok.

2009/1/20 lookon areyouloo...@gmail.com:

 I got this error:
 BadArgumentError: First ordering property must be the same as
 inequality filter property, if specified for this query; received
 liked, expected date

 The things I want to do is getting hot items. My query is

 q.filter('date ',yesterday).order(-liked)

 So, the error message told me that I cannot do this through gql. Wish
 anyone can tell me the proper way to do this. Thanks.
 




-- 
Barry

- www.nearby.org.uk - www.geograph.org.uk -

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: how to do both filter and order

2009-01-20 Thread kang
date is an datetime property...
I've read the article, does it mean that

SELECT * FROM Image WHERE date  :yesterday
ORDER BY date, liked

will be OK?

On Tue, Jan 20, 2009 at 6:05 AM, Barry Hunter
barrybhun...@googlemail.comwrote:


 Its not strictly a gql limitation, but rather a datastore limitation.


 http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Restrictions_on_Queries

 If your 'date' property really is a date, and not a date+time, you
 should be ok.

 2009/1/20 lookon areyouloo...@gmail.com:
 
  I got this error:
  BadArgumentError: First ordering property must be the same as
  inequality filter property, if specified for this query; received
  liked, expected date
 
  The things I want to do is getting hot items. My query is
 
  q.filter('date ',yesterday).order(-liked)
 
  So, the error message told me that I cannot do this through gql. Wish
  anyone can tell me the proper way to do this. Thanks.
  
 



 --
 Barry

 - www.nearby.org.uk - www.geograph.org.uk -

 



-- 
Stay hungry,Stay foolish.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: how to do both filter and order

2009-01-20 Thread kang
I use
q.filter('date ',yesterday) .order(date).order(-liked)

it's ok..but the result confused me..

On Tue, Jan 20, 2009 at 6:15 AM, kang areyouloo...@gmail.com wrote:

 date is an datetime property...
 I've read the article, does it mean that

 SELECT * FROM Image WHERE date  :yesterday
 ORDER BY date, liked

 will be OK?


 On Tue, Jan 20, 2009 at 6:05 AM, Barry Hunter barrybhun...@googlemail.com
  wrote:


 Its not strictly a gql limitation, but rather a datastore limitation.


 http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Restrictions_on_Queries

 If your 'date' property really is a date, and not a date+time, you
 should be ok.

 2009/1/20 lookon areyouloo...@gmail.com:
 
  I got this error:
  BadArgumentError: First ordering property must be the same as
  inequality filter property, if specified for this query; received
  liked, expected date
 
  The things I want to do is getting hot items. My query is
 
  q.filter('date ',yesterday).order(-liked)
 
  So, the error message told me that I cannot do this through gql. Wish
  anyone can tell me the proper way to do this. Thanks.
  
 



 --
 Barry

 - www.nearby.org.uk - www.geograph.org.uk -

 



 --
 Stay hungry,Stay foolish.




-- 
Stay hungry,Stay foolish.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Ancestor is performance

2009-01-20 Thread Tony Arkles



On Jan 19, 5:42 pm, Alexander Kojevnikov alexan...@kojevnikov.com
wrote:
 From your second link:

   All entities in a group are stored in the same datastore node.

 I guess this means that entities from the same group are stored close
 to each other. When your query uses ANCESTOR IS, the query engine
 can take advantage of this. Just a speculation though...

Yeah, one idea we tossed around at the office was that it knows
*which* node to go to to fetch the entities.  It'd be awesome to get
clarification about this though, it looks like a pretty big
performance boost.

Additionally, the ms-cpu advantage is lost if you add an ORDER BY
clause to the GQL.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Having a strange problem viewing my app

2009-01-20 Thread SpuriousGrowth

Sorry for the duplicate post, it wasn't showing up in the groups view.

On Jan 19, 11:01 am, SpuriousGrowth spuriousgro...@gmail.com wrote:
 Hi appengine users, I'm experiencing a strange problem in which
 following uploading my app it is displaying ... nothing. I've been
 developing the app on the test appserver without a problem, and
 finally went to update it for the first time yesterday. The appcfg
 script runs without a problem.

 So far I've update the app several times, incremented the version
 number, and replaced my app with a very simple hello world example.
 Pointing to specific versions also has no result. I've also submitted
 a test with some static files. Trying to access the static file also
 returned *nothing*. I submitted a separate test in which a debugging
 message is also logged. I so far see nothing in the logs, so I don't
 think anything is being executed.

 I saw the entry about caching in the faq. As the test only includes
 one script, it does include a call to main. I thought this might be a
 propagation issue on the appengine side, but it has been a day, and I
 still can't access anything from the tests I submitted yesterday.

 My statistics do show page hits from the requests I've made to the
 page, but the site logs are still empty. Any suggestions would be
 greatly appreciated. I'm confused.

 Regards,

 SG
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Hosting question

2009-01-20 Thread Barry Hunter

As far as I know that should work. just remember to set app.yaml
appropriately to associate the second handler with url pattern.

2009/1/20 arnie parvez...@rediffmail.com:

 hi all
 There is an already hosted wsgi application [with some user interface]
 using the datastore tables. I have created another wsgi application
 [with no user interface just handling the requests] that needs to
 access the same datastore tables and that need to be done without
 using the urlfetch. Should we create a subfolder in original wsgi
 folder to contain the new wsgi application and then run the update
 appcfg.py update originalwsgi
 Will this work? Or what other procedure do I need to adopt?
 




-- 
Barry

- www.nearby.org.uk - www.geograph.org.uk -

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Streaming support?

2009-01-20 Thread alokiN

Hi all.

In the 1.7 SDK version docs, there were explicit notes indicating that
the streaming was not supported. The new version indicates only that a
certain type of streaming isn't supported because no data can be sent
to the user before the handler exits.

Does this mean that there is a way to use GAE for video streaming? If
so, does anyone have some hints about all that: docs/links/anything.

Thanks..

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Having a strange problem viewing my app

2009-01-20 Thread csellengoapplika...@gmail.com

Hi,

I am experiencing a similar problem:

When after some time of inactivity I load one page of the application,
it displays nothing. After a reload it does display correctly. After
some time of inactivity the result again is empty. and on reload it is
correct. and so on.

On the log I can see that some parts of my code is executed (the main
method, actually), but not the webapp itself.

does anybody have some idea what could this be?

best regards: Akos

On jan. 19, 20:01, SpuriousGrowth spuriousgro...@gmail.com wrote:
 Hi appengine users, I'm experiencing a strange problem in which
 following uploading my app it is displaying ... nothing. I've been
 developing the app on the test appserver without a problem, and
 finally went to update it for the first time yesterday. The appcfg
 script runs without a problem.

 So far I've update the app several times, incremented the version
 number, and replaced my app with a very simple hello world example.
 Pointing to specific versions also has no result. I've also submitted
 a test with some static files. Trying to access the static file also
 returned *nothing*. I submitted a separate test in which a debugging
 message is also logged. I so far see nothing in the logs, so I don't
 think anything is being executed.

 I saw the entry about caching in the faq. As the test only includes
 one script, it does include a call to main. I thought this might be a
 propagation issue on the appengine side, but it has been a day, and I
 still can't access anything from the tests I submitted yesterday.

 My statistics do show page hits from the requests I've made to the
 page, but the site logs are still empty. Any suggestions would be
 greatly appreciated. I'm confused.

 Regards,

 SG

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Model field value choices - can the list be generated dynamically?

2009-01-20 Thread Janne Kuuskeri


 You can use a custom ModelChoiceField and override itslabel_from_instance() 
 method:

 class SizeOptionChoiceField(ModelChoiceField):
     deflabel_from_instance(self, obj):
         return obj.code


Sorry, I'm a bit late to the game but i just ran into this thread and
wanted to ask that have you been able to use label_from_instance() in
GAE? I used to use it Django but in GAE it just doesn't get called
ever. That's why I have been using __unicode__ as well. Has anybody
ran into this issue?

Thanks

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How does this CPU limit stuff really work?

2009-01-20 Thread Marzia Niccolai

Hi,

Please also read this FAQ:
http://code.google.com/appengine/kb/general.html#highcpu

-Marzia

On Fri, Jan 16, 2009 at 8:41 PM, Josh Heitzman joshheitz...@hotmail.com wrote:

 http://code.google.com/p/googleappengine/issues/detail?id=240 is an
 issue related to the issue you raised in your post.

 On Jan 16, 1:31 pm, boson dan.kam...@gmail.com wrote:
 After a URL in the request log are the following fields (example):
 200 1584ms 2571ms-cpu 4kb
 Am I correct in believing these are: HTTP response code, real time,
 CPU time, and response size?

 Now I get various orange and red warnings depending on the ms-cpu
 value (almost always when I create an entity, and often just for
 writing one - even simple ones).  But I haven't ever seen any increase
 in my High CPU Requests on the quota page.  Is this normal?

 I've read these pages, but I'm still not sure what's going on 
 here.http://code.google.com/appengine/docs/quotas.html#Resourceshttp://code.google.com/appengine/articles/quotas.html

 The first page says Datastore CPU time does not count towards the
 high CPU threshold, but apparently it IS included in the value in the
 request log where the warning comes from.  Is there a breakdown
 anywhere of whether this time is in user CPU or DS CPU?

 Also with the amount of CPU time reported in the request log, it seems
 that even modest traffic will kill the CPU Time quota, as even the
 most basic DS write operations with a handful of properties seem to
 often take ~1000ms-cpu (even when the request itself takes less time).

 I'm not even sure what questions to ask here, so if you can answer the
 obvious unasked ones too please do so.  I'm rather confused by all
 this, but am hoping it's more obvious than it seems right now...

 Thank you.
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Can not delete entity using Data Viewer and a GQL query.

2009-01-20 Thread Marzia Niccolai

Hi,

We determined the issue here was that the carriage returns in the data
viewer were not being validated when the delete request was called.
Removing the return in the query fixed the issue.

-Marzia

On Sat, Jan 17, 2009 at 10:15 AM, James Ashley james.ash...@gmail.com wrote:

 This sounds to me like something that should be reported as a bug.
 And whoever wrote that error message should be punished with at least
 10 papercuts.

 But that's just me.  G

 On Jan 11, 3:33 pm, murexconsult...@googlemail.com
 robin_ow...@hedge-row.co.uk wrote:
 There was a bug in my app and some bad data got into the Datastore.

 So I want to delete some data. The models have a number of items so
 rather than paging through them all 20 at a time to find it I ran the
 GQL query:
 SELECT * FROM UserUpdates
 WHERE windAngle=328

 This returns one row as expected. I then click on the tickbox beside
 it and click on Delete.

 I then get a dialog box asking if I am sure to which I say yes.

 I then get the error displayed in a red box at the top saying The URL
 to forward to once the request is fulfilled - Yes the error is a
 partial sentence and makes no sense.

 The item is NOT deleted.

 This is happening to all 4 of my models. However 2 of them only have a
 few hundred entries, so I was able to page through, find the item and
 delete it. When I paged through, the deleting was successful.

 I think that there must be a bug in the data viewer when removing data
 found using a gql query.

 Thanks
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Why still get DownloadError exception when fetch a large file?

2009-01-20 Thread Marzia Niccolai

Hi,

This error indicates that the download is taking too long to complete.

-Marzia

On Sat, Jan 17, 2009 at 6:22 PM, Teng Yao tors...@gmail.com wrote:

 Here is my test code:

 #!/usr/bin/evn python
 # -*- coding: utf8 -*-

 from google.appengine.api import urlfetch

 data = urlfetch.fetch('http://www.kernel.org/pub/linux/kernel/v2.6/
 patch-2.6.28.bz2',
  allow_truncated=True)
 print 'Content-Type: text/plain'
 print
 print str((data.status_code, data.headers,
 data.content_was_truncated))

 and the online page is http://naive.appspot.com/test

 the log:

  class 'google.appengine.api.urlfetch_errors.DownloadError':
 ApplicationError: 5
  Traceback (most recent call last):
File /base/data/home/apps/naive/1.330777991388937356/
 test.py, line 7, in module
  allow_truncated=True)
File /base/python_lib/versions/1/google/appengine/api/
 urlfetch.py, line 273, in fetch
  raise DownloadError(str(e))


 Why I still get DownloadError exception instead of truncated data?

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: exploring appengine cron

2009-01-20 Thread Jason C

 Interestingly, the SDK's antlr definitions are incompatible with the version
 of antlr invluded in the sdk, so I had to rename lib/antlr3 and install
 3.1.1 from http://www.antlr.org/download/Python

In my case, this statement is misleading. lib/antlr3 is included in
the .google_appengine/lib folder, but the Django AppEngine Helper
project wasn't referencing it. That project released a super-minor
update (r68) that includes antlr3 in the python path.

Moving to this most recent version corrected the antlr3 issue without
having to install it separately.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Google Apps dashboard not recognizing Google App Engine/CNAME record

2009-01-20 Thread Marzia Niccolai

Hi,

You must remove the mapping from the Google Apps personalized start
page before attempting to add the 'www' mapping for your App Engine
app.  After it is removed, you should be able to add the mapping
successfully for your app.

-Marzia

On Mon, Jan 19, 2009 at 9:41 AM, Benjamin Tseng tseng@gmail.com wrote:

 We currently have xhibitr.com registered under DreamHost with Google
 Apps (Standard Edition) and have been trying to set up our appengine
 application (at xhibitr.appspot.com) so that www.xhibitr.com forwards
 to xhibitr.appspot.com

 The instructions on the Google page ask us to set up a CNAME record
 (so we created one to link www to ghs.google.com) as confirmed by
 DNSstuff (http://private.dnsstuff.com/tools/customlookup.ch?
 formaction=DNSLOOKUPname=www.xhibitr.comr=235660detail=0type=CNAME),
 but we are unable to set up URL forwarding from the Google Apps panel.

 We are confused as we were able to set this recognition for
 widget.xhibitr.com (http://private.dnsstuff.com/tools/customlookup.ch?
 formaction=DNSLOOKUPname=widget.xhibitr.comr=235660detail=0type=CNAME).

 Does anyone have any ideas why this is happening?

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Having a strange problem viewing my app

2009-01-20 Thread Rodrigo Moraes

On Tue, Jan 20, 2009 at 1:20 PM, csellengoapplikacio wrote:
 When after some time of inactivity I load one page of the application,
 it displays nothing. After a reload it does display correctly.

 ...

 does anybody have some idea what could this be?

this is a really common issue and should be added to the FAQ if it is
not there already (sorry, i didn't check). it is caused when you don't
check if your main app file is being accessed directly, as in if
__name__ == '__main__' in the code below:

application = ...

def main():
run_wsgi_app(application)

if __name__ == '__main__':
main()

do the above and you'll be happy. :)
-- rodrigo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Google Apps GAE - will not register to www

2009-01-20 Thread Marzia Niccolai

Hi,

Please follow the directions here for deleting the sites 'www' mapping
from Google Apps before adding the 'www' mapping for your App Engine
app:
http://groups.google.com/group/google-appengine/web/deleting-existing-www-mapping-from-google-apps

-Marzia

On Mon, Jan 19, 2009 at 5:09 PM, JMerrell jonathanmerrel...@gmail.com wrote:

 Hi,
 We have converted our public website over to google app engine (great
 product). The google app id for the website is mp-public-website-v1

 We have tested the site and it works correctly using
 beta.mipueblofoods.com. The mipueblofoods.com domain is using google
 apps. We created the cname record and everything runs great.

 So whats the problem

 I am now trying to launch the website.

 Firstly i deleted the existing DNS A record for www

 then i used the exact same process as we did with beta. Created a
 CNAME record for www and pointed it to ghs.google.com.

 The site is not showing up in the google apps domain. The site is also
 not reachable. via www.mipueblofoods.com

 Please help.

 Jonathan

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Having a strange problem viewing my app

2009-01-20 Thread Rodrigo Moraes

On Tue, Jan 20, 2009 at 3:52 PM, Rodrigo Moraes wrote:
 this is a really common issue and should be added to the FAQ if it is
 not there already (sorry, i didn't check).

uh, an update. it is in the FAQ [1]. see:

Q: The first time I load my application, it is blank.  After that it
works fine.  What is wrong?
A: This is due to the way that App Engine handles app caching.  To fix
it, simply include this at the bottom of your file:

if __name__ == __main__:

  main()

[1] http://knol.google.com/k/marce/app-engine-community-faqs/vkzeph4si12v/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] app-engine-patch : 'User' has no attribute 'objects' ?

2009-01-20 Thread peterk

Hey there,

I've been playing around with app-engine-patch for Django on AE, and
I've been pretty happy with it so far. But I've run into a bit of bump
on the road.

As per the Django documentation, I'm trying to create a User like so:

from django.contrib.auth.models import User

...

user = User.objects.create_user('john', 'len...@thebeatles.com',
'johnpassword')

I'm doing this in the context of a custom form that I'm using for user
registration..I'm over-riding it's save function, and need to create
the user therein.

Problem is, I get this error:

AttributeError: type object 'User' has no attribute 'objects'

I'm probably doing something silly, I'm a bit of a python AND django
newbie

Can anyone shed some light? Thanks for much for any help!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Rendring data on django from ulrfetch

2009-01-20 Thread anand

Hi!

Thanks for reply. Yes I tried with smaller content and it works.
However I would also need a bigger content.

I would be happy to remove the double pre tag if that will solve my
issue.

Also I would like to tell that if I store the content of my doc to
dataStore then my django can easy render that. I face problem only
when it is from fetchurl.

Thanks again.

Regards
Anand


On Jan 20, 1:52 am, djidjadji djidja...@gmail.com wrote:
 Have you tried it with a smaller/shorter 'full_page_content'?
 template_values = {'full_page_content': 'My Test String', }
 The doc in the example is pretty big. Or after your conversion it is big.
 Python complains that the data is too large for a string.

  page_content = 'pre%s/pre'
  My test_page_date.html contains :
  pre{{ full_page_content }}/pre

 Why do you need a pre-tag inside a pre-tag?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Deadline Exceeded, but not in my app code?

2009-01-20 Thread Marzia Niccolai

Hi,

This same message is discussed in this thread:
http://groups.google.com/group/google-appengine/browse_thread/thread/fc589cb2247c2806/4c8ec6aacc80873b

It's basically the warm up cost of loading a non-standard Django
edition.  Brett C. seems to have had with trimming the Django Zip file
and using 1.0.2.

-Marzia

On Mon, Jan 19, 2009 at 7:34 PM, tauz...@gmail.com tauz...@gmail.com wrote:

 I'm seeing this error message:

 class 'google.appengine.runtime.DeadlineExceededError':
 Traceback (most recent call last):
  File /base/data/home/apps/minitracker/4.3/main.py, line 29, in
 module
InstallAppengineHelperForDjango()
  File /base/data/home/apps/minitracker/4.3/appengine_django/
 __init__.py, line 329, in InstallAppengineHelperForDjango
PatchDjangoSerializationModules()
  File /base/data/home/apps/minitracker/4.3/appengine_django/
 __init__.py, line 165, in PatchDjangoSerializationModules
from appengine_django.serializer.python import Deserializer
  File /base/data/home/apps/minitracker/4.3/appengine_django/
 serializer/python.py, line 35, in module
from django.utils.encoding import smart_unicode
 class 'google.appengine.runtime.DeadlineExceededError':

 It appears that the deadline exceeded error is happening during an
 import of some sort, but not in the application code that I wrote.

 Any ideas?

 -Dave
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Exploding Index

2009-01-20 Thread Marzia Niccolai

Hi,

From what you have explained, it doesn't appear as though you will
have an issue with exploding indexes, provided you don't start running
queries on multiple StringListProperties, and your overall entity
definition does not have a lot of properties.  This is typically where
applications start to have issues.

-Marzia

On Sat, Jan 17, 2009 at 11:05 AM, Murali imural...@gmail.com wrote:

 I would like to request some clarification on whether the following
 model with the set of queries result in an exploding index.

 I am  trying to build a quick stock notes application where we want to
 add some quick notes on stocks.  Stocks and Tags are both list
 properties. But I will not make any query that include both tags and
 stocks at the same time. Only ONE at a time combined with created in
 desc order (to get last one first).

 I imposed a restriction of ONLY A MAX of 3 tags allowed for any row
 ( same is the case with 3 stocks, restricted to max of 3)

 class QuickNote(db.Model):
 description = db.StringProperty()
 author = db.StringProperty()
 status = db.StringProperty()
 tags = db.StringListProperty()
 stocks = db.StringListProperty()
 created = db.DateTimeProperty(auto_now_add=True)

 Index :
 - kind: QuickNote
  properties:
  - name: tag
  - name: created
direction: desc

 - kind: QuickNote
  properties:
  - name: stock
  - name: created
direction: desc

 1. A single entity will never have more than 3 values in each list and
 never more than one list property is used in  a single query. However,
 I need to combine with date in desc order to retrieve latest notes.
 (as shown above)
 2. As a whole, we might have about 1000 stocks and similar range of
 tags.

 I would like to know if this data model with the given set of queries,
 will result in exploding index?

 Also, if I have 7 more (a total of 9) different List properties
 (similar to stocks and tags) each with the same restriction of 3
 values in a list, and they are never combined (except with date in
 desc order), would that result in exploding index? At any time only 2
 or 3 lists will have any values filled in.

 Thank you very much in advance for your inputs.
 Murali


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Reminder: App Engine chat time, tomorrow (1/21) 9-10AM

2009-01-20 Thread Marzia Niccolai

Details, as always, can be found here:
http://groups.google.com/group/google-appengine/browse_thread/thread/8ea64f610b5ed428

Look forward to chatting with you!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Silicon Valley App Engine meetup *tonight*

2009-01-20 Thread Bill

Topic: Hacking App Engine (or how to dig into lower level APIs and
customize them to your needs)

Speaker: Jens Scheffler (author of App Engine Fan blog),
http://blog.appenginefan.com/
Also Pete Koomen, Product Manager of App Engine, will talk about new
features and provide an update on the platform progress.

RSVP here: http://web.meetup.com/116/calendar/9332524/

Location: TIPS Group, 1000 Elwell Ct, Palo Alto, CA 94303 (NOTE
LOCATION CHANGE)

Time: 7 pm, Tuesday, Jan 20.

Schedule:
- Update on Google App Engine
- Main Talk on Hacking App Engine
- Lightning Talks (at least 3 good ones are slated)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How does this CPU limit stuff really work?

2009-01-20 Thread boson

Hi Marzia, thanks for responding.  I've read that a few times actually
and it's part of what is confusing.  See:

1.
Re: http://code.google.com/appengine/kb/general.html#highcpu
That link describes a message that says:
  This request used a high amount of CPU, and was roughly
  X times over the average request CPU limit.
  High CPU requests have a small quota, and if you exceed
  this quota, your app will be temporarily disabled.

However I get the orange/red text in my req log with yellow ! icon
saying (on mouseover):
  This request used a high amount of CPU and may soon exceed its
quota

I've never seen the one from the docs.  Is this the same message  the
docs are out of date, or is this a different message with a different
meaning?


2.
Also, the other issue: if a single Datastore put (an update) of a
modestly sized (10 fields) entity is often taking ~1000ms-CPU
(=1sec), I understand that doesn't count toward runtime CPU quota
(right?), but it DOES count toward overall CPU Time used.

So 3600 puts would take a ~CPU-hour, which costs $0.10 at the proposed
rates.  That's ~$0.027 / 1000 hits, assuming a page writes just one
entity (eg counter/timestamp/etc).

It seems like (social/consumer-oriented) apps on GAE would need dozens
of ads just to break even to support the basic DS operational costs,
not even including any other costs (bandwidth, additional CPU use for
preparing/rendering pages, etc.).

Tell me my math is wrong, or that DS puts are going to be optimized
soon?
I'm just having a hard time seeing how writing a single entity takes
so much CPU.

Thank you.

On Jan 20, 9:35 am, Marzia Niccolai ma...@google.com wrote:
 Hi,

 Please also read this 
 FAQ:http://code.google.com/appengine/kb/general.html#highcpu

 -Marzia

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How does this CPU limit stuff really work?

2009-01-20 Thread boson

Well as to point #1 below, wouldn't you know as I wrote that post I
got my first warning in the logs.  I see it is different from the
exclamation icon.

01-20 12:29PM 15.424 /regions/ 200 1601ms 3270ms-cpu 7kb
69.63.176.230 - - [20/Jan/2009:12:29:17 -0800] POST /regions/ HTTP/
1.1 200 7612 - -
W 01-20 12:29PM 17.022

[W] This request used a high amount of CPU, and was roughly 3.7 times
over the average request CPU limit. High CPU requests have a small
quota, and if you exceed this quota, your app will be temporarily
disabled.


Now this was for a request that did a single query to load 3 small
entities, and didn't even write anything at all to DS.

I'm actually seeing other timing warnings, so I hope it's GAE
stuttering in general.

I'm beginning to worry that this platform isn't going to work out for
anything other than serving the most basic pages right out of
memcache.



On Jan 20, 12:39 pm, boson dan.kam...@gmail.com wrote:
 Hi Marzia, thanks for responding.  I've read that a few times actually
 and it's part of what is confusing.  See:

 1.
 Re:http://code.google.com/appengine/kb/general.html#highcpu
 That link describes a message that says:
   This request used a high amount of CPU, and was roughly
   X times over the average request CPU limit.
   High CPU requests have a small quota, and if you exceed
   this quota, your app will be temporarily disabled.

 However I get the orange/red text in my req log with yellow ! icon
 saying (on mouseover):
   This request used a high amount of CPU and may soon exceed its
 quota

 I've never seen the one from the docs.  Is this the same message  the
 docs are out of date, or is this a different message with a different
 meaning?

 2.
 Also, the other issue: if a single Datastore put (an update) of a
 modestly sized (10 fields) entity is often taking ~1000ms-CPU
 (=1sec), I understand that doesn't count toward runtime CPU quota
 (right?), but it DOES count toward overall CPU Time used.

 So 3600 puts would take a ~CPU-hour, which costs $0.10 at the proposed
 rates.  That's ~$0.027 / 1000 hits, assuming a page writes just one
 entity (eg counter/timestamp/etc).

 It seems like (social/consumer-oriented) apps on GAE would need dozens
 of ads just to break even to support the basic DS operational costs,
 not even including any other costs (bandwidth, additional CPU use for
 preparing/rendering pages, etc.).

 Tell me my math is wrong, or that DS puts are going to be optimized
 soon?
 I'm just having a hard time seeing how writing a single entity takes
 so much CPU.

 Thank you.

 On Jan 20, 9:35 am, Marzia Niccolai ma...@google.com wrote:

  Hi,

  Please also read this 
  FAQ:http://code.google.com/appengine/kb/general.html#highcpu

  -Marzia
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Ancestor is performance

2009-01-20 Thread ryan

On Jan 19, 7:10 am, Tony Arkles t.ark...@gmail.com wrote:

 In a thread [1], and in the documentation [2], it says that setting
 ancestors doesn't affect performance, but I'm not sure that this is
 the case.
...
 The measured ms-cpu in the request logs comes out WAY smaller for
 the ANCESTOR IS query (roughly 3,000ms-cpu vs. 30,000 ms-cpu for
 1,000 entities, and roughly this same ratio for smaller queries)

the important distinction to make here is between performance and
cost. the thread and doc you cited are correct in that ancestor
queries don't differ in performance from non-ancestor queries.
however, they may differ in their CPU cost, which is what you noticed.

On Jan 19, 3:42 pm, Alexander Kojevnikov alexan...@kojevnikov.com
wrote:

   All entities in a group are stored in the same datastore node.

 I guess this means that entities from the same group are stored close
 to each other. When your query uses ANCESTOR IS, the query engine
 can take advantage of this. Just a speculation though...

this is definitely correct. the query engine can take advantage of
this in some kinds of queries, but most ancestor queries use a
composite (ie developer-defined) index. those queries don't take
advantage of the entity group locality.

another point i'd reiterate is that regardless of the filters,
ancestor, and sort orders you use, query performance should generally
be the same. a query consists of a single, bounded, bigtable scan over
an index table, along with individual row lookups for each result
entity. details in http://snarfed.org/space/datastore_talk.html . this
means that query performance will depend on the number and size of the
result entities fetched, but not (generally) on the query itself.

the one exception is merge join queries, ie queries that include only
equality filters, and maybe an ancestor, but no sort orders. those
queries are implemented using a somewhat more expensive algorithm.
it's still roughly O(n) in the number of result entities fetched, but
it has a higher constant factor. this is described in the slides
linked above, and has been discussed in more detail in other threads
on this group.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: how to do both filter and order

2009-01-20 Thread ryan

On Jan 20, 6:05 am, Barry Hunter barrybhun...@googlemail.com
wrote:
 Its not strictly a gql limitation, but rather a datastore limitation.

 http://code.google.com/appengine/docs/python/datastore/queriesandinde...

correct. if you have both inequality filter(s) and sort order(s), the
first sort order must be on the same property as the inequality filter
(s). this is a fundamental datastore limitation, unfortunately, and
one that we have no plans to remove any time soon.

 If your 'date' property really is a date, and not a date+time, you
 should be ok.

actually, this limitation is unrelated to property type. (hopefully
i'm just misunderstanding your point here...)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] 50% of requests to gae lost

2009-01-20 Thread ten_foot_ninja

Hello,
I am using a Flash client to connect to GAE and am noticing about half
of my requests seems to disappear. Looking at my app log I see the
requests in question:

26.81.3.12 - - [20/Jan/2009:13:37:56 -0800] POST /gae HTTP/1.1 200 0
file:///C|/work/Projects/dev/appEngine/test/static/pyTest.swf -

I noticed the 0 for message length (larger number when its working).

I am using pyamf and am not sure if that can be responsible. Has
anyone else run into this?
This behavior has been consistent for a couple months now. It seems
only occur when I first start a session, subsequent calls seem to
mostly connect properly

Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: app-engine-patch : 'User' has no attribute 'objects' ?

2009-01-20 Thread ryan

On Jan 20, 10:28 am, peterk peter.ke...@gmail.com wrote:
...
 AttributeError: type object 'User' has no attribute 'objects'

out of curiosity, are you importing the app engine User class after
the django User class? e.g. something like:
from django.contrib.auth.models import User
...
from appengine.api.users import User

if so, it's using the app engine User class. try fully qualifying your
User references, e.g.:

from django.contrib.auth import models
...
from appengine.api import users

...

user = models.User.objects.create_user('john',
'len...@thebeatles.com', 'johnpassword')

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: how to do both filter and order

2009-01-20 Thread Barry Hunter

2009/1/20 ryan:

 On Jan 20, 6:05 am, Barry Hunter wrote:


 If your 'date' property really is a date, and not a date+time, you
 should be ok.

 actually, this limitation is unrelated to property type. (hopefully
 i'm just misunderstanding your point here...)

Ah, I was just saying if 'date' is really a date, the sorting by date
first wouldn't matter to the query - because they would all be the
same date. Because  date  yesterday could be the same as date =
today - so all entries would have the same date. (although that made
the (unfounded) assumption there would be no future dates, oops!)

- thinking now that would mean the inequality could be changed to a equals ;)

but as its a datetime its irrelevant anyway as the query isn't going to work! :(



 




-- 
Barry

- www.nearby.org.uk - www.geograph.org.uk -

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: 50% of requests to gae lost

2009-01-20 Thread Alexander Kojevnikov

See the last question in the community FAQ:
http://knol.google.com/k/marce/app-engine-community-faqs/vkzeph4si12v/1#

On Jan 21, 8:59 am, ten_foot_ninja spitko...@gmail.com wrote:
 Hello,
 I am using a Flash client to connect to GAE and am noticing about half
 of my requests seems to disappear. Looking at my app log I see the
 requests in question:

 26.81.3.12 - - [20/Jan/2009:13:37:56 -0800] POST /gae HTTP/1.1 200 0
 file:///C|/work/Projects/dev/appEngine/test/static/pyTest.swf -

 I noticed the 0 for message length (larger number when its working).

 I am using pyamf and am not sure if that can be responsible. Has
 anyone else run into this?
 This behavior has been consistent for a couple months now. It seems
 only occur when I first start a session, subsequent calls seem to
 mostly connect properly

 Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: app-engine-patch : 'User' has no attribute 'objects' ?

2009-01-20 Thread peterk

Hey Ryan,

Thanks for the reply :)

I'm not importing the app engine user class at all.

This is what my forms file looks like, for this custom form:

from django import forms
from django.contrib.auth.models import User

class RegistrationForm(forms.ModelForm):
class Meta:
model = User

def save(self, new_data):
u = User.objects.create_user(new_data['username'],new_data
['email'],new_data['password'])
u.is_active = False
u.save()
return u

The form is generated out of the model User, and for that, it seems to
find the django user model fine - the generated form is as you'd
expect for that model.

I tried fully qualifying the call to User in the save function by
using django.contrib.auth.models.User.objects.create_user.. but I
wound up getting an error saying that  global name 'django' is not
defined. I tried qualifying the name as you suggest in your post, by
using

from django.contrib.auth import models

and then: models.User ... but this seems to cause errors elsewhere...

Thanks,




On Jan 20, 10:05 pm, ryan ryanb+appeng...@google.com wrote:
 On Jan 20, 10:28 am, peterk peter.ke...@gmail.com wrote:
 ...

  AttributeError: type object 'User' has no attribute 'objects'

 out of curiosity, are you importing the app engine User class after
 the django User class? e.g. something like:
 from django.contrib.auth.models import User
 ...
 from appengine.api.users import User

 if so, it's using the app engine User class. try fully qualifying your
 User references, e.g.:

 from django.contrib.auth import models
 ...
 from appengine.api import users

 ...

 user = models.User.objects.create_user('john',
 'len...@thebeatles.com', 'johnpassword')
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Rendring data on django from ulrfetch

2009-01-20 Thread djidjadji

If I fetch the given page I get a HTML file of size ~51000 bytes.
If I just save the text of the document I need ~11000 bytes.
If you find this on the development server you can edit the django
file and insert some debug.
What are the 'bits' that need to be joined? There individual length?
How many 'bits' can you join (use slices - bits[:n])?
These debug texts could be the result of the function instead of the join.
What is the difference for the fetchurl and the dataStore version?

2009/1/20 anand innu.an...@gmail.com:
 Also I would like to tell that if I store the content of my doc to
 dataStore then my django can easy render that. I face problem only
 when it is from fetchurl.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] dev_appserver.py missing after an GAE update

2009-01-20 Thread pjesi

Hi

GAE was automatically updated today. Since then I can no longer run
dev_appserver.py on my Mac.Any ideas?

Thanks
Viðar

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: hiding private key

2009-01-20 Thread thebrianschott

Dave,

You seem to be saying that there is no easy way to protect a private
key short of writing some code to automate the process of removing and
replacing the key from my .py when I upload to the svn and remembering
to do so each time. I am not familiar with writing a little script
like you suggest, so I could use some guidance there. But that is
beyond what I can expect, and you have been most helpful, already.
Thanks.

Btw, I have another question about the svn, but I will start a new
thread about that, perhaps.



On Jan 20, 4:09 pm, David Symonds dsymo...@gmail.com wrote:

 Okay, I see where you're coming from. Your best bet is probably to
 auto-generate or manually edit a tiny .py file that you don't check in
 to SVN (or maybe check in a secret-key.py.template with thekey
 replaced with InsertKeyHere). Then you could write a little script
 that pulls your real secretkeyfrom a file on your own computer
 before uploading your app.

 Dave.

Brian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: dev_appserver.py missing after an GAE update

2009-01-20 Thread Dan Sanderson
Start the GoogleAppEngineLauncher application.  It will re-create the
symlinks.  (Annoying, I know.  I believe the issue has to do with the
permissions the updater has when it runs.)
-- Dan

On Tue, Jan 20, 2009 at 1:43 PM, pjesi vidarsv...@gmail.com wrote:


 Hi

 GAE was automatically updated today. Since then I can no longer run
 dev_appserver.py on my Mac.Any ideas?

 Thanks
 Viðar

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Fetch callback

2009-01-20 Thread djidjadji

And don't forget the '?' character

test = urlfetch.fetch('http://yourappid.appspot.com/check?'+check)

2009/1/19 Gipsy Gopinathan gipsy.ra...@gmail.com:
 I think you have to use the absolute path  in your fetch call
 ie  test = urlfetch.fetch('http://yourappid.appspot.com/check'+check)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: what is wrong with Category.all().filter(c_name=,'ddd'),return nothing?

2009-01-20 Thread djidjadji

2009/1/20 dd wjtbo...@gmail.com:
 yes ,you are right. In the first instance i ignore the space character ,
 And think it is not important.
 Is there anyother one like me ?

I also fell for this bug.
I asked this group and got this answer.
I think they added a note for this in the documentation fir filter() after that.

 This is my fault.and luckily i find it.
 thank djidjadji!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Ok I know it's something really dumb but how to upload

2009-01-20 Thread James Ashley

Those are all fine options.  But the real answer is to write 2 or
3 .BAT files (start your server, upload, and *save to source control*
-- that's the most important one) and install the Windows Command
Prompt Here extension.

:-/

Good luck,
James

On Jan 19, 6:10 pm, djidjadji djidja...@gmail.com wrote:
 You can copy and paste by using the System menu of the window.
 You can open this menu by using Alt-Space or click on the top left icon
 in the titlebar (for a cmd window it is a small c:\) In this menu you find a
 submenu for clipboard operations.
 If you want to copy text to the clipboard you first have to Mark the
 text and then press enter.

 2009/1/19 dartdog dartd...@gmail.com:

  Just this typing will be a real drag since the conventional Cntrl C
  and Ctrl V don't work in cmd shell.. Back to the books, but then I
  suppose the real solution it to pack the whole thing in a bat file!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: how to do both filter and order

2009-01-20 Thread kang
Then, how can I do the hot thing?
The image class has a datetime property 'date' and a int property 'liked'. I
need to get the images after yesterday and then order them by liked. Thanks.

On Tue, Jan 20, 2009 at 1:58 PM, ryan
ryanb+appeng...@google.comryanb%2bappeng...@google.com
 wrote:


 On Jan 20, 6:05 am, Barry Hunter barrybhun...@googlemail.com
 wrote:
  Its not strictly a gql limitation, but rather a datastore limitation.
 
  http://code.google.com/appengine/docs/python/datastore/queriesandinde...

 correct. if you have both inequality filter(s) and sort order(s), the
 first sort order must be on the same property as the inequality filter
 (s). this is a fundamental datastore limitation, unfortunately, and
 one that we have no plans to remove any time soon.

  If your 'date' property really is a date, and not a date+time, you
  should be ok.

 actually, this limitation is unrelated to property type. (hopefully
 i'm just misunderstanding your point here...)

 



-- 
Stay hungry,Stay foolish.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] CPUHotWarning Pattern

2009-01-20 Thread boson

Hey guys,

I came up with this pattern to use when pages might need to create a
few objects, and such creations would (sadly) exceed the page's CPU
limit and go against your quota.  It's a way to ask the browser to
redirect back to the same page as each object is created, but without
cluttering your code with such logic.  Feedback is welcome.

P.S. I retyped this to clean it up from my app, so there may be some
typos.


*** exceptions.py:

class CPUHotWarning(Exception):
Raised when a lot of 'CPU' work has taken place (hint to
redirect).
def __init__(self, context=?, value=None):
self.context = context
self.value = value
def __str__(self):
return %s: %s % (self.context, repr(self.value))


*** model.py:

class MyModel(db.Model):
def get_cached_or_create(key_name):
obj = memcache.get('MyModel_%s' % key_name)
if obj:
return obj
obj = MyModel.get_by_key_name(key_name)
if obj:
memcache.add('MyModel_%s' % key_name, obj)
return obj
obj = MyModel(key_name=key_name)
obj.put()
raise CPUHotWarning(MyModel.get_cached_or_create() created:
, obj)


*** handler.py:

class MyPage(webapp.RequestHandler):
def get(self):
try:
obj1 = MyModel.get_cached_or_create(key_name1)
obj2 = MyModel.get_cached_or_create(key_name2)
obj3 = MyModel.get_cached_or_create(key_name3)
except CPUHotWarning, w:
logging.debug(Redir self on CPUHotWarning: %s % w)
self.redirect_self()
return
# do stuff with obj1, obj2, obj3 here.
# render page here.

^^^ This example would, for the first request, create obj1, redirect,
create obj2, redirect, create obj3, redirect, and then render.
Subsequent requests would just get the cached values and render with
no redirects.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] is gaeutilities sessions the only 3rd party session manager?

2009-01-20 Thread jeremy

can anyone recommend / mention a session manager other than the one in
gaeutilities?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: is gaeutilities sessions the only 3rd party session manager?

2009-01-20 Thread Ian Bicking
On Tue, Jan 20, 2009 at 10:40 PM, jeremy jeremy.a...@gmail.com wrote:

 can anyone recommend / mention a session manager other than the one in
 gaeutilities?


Beaker works with GAE: http://beaker.groovie.org/


-- 
Ian Bicking  |  http://blog.ianbicking.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: is gaeutilities sessions the only 3rd party session manager?

2009-01-20 Thread Alexander Kojevnikov

 can anyone recommend / mention a session manager other than the one in
 gaeutilities?

app-engine-patch [1] supports Django sessions [2]

[1] http://code.google.com/p/app-engine-patch/
[2] http://docs.djangoproject.com/en/dev/topics/http/sessions/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Model.put() Override?

2009-01-20 Thread Bill

The most recent SDK (1.1.8) now allows hooks, and that seems to be the
best way to hack datastore puts.  Jens (http://blog.appenginefan.com/)
has started to blog about use of the hook feature and gave two
examples at our local App Engine meetup tonight.  Stay tuned to his
blog for a good explanation.

In the meantime, look at appengine.api.apiproxy_stub_map.py and you'll
see some hook methods.  You can register methods to run pre- or post-
put.

If you supply a hook at this level of the API, you can use your hack
even when bypassing the Model API.


On Jan 17, 11:15 am, James Ashley james.ash...@gmail.com wrote:
 The simple answer seems to be override the db class.  That's
 totally off the top of my head, and it may be completely unrealistic.

 Something like (totally untested and almost definitely wrong. Consider
 it pseudo-code):

 class my_db(google.ext.db):
   def put(self, *objects, **kwargs):
     for o in objects:
       o.pre_put()
     super(google.ext.db, self).put(*objects, **kwargs)

 Then the models that were overriding put() could put that override
 code in pre_put() instead (and change put() to just call that before
 calling super().put()...).

 You'd have to juggle the nuances of things like post_put(), and any
 side-effects.  But it seems like a reasonable compromise.

 On Jan 14, 2:22 pm, boson dan.kam...@gmail.com wrote:

  That is a curious situation.  I would like to know also if there is a
  way to inject code into the put-stream regardless of method called, as
  I have various put() overrides as well.

  On Jan 13, 9:45 pm, Devel63 danstic...@gmail.com wrote:

   I overrode the put method on a class derived from Model, primarily
   because I wanted to do some accounting work when a new object was
   saved (in the simplest case, just keeping track of a counter).  It
   does its work, then calls super.

   It works fine.

   Until I use db.put([ob1,obj2,obj3]) to save a bunch of these, and then
   of course the individual object.put() functions are never called.

   Is there a best practice for this?  I really liked having it in the
   put, because then no caller needed to know about it, and it just
   took care of itself.  Is the best thing to precede every put call
   with an explicit put_prep call?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---