[google-appengine] App Engine Code Challenge - write a tetris playing algorithm

2008-11-30 Thread russ.au

Hi all,

Here's my attempt to learn App Engine / python.  It's a tetris code
challenge, you write a tetris playing algorithm, and the app
challenges your algorithm.

You can write the algorithm in anything that can do cgi: php, asp.net,
jsp, etc.  I've provided a sample client that you can easily host on
App Engine.

Check it out here: http://tetrisapp.appspot.com/ - it will default to
my sample algorithm..

Read more on how to write your own algorithm here:
http://tetrisapp.appspot.com/static/howto.html

Its a bit rough at the moment.. If you struggle with any of the
details let me know - i really need to get the documentation a bit
more readable.  I've got more features to add, depending on how
popular it is..

Cheers,
Russ

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: loading a model by key

2008-11-19 Thread russ.au

That works, thanks Alexander!

It also works without the db.Key:
model = MyModel.get(key)

The relevant references - of course it was all there in front of me:
http://code.google.com/appengine/docs/datastore/modelclass.html - Note
get() is a CLASS method
http://code.google.com/appengine/docs/datastore/keyclass.html - The
string-encoded key can be converted back to a Key object by passing it
to the Key constructor 


On Nov 19, 5:31 pm, Alexander Kojevnikov [EMAIL PROTECTED]
wrote:
  Aw, man... typed that wrong, i am doing:
  model = MyModel.get(key)

  So this _should_ work with the string I'm getting from the
  querystring?

 Try this:

 model = MyModel.get(db.Key(key))
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] loading a model by key

2008-11-18 Thread russ.au

Hi all,

Apologies if I'm missing something obvious here..  Can you load a
model with the key() in a string?

I can read the .key() off my model - it's a long random string. I'm
sorting this in the HTML- so I can pass it to an ajax request.  Inside
the Ajax request, I want to load up the corresponding Model.  I'm
trying to pass in the key string to get() to load up the object, doing
something like this:
key = self.request.get('key')
model = MyModel(key)

But I always get back an 'empty' object?

Thanks,
Russ

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: loading a model by key

2008-11-18 Thread russ.au

Aw, man... typed that wrong, i am doing:
model = MyModel.get(key)

So this _should_ work with the string I'm getting from the
querystring?

On Nov 19, 3:59 pm, David Symonds [EMAIL PROTECTED] wrote:
 On Wed, Nov 19, 2008 at 2:45 PM, russ.au [EMAIL PROTECTED] wrote:

  Hi all,

  Apologies if I'm missing something obvious here..  Can you load a
  model with the key() in a string?

  I can read the .key() off my model - it's a long random string. I'm
  sorting this in the HTML- so I can pass it to an ajax request.  Inside
  the Ajax request, I want to load up the corresponding Model.  I'm
  trying to pass in the key string to get() to load up the object, doing
  something like this:
  key = self.request.get('key')
  model = MyModel(key)

 Try this:
   model = MyModel.get(key)

 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] CapabilityDisabledError: Datastore writes are temporarily disabled.

2008-11-15 Thread russ.au

I'm getting this exception in my app engine app :
CapabilityDisabledError: Datastore writes are temporarily disabled.

A search of this group suggest this only happens during scheduled
maintenance?
http://groups.google.com/group/google-appengine/browse_thread/thread/fc5e5275bc9943d4/0d35dcb4b9fa3cf6?lnk=gstq=CapabilityDisabledError%3A+Datastore+writes+are+temporarily+disabled.#0d35dcb4b9fa3cf6

The data viewer is also giving me a Server Error.

Are other people seeing the same errors?

Russ
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: dev_appserver locks up with UrlFetch to URL within same application

2008-11-10 Thread russ.au

does the dev_appserver only process 1 request at a time?

On Nov 10, 10:47 pm, Jonk [EMAIL PROTECTED] wrote:
 On 10 marras, 13:38, russ.au [EMAIL PROTECTED] wrote:

  Weird requirement I know - when I try UrlFetch another URL within my
  application the page doing the request never completes.  After this
  the dev_appserver refuses to respond to anything.  I'm definitely not
  attempting to load the SAME page and getting myself into an infinite
  loop.

 Hi.

 http://code.google.com/appengine/docs/urlfetch/fetchfunction.html
 says:

 The fetch action is synchronous. fetch() will not return until the
 server responds.

     jK
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: dev_appserver locks up with UrlFetch to URL within same application

2008-11-10 Thread russ.au

Forgot to mention - I don't have any problem with the same code on the
'live' appspot webserver.

On Nov 10, 10:38 pm, russ.au [EMAIL PROTECTED] wrote:
 Weird requirement I know - when I try UrlFetch another URL within my
 application the page doing the request never completes.  After this
 the dev_appserver refuses to respond to anything.  I'm definitely not
 attempting to load the SAME page and getting myself into an infinite
 loop.

 I can post code to reproduce this if anyone in the google team is
 interested.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] urlfetch ResponseTooLargeError - what is the limit?

2008-11-06 Thread russ.au

I'm attempting to write an app to 'manipulate' podcast MP3s.  I'm
getting an exception ResponseTooLargeError trying to grab the
podcast.  If I turn on allow_truncated - len(result.content) gives
1048576.

Sounds like the limit is 1 meg - i don't find this documented
anywhere.  Is this a hard limit - or is it likely to change any time
in the future?

Russ

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---