[google-appengine] Re: Is Memcache really needed?

2008-11-17 Thread Greg

 I don't know if this means that each server instance has its own
 Memcache or that all the instances access a single Memcache.

All instances access the same memcache - although this may be
distributed behind the scenes, I don't know about that.

I agree with you that it would be elegant to have automatic caching,
but that would impose some limitations - currently you can memcache
anything (including complex objects), but you can only store limited
data types in the datastore; and you can do (limited) querys on the
datastore but not on memcache.

Ideally we'd have a transparently cached queryable object store to
replace the datastore and memcache, but I guess this would be a
significant amount of development. Maybe Google should hire the Zope
guys to build it.

Cheers!
Greg.
--~--~-~--~~~---~--~~
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: 403 - sorry.google.com/sorry - your query looks similar to automated requests

2008-11-17 Thread Jay Freeman (saurik)
Yay! I'm glad to hear that it was a temporary issue. I've been sitting here for 
the last hour thinking I'm going to have to start this website entirely over 
again, and I'm almost done with it, as I know that its going to look like a 
bunch of automated requests (lots of small requests quite often from users 
who are going to be on cell phones, and therefore on 3G and Edge IP address 
pools that I have no control of or documentation on, but for which I know there 
aren't many). I wish Google would actually say something about where they are 
going in this direction, though :(.

Out of curiosity, how are you currently dealing with this problem? I mean 
currently as in without/before App Engine? App Engine is quite unique in 
being free (and I don't think that's at all a feature). For example, if you 
want to start burning cash out of my pocket, start downloading files rapidly 
from my CDN (where I have to pay for bandwidth), or start rapidly uploading 
things to my S3-backed website (where I have to pay for storage). What were you 
using before App Engine, and how did they solve this same problem?

Where App Engine is not unique, though, is being in a position where [my] app 
potentially sits alongside [your] application. This is how it always worked 
with bandwidth (just fundamentally and in the global sense) and how it usually 
works with managed web hosting. It also is becoming more and more the case with 
cloud computing. To stare at Amazon for a second: everyone is sharing the power 
of SimpleDB, the servers of EC2, and the storage of S3. And yet, the cloud 
doesn't end when someone attempts to DOS one of the applications that use these 
services. This is why I say I don't even understand the need for this. ;P

Though, what is really getting me here, is that abuse can't be defined from a 
technical perspective. Abuse has nothing to do with how many IP addresses are 
contacting my website in how short a period of time: it has to do with whether 
my traffic is legitimate or not. Telling me what these limits are doesn't make 
the limitation much more reasonable. I've seen a number of other service 
providers try to go down this path, and it just doesn't work: getting five 
e-mails in a day from someone I don't like is irritating, but getting five 
e-mails from someone else might be pleasant (and in fact talking to them might 
be the reason I use e-mail).

As a quick apropos example, let's take BuddyPoke: the famous case of popular 
Facebook application on App Engine. Now, I don't know how BuddyPoke is 
configured (and it doesn't really matter, as BuddyPoke need not be the exact 
exemplar), but the most common way (for various reasons) to setup Facebook 
applications is to receive HTTP callbacks from Facebook, to which you return 
FBML (HTML with embedded tags for things like a small picture of user X). 
All of your requests are going to come from the same few IP addresses (which 
you don't have any control over), and they are going to come extremely rapidly 
(well, if you're lucky). Putting any limit at all on requests per ip address 
per hour is therefore saying do not write BuddyPoke. ;P

Another way of putting it: while I understand why someone would want protection 
from the things you are discussing, this doesn't seem like a viable way to get 
it. I would also question whether someone really needs to live in an air tight 
bubble in order to protect themselves from cigarette smoke (especially if their 
airtight bubble just caused them to suffocate ;P).

-J



From: Paul Kinlan 
Sent: Sunday, November 16, 2008 11:22 PM
To: google-appengine@googlegroups.com 
Subject: [google-appengine] Re: 403 - sorry.google.com/sorry - your query looks 
similar to automated requests


I actually think it was a temporary glitch, I have not seen it at all since 
when we first reported it.

I am in the same boat as Adam, I designed my page to make lots of simultaneous 
request (via an xmlhttprequest) instead of doing all the hard work in the main 
web page...  Its a hard one, because if google tell us the thresholds for 
triggering this then it is open to abuse up unitl that limit.  You can stop one 
person from abusing the site by blocking them from making requests over this 
threshold, how would you do it for 1000 machines from different networks 
hitting your site to just below the threshold regularly.

To get to Jays argument.  although I am not keen on it, as per my original 
email, I have had time over the weekend to think about it.  I think we all need 
protection from malicious use, after all, everything on this service will be 
directly monetisable (above the free quota) and with the services that I run, I 
don't want to spend money on people who are not interested in my site. I would 
however like some control over what would be blocked, after all I will be 
exposing API's to clients when the GAE is out of beta and if it was a 
traditional unix host (for instance) I would have control over the ip 

[google-appengine] Re: Is Memcache really needed?

2008-11-17 Thread Anders

Yes, removing Memcache from the GAE API is probably not a good idea.
There must have been some reason why it was added.

What I'm skeptic about is if it will be a good idea for me to use it
or if I will only be doing something unnecessary or even worse,
shooting myself in the foot if the Memcache does not scale well and if
my site will start to get massive traffic (my application still has
very low traffic but I want to be prepared for the eventuality of an
exponential traffic increase :-).

On Nov 17, 9:13 am, Greg [EMAIL PROTECTED] wrote:
  I don't know if this means that each server instance has its own
  Memcache or that all the instances access a single Memcache.

 All instances access the same memcache - although this may be
 distributed behind the scenes, I don't know about that.

 I agree with you that it would be elegant to have automatic caching,
 but that would impose some limitations - currently you can memcache
 anything (including complex objects), but you can only store limited
 data types in the datastore; and you can do (limited) querys on the
 datastore but not on memcache.

 Ideally we'd have a transparently cached queryable object store to
 replace the datastore and memcache, but I guess this would be a
 significant amount of development. Maybe Google should hire the Zope
 guys to build it.

 Cheers!
 Greg.
--~--~-~--~~~---~--~~
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: 403 - sorry.google.com/sorry - your query looks similar to automated requests

2008-11-17 Thread Alexander Kojevnikov

 I wish Google would actually say something about
 where they are going in this direction, though :(.

DoS attacks have been discussed a couple of month ago in this thread:
http://groups.google.com/group/google-appengine/browse_thread/thread/7503bf772ae32434/bc3fd79d4bb2968d

In particular, check Marce's answer near the bottom of the page.

--~--~-~--~~~---~--~~
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: Environment variable DJANGO_SETTINGS_MODULE is undefined

2008-11-17 Thread Pranny

Before you import any django libraries, except for those from
google.appengine.* you ust specify the Django settings.
If you are using a fully Django environment, you should refer to
http://code.google.com/p/google-app-engine-samples/source/browse/trunk/django_example/settings.py
for an idea of what settings should be like.

However, i fear that you are not using a fully Django base, so in that
case, you can see 
http://thomas.broxrost.com/2008/04/08/django-on-google-app-engine/
for importing Django in GAE.

I hope this will solve your problem.

Regards,
Pranav

On Nov 17, 9:35 am, Chris [EMAIL PROTECTED] wrote:
 I'm running a basic webapp install, but where ever my code imports
 google.appengine.ext.db.djangoforms or django.newforms I'm getting the
 error Environment variable DJANGO_SETTINGS_MODULE is undefined.
 Since webapp doesn't using Django's settings, what could be causing
 this?
--~--~-~--~~~---~--~~
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: Data exchange between DataStore and gData

2008-11-17 Thread Pranny

Hmm, i don't see a reason why i can not do so. After all at the heart,
both store 'string' data. So, they can be easily modified. Anyways,
thanks folks.

On Nov 16, 6:26 pm, Pranny [EMAIL PROTECTED] wrote:
 Hi,
 I have a couple of questions.
 (1) Can i display two widgets for one label? If i have a property
 named Residence Address, i would like two text boxes coming next to
 this label. How do i do it?

 (2) In the initial stage, i just put two separate property like
 'Address Line 1' and 'Address Line 2', both an instance of
 StringProperty. Now i need to exchange this data through the gData
 API. Is it possible to merge 'Address Line 1' and 'Address Line 2'
 into a single gData element of type postaladdress. If yes, then please
 provide me a brief method of doing it. Also, is there anything that i
 need to take care of, when exchanging data between the two?

 Regards,
--~--~-~--~~~---~--~~
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: Environment variable DJANGO_SETTINGS_MODULE is undefined

2008-11-17 Thread Jesaja Everling

Hi Chris!

Did you make sure to first import google.appengine.webapp.template
before importing the djangoforms module?
Please have a look at this article:

http://code.google.com/appengine/articles/djangoforms.html

I don't think django.newforms exists in appengine, AFAIK it has been
deprecated.

Best Regards,

Jesaja Everling


On 17 Nov., 05:35, Chris [EMAIL PROTECTED] wrote:
 I'm running a basic webapp install, but where ever my code imports
 google.appengine.ext.db.djangoforms or django.newforms I'm getting the
 error Environment variable DJANGO_SETTINGS_MODULE is undefined.
 Since webapp doesn't using Django's settings, what could be causing
 this?

On 17 Nov., 11:12, Pranny [EMAIL PROTECTED] wrote:
 Before you import any django libraries, except for those from
 google.appengine.* you ust specify the Django settings.
 If you are using a fully Django environment, you should refer 
 tohttp://code.google.com/p/google-app-engine-samples/source/browse/trun...
 for an idea of what settings should be like.

 However, i fear that you are not using a fully Django base, so in that
 case, you can 
 seehttp://thomas.broxrost.com/2008/04/08/django-on-google-app-engine/
 for importing Django in GAE.

 I hope this will solve your problem.

 Regards,
 Pranav

 On Nov 17, 9:35 am, Chris [EMAIL PROTECTED] wrote:

  I'm running a basic webapp install, but where ever my code imports
  google.appengine.ext.db.djangoforms or django.newforms I'm getting the
  error Environment variable DJANGO_SETTINGS_MODULE is undefined.
  Since webapp doesn't using Django's settings, what could be causing
  this?
--~--~-~--~~~---~--~~
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: getting DeadlineExceededError posting facebook from GAE

2008-11-17 Thread admin go2
Or maybe the server response is too slow to finish in 10 seconds

=
http://go2.appspot.com



2008/11/17 MattG [EMAIL PROTECTED]


 happens every time.

 On Nov 16, 7:41 am, admin go2 [EMAIL PROTECTED] wrote:
  There is not any bug in your code.
  Maybe the temporary network problem cause the urlfetch function works
  incorrectly.
 
  =http://go2.appspot.com
  2008/11/16 MattG [EMAIL PROTECTED]
  
 
 
   any idea what I'm doing wrong?  GAE log said this operation too 18k
   msecs.  here's there error:
 
   DeadlineExceededError at /mybagapp/post_bag_item
   Request Method: POST
   Request URL:http://mybagdev.appspot.com/mybagapp/post_bag_item
   Exception Type: DeadlineExceededError
   Exception Value:
   Exception Location: /base/python_lib/versions/1/google/appengine/
   runtime/apiproxy.py in Wait, line 161
 
   Traceback (most recent call last):
   File /base/python_lib/versions/1/django/core/handlers/base.py in
   get_response
77. response = callback(request, *callback_args, **callback_kwargs)
   File /base/data/home/apps/mybagdev/1.329321030374107277/mybag/
   views.py in post_bag_item
193. curr_user_obj.publish_user_action(request.POST,
   bag_item.item_name)
   File /base/data/home/apps/mybagdev/1.329321030374107277/mybag/
   user.py in publish_user_action
107. call_id = True )
   File /base/data/home/apps/mybagdev/1.329321030374107277/mybag/
   gminifb.py in call
170. response = urlfetch.fetch(_fbUrl, payload=args,
   method=urlfetch.POST, headers = {'Content_type': 'application/
   x_www_form_urlencoded'})
   File /base/python_lib/versions/1/google/appengine/api/urlfetch.py in
   fetch
257. apiproxy_stub_map.MakeSyncCall('urlfetch', 'Fetch', request,
   response)
   File /base/python_lib/versions/1/google/appengine/api/
   apiproxy_stub_map.py in MakeSyncCall
46. stub.MakeSyncCall(service, call, request, response)
   File /base/python_lib/versions/1/google/appengine/runtime/
   apiproxy.py in MakeSyncCall
245. rpc.Wait()
   File /base/python_lib/versions/1/google/appengine/runtime/
   apiproxy.py in Wait
161. rpc_completed = _apphosting_runtime___python__apiproxy.Wait
   (self)
 
DeadlineExceededError at /mybagapp/post_bag_item
 


--~--~-~--~~~---~--~~
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: Is Memcache really needed?

2008-11-17 Thread Ben Nevile

Hi Anders,

In my experience with standard RMDBS, memcache is more useful for
caching arbitrary data and less useful for caching model objects.  If
you have a really tuned database layer a lot of your queries will
already be resident in the database's cache, and memcache provides
only a modest efficiency gain.  With GAE that seems to be less true -
in one of my apps, caching my User model reduced response time by
about 150ms.

However, where I have found memcache most valuable is in caching more
arbitrary data constructs.  Caching fragments of your rendered HTML,
for instance, can be really effective.  Or perhaps there's a big chunk
of JSON that is often requested, but really only needs to be updated
once a minute.  Removing the memcache API would be really really
unfortunate.

re: whether or not you should implement it, I would say NO.  until you
have a whole whack of users, concentrate on more important things.

Ben



On Nov 17, 12:26 am, Anders [EMAIL PROTECTED] wrote:
 Yes, removing Memcache from the GAE API is probably not a good idea.
 There must have been some reason why it was added.

 What I'm skeptic about is if it will be a good idea for me to use it
 or if I will only be doing something unnecessary or even worse,
 shooting myself in the foot if the Memcache does not scale well and if
 my site will start to get massive traffic (my application still has
 very low traffic but I want to be prepared for the eventuality of an
 exponential traffic increase :-).

 On Nov 17, 9:13 am, Greg [EMAIL PROTECTED] wrote:

   I don't know if this means that each server instance has its own
   Memcache or that all the instances access a single Memcache.

  All instances access the same memcache - although this may be
  distributed behind the scenes, I don't know about that.

  I agree with you that it would be elegant to have automatic caching,
  but that would impose some limitations - currently you can memcache
  anything (including complex objects), but you can only store limited
  data types in the datastore; and you can do (limited) querys on the
  datastore but not on memcache.

  Ideally we'd have a transparently cached queryable object store to
  replace the datastore and memcache, but I guess this would be a
  significant amount of development. Maybe Google should hire the Zope
  guys to build it.

  Cheers!
  Greg.
--~--~-~--~~~---~--~~
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: Is Memcache really needed?

2008-11-17 Thread Wooble



On Nov 17, 3:26 am, Anders [EMAIL PROTECTED] wrote:
 What I'm skeptic about is if it will be a good idea for me to use it
 or if I will only be doing something unnecessary or even worse,
 shooting myself in the foot if the Memcache does not scale well and if
 my site will start to get massive traffic

Memcache was designed to run Livejournal.  I don't know what your
application is, but it seems a bit optimistic to think you'll have
scaling issues that they don't.
--~--~-~--~~~---~--~~
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: title and home page caching problem

2008-11-17 Thread Wooble

Are you using Google Apps or a redirection service from your
registrar?  If the latter, the frame may be added by the registrar,
causing this trouble.  I haven't seen Google themselves putting app
engine pages in frames at all, and you mentioned earlier using the
address familyrhyme.com, which is a naked domain and thus not
supported.

On Nov 14, 7:20 pm, adrian [EMAIL PROTECTED] wrote:
 Now the original problem is back!    But I have some clues.  It occurs
 when AppEngine serves the app in a Frame.   It does that apparently at
 random (I have no Frames in my code).  It has switched back and forth
 several times today.  When it serves the app in a Frame, it uses a
 title I had in an old version of the app, which is different from the
 title tag inside the Frame and every other page in my site (they are
 all the same).  Here is the HTML source when served in a frame:

 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN
  http://www.w3.org/TR/html4/strict.dtd;html head
 titleEvery Rhyme, Every Time /title
 META name=description content=Gives you perfect and close rhymes
 for songwriting
 META name=keywords content=song songwriter songwriting contest
 rhyme perfect close near imperfect
 /headframeset rows=100%,* border=0
 frame src=http://familyrhyme.appspot.com; frameborder=0 /
 frame frameborder=0 noresize /
 /frameset
 !-- pageok --
 !-- 04 --
 !-- 7.9--
 /html

 And here is the source directly from my app as it appear when
 AppEngine serves it without Frame:

 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
 http://www.w3.org/TR/html4/loose.dtd;
 html
 head
 link rel=stylesheet href=/stylesheets/mystyle.css type=text/css
 media=screen
 titlePerfectRhyme: Rhyme Finder with Close Rhymes for Songwriters
 and Poets/title
 META http-equiv=Content-Type content=text/html;
 charset=ISO-8859-1
 meta name=description content=PerfectRhyme rhyme finder with close
 and near rhymes
 meta name=keywords content=PerfectRhyme FamilyRhyme perfect rhyme
 rhymes rhyme finder close rhyme near rhymes songwriter songwriting
 poetry poet poets songwriters ryhme ryhmes rime ryme rimes rymes
 rhymezone rhymefinder
 /head

 When it doesn't serve the app in a Frame, everything is as it should
 be.    Daniel, if you or someone at Google wants to look into what is
 happening, the file in question is starthtml.html.   It starts every
 page on my site and is the only file containing a title tag.   The
 app is familyrhyme.appspot.com.

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



[google-appengine] Re: How can I add Timer to my GAE application?

2008-11-17 Thread A . TNG

On Mon, Nov 17, 2008 at 11:48 AM, Alex Cheng [EMAIL PROTECTED] wrote:

 I want to add a timer to my GAE application, so I can execute certain
 logic at given interval. I tried python's Timer object (http://
 www.python.org/doc/2.5.2/lib/timer-objects.html), but it doesn't seem
 to work properly.


If you want cron jobs, you may try this
http://code.google.com/p/gaeutilities/wiki/Cron.
Good luck. :-)

-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
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: Is Memcache really needed?

2008-11-17 Thread Anders

Hi Ben,

Yes I agree, caching whole chunks of data that are computing intense
to render and that change only now and then would certainly be worth
caching. And that has to be done on the application level.

On Nov 17, 3:15 pm, Ben Nevile [EMAIL PROTECTED] wrote:
 Hi Anders,

 In my experience with standard RMDBS, memcache is more useful for
 caching arbitrary data and less useful for caching model objects.  If
 you have a really tuned database layer a lot of your queries will
 already be resident in the database's cache, and memcache provides
 only a modest efficiency gain.  With GAE that seems to be less true -
 in one of my apps, caching my User model reduced response time by
 about 150ms.

 However, where I have found memcache most valuable is in caching more
 arbitrary data constructs.  Caching fragments of your rendered HTML,
 for instance, can be really effective.  Or perhaps there's a big chunk
 of JSON that is often requested, but really only needs to be updated
 once a minute.  Removing the memcache API would be really really
 unfortunate.

 re: whether or not you should implement it, I would say NO.  until you
 have a whole whack of users, concentrate on more important things.

 Ben

 On Nov 17, 12:26 am, Anders [EMAIL PROTECTED] wrote:

  Yes, removing Memcache from the GAE API is probably not a good idea.
  There must have been some reason why it was added.

  What I'm skeptic about is if it will be a good idea for me to use it
  or if I will only be doing something unnecessary or even worse,
  shooting myself in the foot if the Memcache does not scale well and if
  my site will start to get massive traffic (my application still has
  very low traffic but I want to be prepared for the eventuality of an
  exponential traffic increase :-).

  On Nov 17, 9:13 am, Greg [EMAIL PROTECTED] wrote:

I don't know if this means that each server instance has its own
Memcache or that all the instances access a single Memcache.

   All instances access the same memcache - although this may be
   distributed behind the scenes, I don't know about that.

   I agree with you that it would be elegant to have automatic caching,
   but that would impose some limitations - currently you can memcache
   anything (including complex objects), but you can only store limited
   data types in the datastore; and you can do (limited) querys on the
   datastore but not on memcache.

   Ideally we'd have a transparently cached queryable object store to
   replace the datastore and memcache, but I guess this would be a
   significant amount of development. Maybe Google should hire the Zope
   guys to build it.

   Cheers!
   Greg.


--~--~-~--~~~---~--~~
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] Still no last-modified or if-modified-since support for static files...

2008-11-17 Thread Jonathan Feinberg

Google people, any chance of turning on these simple methods for
contributing to cacheability?
--~--~-~--~~~---~--~~
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] Add Model field via Mixin?

2008-11-17 Thread Adam

I'm wondering if it is possible to add a field to a Model class with a
mixin.

Here's my hypothetical problem:  let's say that I am designing Blog
software -- I know, I know, what an innovation! -- that features Posts
and Comments.

class Post(db.Model):
title = db.StringProperty(required=True)
body = db.TextProperty(required=True)
added = db.DateProperty(auto_add_now=True)

class Comment(db.Model):
author = db.UserProperty()
body = db.TextProperty()
added = db.DateProperty()
edited = db.DateProperty()

I would like Post to have a counter of the number of comments that it
has, so I could change my definition of Post to this:
class Post(db.Model):
title = db.StringProperty(required=True)
body = db.TextProperty(required=True)
added = db.DateProperty(auto_add_now=True)
comments_counter = db.IntegerProperty(required=True, defualt=0)

However, what I would really to do is have a mixin class called
Commentable that will add a variety of useful methods to the class
that mixes it in.  It'd be super cool to be able to have
comments_counter added in by it:

class Commentable:
comments_counter = db.IntegerProperty(required=True, default=0)

# Various method definitions excluded for brevity...

class Post(db.Model, Commentable):
title = db.StringProperty(required=True)
body = db.TextProperty(required=True)
added = db.DateProperty(auto_add_now=True)
# comments_counter = db.IntegerProperty(required=True, defualt=0)
# Now, comments_counter is included by Commentable mixin

I gave something like this a try last night, and it didn't seem to
work, so I figured that I'd ask before going too-deeply down a rabbit
hole.

If this won't work, I think that it'd be super cool.  It would enable
a wide range of work-and-time saving plugins, such as in the Ruby on
Rails ecosystem.
--~--~-~--~~~---~--~~
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] Is there any forum to popularize appengine apps ?

2008-11-17 Thread Grayce

Is there any particular forum where you can popularize your appengine
apps ? For instance, all firefox extension developers have
addons.mozilla.org, foxiewire.com etc.
If not, can this discussion group be used for this purpose ?

Regards,
Grayce

--~--~-~--~~~---~--~~
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] bulkload_client.py not working

2008-11-17 Thread Gampesh

Hi,

I tried to upload abc.txt and abc.csv but it not uploaded it gives me
following error.


INFO 2008-11-17 13:16:41,967 bulkload_client.py] Starting import;
maximum 10 entities per post
INFO 2008-11-17 13:16:41,967 bulkload_client.py] Importing 4
entities in 29 bytes
ERROR2008-11-17 13:16:43,437 bulkload_client.py] An error occurred
while importing: Received code 302: Found

302 Moved
The document has moved
here.
ERROR 2008-11-17 13:16:43,453 bulkload_client.py] Import failed

what is wrong in this.

--~--~-~--~~~---~--~~
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] Create an Application Fails Silently

2008-11-17 Thread jerry richardson

When I use the Create an Application, I enter an app identifier and
title, then click Save and get looped back around to
http://appengine.google.com/start with no indication of what the
outcome of the save operation was. It does cause the identifier to
no longer be available.
--~--~-~--~~~---~--~~
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: title and home page caching problem

2008-11-17 Thread adrian

Yes it is redirected (through Godaddy).   Maybe Godaddy grabbed the
title when I first set up the redirection and they are still using
that.
Strange that they sometimes put it in a frame, sometimes not.

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



[google-appengine] Re: Is Memcache really needed?

2008-11-17 Thread Jon McAlister

On Nov 17, 12:13 am, Greg [EMAIL PROTECTED] wrote:
  I don't know if this means that each server instance has its own
  Memcache or that all the instances access a single Memcache.

 All instances access the same memcache - although this may be
 distributed behind the scenes, I don't know about that.

For any particular key, all instances will talk to the same memcache
backend. Note that we can easily have different keys hosted on
different backends, though, thanks to the simplicity of the memcache
API (i.e. lack of transactions). This is how we can shard one app's
memcache data on to multiple machines.
--~--~-~--~~~---~--~~
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: Concurrency Control in the datastore

2008-11-17 Thread ryan

hi david! you're in roughly the same neighborhood, but there are a
number of key differences between what you've outline and what the
datastore actually does. here are a few:

- each entry in an entity group's tx log has a single timestamp. there
aren't separate separate read and last committed timestamps.
- we only fail at commit time, not earlier. specifically, we never
consider a read invalid just because a write has happened since the
tx started. we just read the data as of when the tx started, ie before
the new write. if a write occurs within the tx, we'll fail on commit.
if the tx is read-only, then there's no need to fail.
- when starting a tx, its timestamp is always generated based on the
last committed timestamp of the entity group. we can't just use the
time on the local server, since clocks aren't perfectly synchronized
across servers.
- note that txes may not be retried purely within the datastore, since
writes may depend on the values of earlier reads. if the entities that
were read have changed, we must re-run your application logic to
recalculate the derived writes. that's why run_in_transaction() takes
a lambda, so that we can re-run it if necessary.
--~--~-~--~~~---~--~~
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: Is Memcache really needed?

2008-11-17 Thread Anders

On Nov 17, 6:30 pm, Jon McAlister [EMAIL PROTECTED] wrote:

 For any particular key, all instances will talk to the same memcache
 backend. Note that we can easily have different keys hosted on
 different backends, though, thanks to the simplicity of the memcache
 API (i.e. lack of transactions). This is how we can shard one app's
 memcache data on to multiple machines.

Ah! That explains it. This also means that an idea I had about
sharding the Memcache will work. Let's say that we have a key named
'indexpage'. We can then shard the Memcache by adding an index, say
0..99 to the key, so instead of just accessing a single key
'indexpage' we can randomly access keys with the index added to it,
such as: 'indexpage_32', 'indexpage_7', 'indexpage_85' etc.
--~--~-~--~~~---~--~~
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: How do I load a HTML index file from Python

2008-11-17 Thread Marzia Niccolai
Hi,

Make sure you haven't listed your templates as static_dir/static_files in
your app.yaml.  If you have, the templates can't be accessed in the Python
code.

-Marzia

On Sun, Nov 16, 2008 at 5:46 PM, Chenqun Hang [EMAIL PROTECTED] wrote:

 try GAE's templates
 http://code.google.com/appengine/docs/gettingstarted/templates.html

 2008/11/16 Vee Why [EMAIL PROTECTED]


 I am a complete novice at using python, but can someone help me.

 I want to load a Index.html home page to my Google App Engine page
 using python.

 based on the Google App Engine tutorial, I have this python script,
 but want the page to load a HTML file called 'index.html', what do I
 do?

 My Python script
 

 from google.appengine.ext import webapp
 from google.appengine.ext.webapp.util import run_wsgi_app
 class MainPage(webapp.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write('Hello, webapp World!')
 application = webapp.WSGIApplication(
[('/', MainPage)],
debug=True)
 def main():
run_wsgi_app(application)
 if __name__ == __main__:
main()

 




 


--~--~-~--~~~---~--~~
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: Create an Application Fails Silently

2008-11-17 Thread Marzia Niccolai
Hi,

This could be an issue if you are using an account that is both a Google
Account and a Google Apps account.

If you reply to me with an app id that you have registered but can now not
locate, I can look in to it more.

Thanks,
Marzia

On Mon, Nov 17, 2008 at 8:48 AM, jerry richardson 
[EMAIL PROTECTED] wrote:


 When I use the Create an Application, I enter an app identifier and
 title, then click Save and get looped back around to
 http://appengine.google.com/start with no indication of what the
 outcome of the save operation was. It does cause the identifier to
 no longer be available.
 


--~--~-~--~~~---~--~~
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: zipimport doesn't work in SDK 1.1.5

2008-11-17 Thread Marzia Niccolai
Hi,

How is zipimport failing? Can you provide the code and error messages?

Thanks,
Marzia

On Sun, Nov 16, 2008 at 1:49 AM, A.TNG [EMAIL PROTECTED] wrote:


 Hi All,

 The zipimport feature is really cool and it's very helpful to solve
 1000-file restriction. I have AppEngine SDK 1.1.5 (the latest)
 installed. Then I wrote a simple example and try it. But the zipimport
 doesn't work in SDK.

 I tried some other ways:
 1. I upload to AppEngine, the same code works well in server.
 2. I uninstall SDK 1.1.5 and install SDK 1.1.3. The same work works
 fine too.

 So, I think there should be something wrong with SDK 1.1.5 and
 zipimport. Anyone meet the same problem? Or you have some hint about
 solve this bug?

 Thanks a lot. :)

 --
 Best Regards,
 Jiyu
 


--~--~-~--~~~---~--~~
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: Is there any forum to popularize appengine apps ?

2008-11-17 Thread Barry Hunter

http://appgallery.appspot.com/

See also
http://groups.google.com/group/google-appengine/web/google-app-engine-open-source-projects





On Mon, Nov 17, 2008 at 9:17 AM, Grayce [EMAIL PROTECTED] wrote:

 Is there any particular forum where you can popularize your appengine
 apps ? For instance, all firefox extension developers have
 addons.mozilla.org, foxiewire.com etc.
 If not, can this discussion group be used for this purpose ?

 Regards,
 Grayce

 




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



[google-appengine] Re: Speed up a slow development appserver by taming index history file

2008-11-17 Thread Marzia Niccolai
Hi Nick,

Thanks for the tip!  Can I suggest you also add this to the community knol
page?
http://knol.google.com/k/marce/app-engine-community-faqs/vkzeph4si12v/1#

-Marzia

On Sat, Nov 15, 2008 at 2:28 PM, Nick Winter [EMAIL PROTECTED] wrote:


 We're going to a trade conference next week to demo our app, but we
 can't afford $5000 for an Internet connection. No problem, we
 thought, we'll just demo it off of the development appserver.

 So we're trying to work around the sluggishness with which the dev
 appserver responds to requests. Yet no matter what the request (a tiny
 static file, an immediate HTTP response through Django, a memcache
 hit, whatever), debug or not, with tons of
 data or no data in the datastore, every response takes 1.5 seconds.
 Brutal.

 I finally figure out why the development appserver is so slow (and has
 always been getting slower, I now realize): on every request, it's
 spending nearly 1.5 seconds parsing our long local datastore history
 file, even if the request doesn't explicitly query the datastore. I
 hadn't even thought of this; we manage the size of the datastore file,
 but apparently the history file had never been cleared. It had grown
 to 813 KB with 11315 queries (and that's from my machine alone).

 So yeah, that was it. Everything runs nigh-instantly now. I haven't
 seen any references to this problem elsewhere, or any warnings that a
 long history file can impact performance, so maybe this'll help
 someone avoid our fate. Perhaps it can be mentioned in the docs.
 


--~--~-~--~~~---~--~~
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: Add Model field via Mixin?

2008-11-17 Thread Rodrigo Moraes

On Mon, Nov 17, 2008 at 2:56 PM, Adam wrote:
 I tried declaring Commentable to inherit from db.Model, but that
 didn't seem to make a difference.

take a look at this project, which is a mixin class for tags:

http://code.google.com/p/taggable-mixin/

it requires that you define __init__() for the class that extends the
mixin class. not sure if it would make any difference for you, but let
me know. :)

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



[google-appengine] Re: Is Memcache really needed?

2008-11-17 Thread Barry Hunter

On Mon, Nov 17, 2008 at 5:52 PM, Anders [EMAIL PROTECTED] wrote:

 On Nov 17, 6:30 pm, Jon McAlister [EMAIL PROTECTED] wrote:

 For any particular key, all instances will talk to the same memcache
 backend. Note that we can easily have different keys hosted on
 different backends, though, thanks to the simplicity of the memcache
 API (i.e. lack of transactions). This is how we can shard one app's
 memcache data on to multiple machines.

 Ah! That explains it. This also means that an idea I had about
 sharding the Memcache will work. Let's say that we have a key named
 'indexpage'. We can then shard the Memcache by adding an index, say
 0..99 to the key, so instead of just accessing a single key
 'indexpage' we can randomly access keys with the index added to it,
 such as: 'indexpage_32', 'indexpage_7', 'indexpage_85' etc.

Before you go and implement that, do you have any evidence that
memcache could be a bottle neck?

Otherwise it sounds like a case of possible premeture optimization.
Not withstanding the fact that as I understand memcache 'shards' by
hashing the key - but that leads no garenteers that your keys will end
up on seperate instances.

And that also leads to more work as you now have to generate your page
100 times (which if you using the cache right is probably expensive)

From my experience of Memcache (not on AppEngine) - its very quick at
dealing out the same result multiple times. And if memcache is truly
distributed on AppEngine - and it doesnt do it already, then there is
always the possiblility of edge caching really hot items (say on the
machine itself)  - which your sharding would instantly make less
effective. (memcache - can itself be cached - which as Jon points out
the datastore cant)

I guess what trying to say is if at all possible you should leave the
'scaling' to the platform, its only where that is not possible (like
counters) that you should consider it yourself, (like you say in your
opening post!)



 




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



[google-appengine] Re: getting DeadlineExceededError posting facebook from GAE

2008-11-17 Thread MattG

seems unlikely that posting a newsfeed to facebook would take more
that 10 seconds.

thx for your help.

On Nov 17, 7:43 am, admin go2 [EMAIL PROTECTED] wrote:
 Or maybe the server response is too slow to finish in 10 seconds

 =http://go2.appspot.com

 2008/11/17 MattG [EMAIL PROTECTED]



  happens every time.

  On Nov 16, 7:41 am, admin go2 [EMAIL PROTECTED] wrote:
   There is not any bug in your code.
   Maybe the temporary network problem cause the urlfetch function works
   incorrectly.

   =http://go2.appspot.com
   2008/11/16 MattG [EMAIL PROTECTED]

any idea what I'm doing wrong?  GAE log said this operation too 18k
msecs.  here's there error:

DeadlineExceededError at /mybagapp/post_bag_item
Request Method:         POST
Request URL:    http://mybagdev.appspot.com/mybagapp/post_bag_item
Exception Type:         DeadlineExceededError
Exception Value:
Exception Location:     /base/python_lib/versions/1/google/appengine/
runtime/apiproxy.py in Wait, line 161

Traceback (most recent call last):
File /base/python_lib/versions/1/django/core/handlers/base.py in
get_response
 77. response = callback(request, *callback_args, **callback_kwargs)
File /base/data/home/apps/mybagdev/1.329321030374107277/mybag/
views.py in post_bag_item
 193. curr_user_obj.publish_user_action(request.POST,
bag_item.item_name)
File /base/data/home/apps/mybagdev/1.329321030374107277/mybag/
user.py in publish_user_action
 107. call_id = True )
File /base/data/home/apps/mybagdev/1.329321030374107277/mybag/
gminifb.py in call
 170. response = urlfetch.fetch(_fbUrl, payload=args,
method=urlfetch.POST, headers = {'Content_type': 'application/
x_www_form_urlencoded'})
File /base/python_lib/versions/1/google/appengine/api/urlfetch.py in
fetch
 257. apiproxy_stub_map.MakeSyncCall('urlfetch', 'Fetch', request,
response)
File /base/python_lib/versions/1/google/appengine/api/
apiproxy_stub_map.py in MakeSyncCall
 46. stub.MakeSyncCall(service, call, request, response)
File /base/python_lib/versions/1/google/appengine/runtime/
apiproxy.py in MakeSyncCall
 245. rpc.Wait()
File /base/python_lib/versions/1/google/appengine/runtime/
apiproxy.py in Wait
 161. rpc_completed = _apphosting_runtime___python__apiproxy.Wait
(self)

 DeadlineExceededError at /mybagapp/post_bag_item
--~--~-~--~~~---~--~~
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: WindowsError: [Error 183] Cannot create a file when that file already exists

2008-11-17 Thread Marzia Niccolai
Hi,

Are you using the standard --datastore_path and --history_path, or are you
setting this information when you run the dev_appserver?

If it doesn't happen every time, is there something particular being done
every time it fails?

What version of Windows OS are you using?

-Marzia

On Sat, Nov 15, 2008 at 4:39 PM, cm_gui [EMAIL PROTECTED] wrote:


 Hi All

 I am writing an application that uploads a file and then imports the
 data in the file to the datastore.
 Sometimes it works.  But sometimes, when I run it on the development
 server, I get this error:

 WindowsError: [Error 183] Cannot create a file when that file already
 exists

 I did a --clear_datastore but it didn't help.
 I have not tried uploading it to GAE yet.


 Thank you.

 G




 --


 Traceback (most recent call last):
  File C:\Program Files\Google\google_appengine\google\appengine\ext
 \webapp\__init__.py, line 501, in __call__
handler.post(*groups)
  File c:\fx001\fxaddress.py, line 426, in post
fxbook.put()
  File C:\Program Files\Google\google_appengine\google\appengine\ext
 \db\__init__.py, line 618, in put
return datastore.Put(self._entity)
  File C:\Program Files\Google\google_appengine\google\appengine\api
 \datastore.py, line 160, in Put
apiproxy_stub_map.MakeSyncCall('datastore_v3', 'Put', req, resp)
  File C:\Program Files\Google\google_appengine\google\appengine\api
 \apiproxy_stub_map.py, line 46, in MakeSyncCall
stub.MakeSyncCall(service, call, request, response)
  File C:\Program Files\Google\google_appengine\google\appengine\api
 \datastore_file_stub.py, line 305, in MakeSyncCall
(getattr(self, _Dynamic_ + call))(request, response)
  File C:\Program Files\Google\google_appengine\google\appengine\api
 \datastore_file_stub.py, line 353, in _Dynamic_Put
self.__WriteDatastore()
  File C:\Program Files\Google\google_appengine\google\appengine\api
 \datastore_file_stub.py, line 239, in __WriteDatastore
self.__WritePickled(encoded, self.__datastore_file)
  File C:\Program Files\Google\google_appengine\google\appengine\api
 \datastore_file_stub.py, line 291, in __WritePickled
os.rename(tmpfile.name, filename)
 WindowsError: [Error 183] Cannot create a file when that file already
 exists

 


--~--~-~--~~~---~--~~
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: http HEAD responds with 405 in webapp framework

2008-11-17 Thread Marzia Niccolai
Hi Jesse,

You should add the request to explicitly implement head in the webapp
framework to the issue tracker, or star the request if it already exists.

http://code.google.com/p/googleappengine/issues/list

As for your solution, it's definitely a valid solution.  In general I
usually write a BaseRequestHandler (that inherits from
webapp.RequestHandler). In it I include several different methods for my
handlers, and then have each handler inherit from the base class.

-Marzia

On Sun, Nov 16, 2008 at 7:48 AM, Jesse Grosjean [EMAIL PROTECTED]wrote:


 The webapp framework is fairly strict about http head requests. I'm
 not a web framework expert, but I think most web frameworks will
 implement head in terms of http GET if an explicit HEAD handler is not
 implemented. But webapp seems to require that head is explicit
 implemented in your handler or else it will return a 405 error. I
 would like HEAD to work on my site, but I don't really want to go and
 add special HEAD handlers to each of my controllers.

 This brings up two questions:

 1. Would it make sense to modify the webapp framework so that HEAD
 requests fall back on GET if HEAD isn't implemented?

 2. Related, in my app I've just added this default controller:

 class HEADHandler(webapp.RequestHandler):
def head(self, *args):
return self.get(*args)

 And I make all my other controllers inherit from it. This seems to
 work as desired, my controllers now correctly respond to HEAD
 requests. Is this an OK implementation, or can it cause problems that
 I'm not thinking about?

 Thanks,
 Jesse

 


--~--~-~--~~~---~--~~
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] Open sourced Mirrorrr: An app for Web Caching and handling the Slashdot effect

2008-11-17 Thread Brett

Had a bunch of requests for the code. Now it's open source. Apache
2.0. Enjoy!

Gallery page:
http://appgallery.appspot.com/about_app?app_id=agphcHBnYWxsZXJ5chMLEgxBcHBsaWNhdGlvbnMYiB4M

Source code:
http://mirrorrr.googlecode.com

--~--~-~--~~~---~--~~
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: Add Model field via Mixin?

2008-11-17 Thread Adam

Andy, many thanks for this idea.  This is the sort of metaprogramming
stuff that I think that I need.  I didn't know Python at all before I
began working on AppEngine, so metaclasses have escaped my attention
to date.  Safari, here I come!

On Nov 17, 2:32 pm, Andy Freeman [EMAIL PROTECTED] wrote:
 Why not define a metaclass that does the mixins for you?

 class UseMixins(db.Model):
     __metaclass__ = AddMixin

 class Post(UseMixins):
     Mixins = Comment,

 Some code that might be useful in helping you write AddMixin can be
 found 
 in:http://groups.google.com/group/google-appengine/browse_thread/thread/...

 If you figure out how to eliminate the explicit reference to db.Model,
 please let me know.

 On Nov 17, 8:38 am, Adam [EMAIL PROTECTED] wrote:

  I'm wondering if it is possible to add a field to a Model class with a
  mixin.

  Here's my hypothetical problem:  let's say that I am designing Blog
  software -- I know, I know, what an innovation! -- that features Posts
  and Comments.

  class Post(db.Model):
      title = db.StringProperty(required=True)
      body = db.TextProperty(required=True)
      added = db.DateProperty(auto_add_now=True)

  class Comment(db.Model):
      author = db.UserProperty()
      body = db.TextProperty()
      added = db.DateProperty()
      edited = db.DateProperty()

  I would like Post to have a counter of the number of comments that it
  has, so I could change my definition of Post to this:
  class Post(db.Model):
      title = db.StringProperty(required=True)
      body = db.TextProperty(required=True)
      added = db.DateProperty(auto_add_now=True)
      comments_counter = db.IntegerProperty(required=True, defualt=0)

  However, what I would really to do is have a mixin class called
  Commentable that will add a variety of useful methods to the class
  that mixes it in.  It'd be super cool to be able to have
  comments_counter added in by it:

  class Commentable:
      comments_counter = db.IntegerProperty(required=True, default=0)

      # Various method definitions excluded for brevity...

  class Post(db.Model, Commentable):
      title = db.StringProperty(required=True)
      body = db.TextProperty(required=True)
      added = db.DateProperty(auto_add_now=True)
      # comments_counter = db.IntegerProperty(required=True, defualt=0)
      # Now, comments_counter is included by Commentable mixin

  I gave something like this a try last night, and it didn't seem to
  work, so I figured that I'd ask before going too-deeply down a rabbit
  hole.

  If this won't work, I think that it'd be super cool.  It would enable
  a wide range of work-and-time saving plugins, such as in the Ruby on
  Rails ecosystem.
--~--~-~--~~~---~--~~
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: How can I add Timer to my GAE application?

2008-11-17 Thread Maciej Pietrzak

On 17 Lis, 16:09, A.TNG [EMAIL PROTECTED] wrote:
 On Mon, Nov 17, 2008 at 11:48 AM, Alex Cheng [EMAIL PROTECTED] wrote:

  I want to add a timer to my GAE application, so I can execute certain
  logic at given interval. I tried python's Timer object (http://
 www.python.org/doc/2.5.2/lib/timer-objects.html), but it doesn't seem
  to work properly.

 If you want cron jobs, you may try this 
 http://code.google.com/p/gaeutilities/wiki/Cron.
 Good luck. :-)

Or you can try my http://schedulerservice.appspot.com/

Main difference is that gaeutilities Cron runs inside your own app
inside requests initiated by regular (human) clients. Cron tasks will
not fire if there are no viewers, but generally every useful site has
at least some page views per day, so that shouldn't be a big problem.

On the other hand, Scheduler Service uses agents that call your url
from external hosts, so the whole thing doesn't depend on human
guests. But those external agents run on my servers, not Google's
ones, so if I were you I woudn't expect them to be that reliable
(altough me being me - I do expect them do be reliable, because I
simply trust myself ;). Also, with gaeutilities you can define any
number of tasks that will execute as often as you like as long as
there are human-initiated page views on your site. Scheduler Service
let's you define only a few schedulers that run at most 1 time per
hour.

Maybe the best thing would be to mix two technologies in new sites,
that is - run Cron tasks from both human and schedulerservice urls and
after your site (hopefully) gets some audience, drop schedulerservice
part?

Hope that helps.

Regards
Maciej
--~--~-~--~~~---~--~~
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] db.Text vs db.Blob

2008-11-17 Thread Andy Freeman

Since neither db.Text nor db.Blob is indexed, can we decide between
them on an entity-specific basis?

Specifically:

class A(db.Model):
   a = CustomProperty()

# where CustomProperty takes its data_type for get_value_for_datastore
purposes from the value, not from CustomProperty's definition.

a1 = A()
a1.a = db.Text('hi')
a1.put()
a2 = A()
a2.a = db.Blob('there')
a2.put()

Will the datastore have some problem with the fact that a1's a
property db.Text while a2's a property is db.Blob?


--~--~-~--~~~---~--~~
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: urlfetch problem

2008-11-17 Thread [EMAIL PROTECTED]

make sure you're not printing anything to stdout.

On Sep 20, 2:43 pm, uo [EMAIL PROTECTED] wrote:
 how can i remove the status info ie

 Status: 200 OK
 Last-Modified: Sat, 20 Sep 2008 03:47:52 GMT
 ETag: e608d454f548741614b550558645b689
 Content-Type: text/html; charset=utf-8
 Expires: Sat, 20 Sep 2008 03:47:51 GMTCache-Control: max-age=0

 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
 htmlhead

  from my response object after doing aurlfetch.fetch(url).content ???
 pliz help..anyone

--~--~-~--~~~---~--~~
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] OpenID consumer and sessions

2008-11-17 Thread Michael

Hi,

I have just tried to setup OpenID login for my app engine application,
following the sample code from 
http://code.google.com/p/google-app-engine-samples.
My question is: once successfully logged in, what is the right way
of dealing with a logged user throughout multiple requests?

So far I've done the following: after the consumer.complete() call, I
create a session variable 'claimed_id' and store it using
GAEUtilities' sessions.Session class (http://gaeutilities.appspot.com/
session). First of all I don't know if this is the intended way of
proceeding, or if it is plainly wrong; secondly, it seems like some
caching on the google servers prevents sessions from working
correctly; for instance, after deleting the session, it takes a few
refreshes before the server response is the right one (even with my
request headers being set to (Cache-Control: no-cache,max-age=0
and Pragma: no-cache)).

Looking forward to hearing from you,

Michael

--~--~-~--~~~---~--~~
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] unable to create application from costa rica because of failed SMS verfication...

2008-11-17 Thread jbastias


I'm having a problem setting up an application. If anyone could give
me a hand in getting going I would greatly appreciate it.

I am in Costa Rica. ICE (Instituto Costarricense de Electricidad -
http://www.grupoice.com/), the only carrier in the country is not
listed on your site as an accepted carrier. I tried to enter my number
(country code 506) but the system would not accept it. I would really
like to try out app engine. What can be done in order for me to get an
application up and running?

I'm posting here because the sms_issues page (http://
appengine.google.com/waitlist/sms_issues) seems to also have issues.

Thanks
Jorge

--~--~-~--~~~---~--~~
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: Reg. HelloWorld! Tutorial: Problems Running an Error-Free Guestbook Application

2008-11-17 Thread foghat

Possibly the same error that I'm getting. See below.

Traceback (most recent call last):
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/webapp/__init__.py, line 501, in __call__
handler.post(*groups)
  File /Users/foghat/Coding/Google App Engine/helloworld/
helloworld.py, line 46, in post
greeting.put()
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/db/__init__.py, line 618, in put
return datastore.Put(self._entity)
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/api/datastore.py, line 151, in Put
req.entity_list().extend([e._ToPb() for e in entities])
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/api/datastore.py, line 483, in _ToPb
properties = datastore_types.ToPropertyPb(name, values)
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/api/datastore_types.py, line 1244, in ToPropertyPb
pbvalue = pack_prop(name, v, pb.mutable_value())
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/api/datastore_types.py, line 1129, in PackUser
pbvalue.mutable_uservalue().set_email(value.email().encode
('utf-8'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf6 in position
1: ordinal not in range(128)



On Oct 20, 10:13 pm, Dan Sanderson [EMAIL PROTECTED] wrote:
 What errors are you getting?
 -- Dan

 On Mon, Oct 20, 2008 at 11:17 AM, [EMAIL PROTECTED] 

 [EMAIL PROTECTED] wrote:

  Running Python Launcher Version 2.5.1  Google App Engine SDK release:
  1.1.5
  on Mac OS X Version 10.4.11

  First time user, so far the tutorial is easy to follow. I get to
  Using Datastore Edit the Guestbook handler to appear similar to the
  following... and now my application will not run error-free. I simply
  copied and pasted the code found here:
 http://code.google.com/appengine/docs/gettingstarted/usingdatastore.html

  Up till this point I receive errors when refreshinghttp://localhost:8080/
  in my safari browser.

  This is the code I am running:-

  from google.appengine.ext import db
  import cgi

  from google.appengine.api import users
  from google.appengine.ext import webapp
  from google.appengine.ext.webapp.util import run_wsgi_app

  class MainPage(webapp.RequestHandler):
   def get(self):
     self.response.out.write(
       html
         body
           form action=/sign method=post
             divtextarea name=content rows=3 cols=60/
  textarea/div
             divinput type=submit value=Sign Guestbook/div
           /form
         /body
       /html)

  class Guestbook(webapp.RequestHandler):
   def post(self):
     greeting = Greeting()

     if users.get_current_user():
       greeting.author = users.get_current_user()

     greeting.content = self.request.get('content')
     greeting.put()
     self.redirect('/')

  def main():
   run_wsgi_app(application)

  if __name__ == __main__:
   main()

  END--

  If i finish and Edit the MainPage handler to appear similar to the
  following... I will also run into a massive error message when
  viewing the application on Safari browser.

  This would then be the code I am runnnig: -

  from google.appengine.ext import db
  import cgi

  from google.appengine.api import users
  from google.appengine.ext import webapp
  from google.appengine.ext.webapp.util import run_wsgi_app

  class MainPage(webapp.RequestHandler):
   def get(self):
     self.response.out.write('htmlbody')

     greetings = db.GqlQuery(SELECT * FROM Greeting ORDER BY date DESC
  LIMIT 10)

     for greeting in greetings:
       if greeting.author:
         self.response.out.write('b%s/b wrote:' %
  greeting.author.nickname())
       else:
         self.response.out.write('An anonymous person wrote:')
       self.response.out.write('blockquote%s/blockquote' %
                               cgi.escape(greeting.content))

     # Write the submission form and the footer of the page
     self.response.out.write(
           form action=/sign method=post
             divtextarea name=content rows=3 cols=60/
  textarea/div
             divinput type=submit value=Sign Guestbook/div
           /form
         /body
       /html)

  class Guestbook(webapp.RequestHandler):
   def post(self):
     greeting = Greeting()

     if users.get_current_user():
       greeting.author = users.get_current_user()

     greeting.content = self.request.get('content')

[google-appengine] Re: unable to create application from costa rica because of failed SMS verfication...

2008-11-17 Thread Marzia Niccolai
Hi Jorge,

What kind of issues are you seeing with the sms_issues page?

-Marzia

On Mon, Nov 17, 2008 at 11:51 AM, jbastias [EMAIL PROTECTED] wrote:



 I'm having a problem setting up an application. If anyone could give
 me a hand in getting going I would greatly appreciate it.

 I am in Costa Rica. ICE (Instituto Costarricense de Electricidad -
 http://www.grupoice.com/), the only carrier in the country is not
 listed on your site as an accepted carrier. I tried to enter my number
 (country code 506) but the system would not accept it. I would really
 like to try out app engine. What can be done in order for me to get an
 application up and running?

 I'm posting here because the sms_issues page (http://
 appengine.google.com/waitlist/sms_issues) seems to also have issues.

 Thanks
 Jorge

 


--~--~-~--~~~---~--~~
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: Reg. HelloWorld! Tutorial: Problems Running an Error-Free Guestbook Application

2008-11-17 Thread Marzia Niccolai
What is the email address you are using when you see this stack trace?

-Marzia

On Mon, Nov 17, 2008 at 11:07 AM, foghat [EMAIL PROTECTED] wrote:


 Possibly the same error that I'm getting. See below.

 Traceback (most recent call last):
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/ext/webapp/__init__.py, line 501, in __call__
handler.post(*groups)
  File /Users/foghat/Coding/Google App Engine/helloworld/
 helloworld.py, line 46, in post
greeting.put()
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/ext/db/__init__.py, line 618, in put
return datastore.Put(self._entity)
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/api/datastore.py, line 151, in Put
req.entity_list().extend([e._ToPb() for e in entities])
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/api/datastore.py, line 483, in _ToPb
properties = datastore_types.ToPropertyPb(name, values)
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/api/datastore_types.py, line 1244, in ToPropertyPb
pbvalue = pack_prop(name, v, pb.mutable_value())
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/api/datastore_types.py, line 1129, in PackUser
pbvalue.mutable_uservalue().set_email(value.email().encode
 ('utf-8'))
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xf6 in position
 1: ordinal not in range(128)



 On Oct 20, 10:13 pm, Dan Sanderson [EMAIL PROTECTED] wrote:
  What errors are you getting?
  -- Dan
 
  On Mon, Oct 20, 2008 at 11:17 AM, [EMAIL PROTECTED] 
 
  [EMAIL PROTECTED] wrote:
 
   Running Python Launcher Version 2.5.1  Google App Engine SDK release:
   1.1.5
   on Mac OS X Version 10.4.11
 
   First time user, so far the tutorial is easy to follow. I get to
   Using Datastore Edit the Guestbook handler to appear similar to the
   following... and now my application will not run error-free. I simply
   copied and pasted the code found here:
  
 http://code.google.com/appengine/docs/gettingstarted/usingdatastore.html
 
   Up till this point I receive errors when
 refreshinghttp://localhost:8080/
   in my safari browser.
 
   This is the code I am running:-
 
   from google.appengine.ext import db
   import cgi
 
   from google.appengine.api import users
   from google.appengine.ext import webapp
   from google.appengine.ext.webapp.util import run_wsgi_app
 
   class MainPage(webapp.RequestHandler):
def get(self):
  self.response.out.write(
html
  body
form action=/sign method=post
  divtextarea name=content rows=3 cols=60/
   textarea/div
  divinput type=submit value=Sign Guestbook/div
/form
  /body
/html)
 
   class Guestbook(webapp.RequestHandler):
def post(self):
  greeting = Greeting()
 
  if users.get_current_user():
greeting.author = users.get_current_user()
 
  greeting.content = self.request.get('content')
  greeting.put()
  self.redirect('/')
 
   def main():
run_wsgi_app(application)
 
   if __name__ == __main__:
main()
 
   END--
 
   If i finish and Edit the MainPage handler to appear similar to the
   following... I will also run into a massive error message when
   viewing the application on Safari browser.
 
   This would then be the code I am runnnig: -
 
   from google.appengine.ext import db
   import cgi
 
   from google.appengine.api import users
   from google.appengine.ext import webapp
   from google.appengine.ext.webapp.util import run_wsgi_app
 
   class MainPage(webapp.RequestHandler):
def get(self):
  self.response.out.write('htmlbody')
 
  greetings = db.GqlQuery(SELECT * FROM Greeting ORDER BY date DESC
   LIMIT 10)
 
  for greeting in greetings:
if greeting.author:
  self.response.out.write('b%s/b wrote:' %
   greeting.author.nickname())
else:
  self.response.out.write('An anonymous person wrote:')
self.response.out.write('blockquote%s/blockquote' %
cgi.escape(greeting.content))
 
  # Write the submission form and the footer of the page
  self.response.out.write(
form action=/sign method=post
  divtextarea name=content rows=3 cols=60/
   textarea/div
  divinput type=submit value=Sign Guestbook/div
   

[google-appengine] Re: db.Text vs db.Blob

2008-11-17 Thread Marzia Niccolai
Hi Andy,

It's possible you could do this (though not using the code below), but it
seems like it would be easier to just use a db.Expando model?  I can't see
any advantages to consistently having the same property name use two
different types.

-Marzia

On Mon, Nov 17, 2008 at 12:56 PM, Andy Freeman [EMAIL PROTECTED] wrote:


 Since neither db.Text nor db.Blob is indexed, can we decide between
 them on an entity-specific basis?

 Specifically:

 class A(db.Model):
   a = CustomProperty()

 # where CustomProperty takes its data_type for get_value_for_datastore
 purposes from the value, not from CustomProperty's definition.

 a1 = A()
 a1.a = db.Text('hi')
 a1.put()
 a2 = A()
 a2.a = db.Blob('there')
 a2.put()

 Will the datastore have some problem with the fact that a1's a
 property db.Text while a2's a property is db.Blob?


 


--~--~-~--~~~---~--~~
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: bulkload_client.py not working

2008-11-17 Thread Marzia Niccolai
Hi,

What information is in the logs for the posts from the client?  What does
the App Engine handler look like for the data?  What does your app.yaml look
like?

-Marzia

On Sun, Nov 16, 2008 at 11:57 PM, Gampesh [EMAIL PROTECTED] wrote:


 Hi,

 I tried to upload abc.txt and abc.csv but it not uploaded it gives me
 following error.


 INFO 2008-11-17 13:16:41,967 bulkload_client.py] Starting import;
 maximum 10 entities per post
 INFO 2008-11-17 13:16:41,967 bulkload_client.py] Importing 4
 entities in 29 bytes
 ERROR2008-11-17 13:16:43,437 bulkload_client.py] An error occurred
 while importing: Received code 302: Found

 302 Moved
 The document has moved
 here.
 ERROR 2008-11-17 13:16:43,453 bulkload_client.py] Import failed

 what is wrong in this.

 


--~--~-~--~~~---~--~~
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: Error handling for requests that are too large

2008-11-17 Thread Marzia Niccolai
Hi Gijsbert,

Unfortunately, javascript doesn't allow you to have access to the client's
files to check the size, but if you used Flash, Gears, or Silverlight, you
could write a client side check on the file size.

This is a good feature request, though large file support is currently being
worked on, and is on our roadmap to release in the next few months:
http://code.google.com/appengine/docs/roadmap.html

-Marzia

On Fri, Nov 14, 2008 at 9:02 PM, Gijsbert [EMAIL PROTECTED]wrote:


 Hi,

 I have an app that allows uploading images and of course some people
 try to upload larger than 1MB images. I don't mind the limit, but the
 error Connection Interrupted
 The connection to the server was reset while the page was loading. is
 not very helpful.
 Would it be possible for the server to say that the request is too
 large?
 Or even better if the server would redirect to myapp/
 requestTooLarger.html so I could return an error page that my users
 would understand.
 I've tried adding javascript to check the file size but that is not
 possible AFAIK due to security restrictions in browsers (so painful:
 ( to figure out).
 Cheers,
 Gijsbert
 


--~--~-~--~~~---~--~~
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: Reg. HelloWorld! Tutorial: Problems Running an Error-Free Guestbook Application

2008-11-17 Thread foghat

That would be my regular Gmail address. Nothing out or the ordinary.


On Nov 17, 11:09 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
 What is the email address you are using when you see this stack trace?

 -Marzia

 On Mon, Nov 17, 2008 at 11:07 AM, foghat [EMAIL PROTECTED] wrote:

  Possibly the same error that I'm getting. See below.

  Traceback (most recent call last):
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
  GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
  google/appengine/ext/webapp/__init__.py, line 501, in __call__
     handler.post(*groups)
   File /Users/foghat/Coding/Google App Engine/helloworld/
  helloworld.py, line 46, in post
     greeting.put()
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
  GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
  google/appengine/ext/db/__init__.py, line 618, in put
     return datastore.Put(self._entity)
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
  GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
  google/appengine/api/datastore.py, line 151, in Put
     req.entity_list().extend([e._ToPb() for e in entities])
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
  GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
  google/appengine/api/datastore.py, line 483, in _ToPb
     properties = datastore_types.ToPropertyPb(name, values)
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
  GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
  google/appengine/api/datastore_types.py, line 1244, in ToPropertyPb
     pbvalue = pack_prop(name, v, pb.mutable_value())
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
  GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
  google/appengine/api/datastore_types.py, line 1129, in PackUser
     pbvalue.mutable_uservalue().set_email(value.email().encode
  ('utf-8'))
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xf6 in position
  1: ordinal not in range(128)

  On Oct 20, 10:13 pm, Dan Sanderson [EMAIL PROTECTED] wrote:
   What errors are you getting?
   -- Dan

   On Mon, Oct 20, 2008 at 11:17 AM, [EMAIL PROTECTED] 

   [EMAIL PROTECTED] wrote:

Running Python Launcher Version 2.5.1  Google App Engine SDK release:
1.1.5
on Mac OS X Version 10.4.11

First time user, so far the tutorial is easy to follow. I get to
Using Datastore Edit the Guestbook handler to appear similar to the
following... and now my application will not run error-free. I simply
copied and pasted the code found here:

 http://code.google.com/appengine/docs/gettingstarted/usingdatastore.html

Up till this point I receive errors when
  refreshinghttp://localhost:8080/
in my safari browser.

This is the code I am running:-

from google.appengine.ext import db
import cgi

from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

class MainPage(webapp.RequestHandler):
 def get(self):
   self.response.out.write(
     html
       body
         form action=/sign method=post
           divtextarea name=content rows=3 cols=60/
textarea/div
           divinput type=submit value=Sign Guestbook/div
         /form
       /body
     /html)

class Guestbook(webapp.RequestHandler):
 def post(self):
   greeting = Greeting()

   if users.get_current_user():
     greeting.author = users.get_current_user()

   greeting.content = self.request.get('content')
   greeting.put()
   self.redirect('/')

def main():
 run_wsgi_app(application)

if __name__ == __main__:
 main()

END--

If i finish and Edit the MainPage handler to appear similar to the
following... I will also run into a massive error message when
viewing the application on Safari browser.

This would then be the code I am runnnig: -

from google.appengine.ext import db
import cgi

from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

class MainPage(webapp.RequestHandler):
 def get(self):
   self.response.out.write('htmlbody')

   greetings = db.GqlQuery(SELECT * FROM Greeting ORDER BY date DESC
LIMIT 10)

   for greeting in greetings:
     if greeting.author:
       self.response.out.write('b%s/b wrote:' %
greeting.author.nickname())
     else:
       self.response.out.write('An anonymous person wrote:')
     self.response.out.write('blockquote%s/blockquote' %
                             cgi.escape(greeting.content))

   # Write the submission form and the footer of the page
 

[google-appengine] Re: Reg. HelloWorld! Tutorial: Problems Running an Error-Free Guestbook Application

2008-11-17 Thread Marzia Niccolai
Strange.  Does it work if you explicitly encode greeting.content =
self.request.get('content')?

So, try greeting.content = self.request.get('content').encode('utf-8').

-Marzia

On Mon, Nov 17, 2008 at 2:36 PM, foghat [EMAIL PROTECTED] wrote:


 That would be my regular Gmail address. Nothing out or the ordinary.


 On Nov 17, 11:09 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
  What is the email address you are using when you see this stack trace?
 
  -Marzia
 
  On Mon, Nov 17, 2008 at 11:07 AM, foghat [EMAIL PROTECTED]
 wrote:
 
   Possibly the same error that I'm getting. See below.
 
   Traceback (most recent call last):
File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
   GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
   google/appengine/ext/webapp/__init__.py, line 501, in __call__
  handler.post(*groups)
File /Users/foghat/Coding/Google App Engine/helloworld/
   helloworld.py, line 46, in post
  greeting.put()
File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
   GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
   google/appengine/ext/db/__init__.py, line 618, in put
  return datastore.Put(self._entity)
File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
   GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
   google/appengine/api/datastore.py, line 151, in Put
  req.entity_list().extend([e._ToPb() for e in entities])
File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
   GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
   google/appengine/api/datastore.py, line 483, in _ToPb
  properties = datastore_types.ToPropertyPb(name, values)
File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
   GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
   google/appengine/api/datastore_types.py, line 1244, in ToPropertyPb
  pbvalue = pack_prop(name, v, pb.mutable_value())
File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
   GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
   google/appengine/api/datastore_types.py, line 1129, in PackUser
  pbvalue.mutable_uservalue().set_email(value.email().encode
   ('utf-8'))
   UnicodeDecodeError: 'ascii' codec can't decode byte 0xf6 in position
   1: ordinal not in range(128)
 
   On Oct 20, 10:13 pm, Dan Sanderson [EMAIL PROTECTED] wrote:
What errors are you getting?
-- Dan
 
On Mon, Oct 20, 2008 at 11:17 AM, [EMAIL PROTECTED] 
 
[EMAIL PROTECTED] wrote:
 
 Running Python Launcher Version 2.5.1  Google App Engine SDK
 release:
 1.1.5
 on Mac OS X Version 10.4.11
 
 First time user, so far the tutorial is easy to follow. I get to
 Using Datastore Edit the Guestbook handler to appear similar to
 the
 following... and now my application will not run error-free. I
 simply
 copied and pasted the code found here:
 
  
 http://code.google.com/appengine/docs/gettingstarted/usingdatastore.html
 
 Up till this point I receive errors when
   refreshinghttp://localhost:8080/
 in my safari browser.
 
 This is the code I am running:-
 
 from google.appengine.ext import db
 import cgi
 
 from google.appengine.api import users
 from google.appengine.ext import webapp
 from google.appengine.ext.webapp.util import run_wsgi_app
 
 class MainPage(webapp.RequestHandler):
  def get(self):
self.response.out.write(
  html
body
  form action=/sign method=post
divtextarea name=content rows=3 cols=60/
 textarea/div
divinput type=submit value=Sign Guestbook/div
  /form
/body
  /html)
 
 class Guestbook(webapp.RequestHandler):
  def post(self):
greeting = Greeting()
 
if users.get_current_user():
  greeting.author = users.get_current_user()
 
greeting.content = self.request.get('content')
greeting.put()
self.redirect('/')
 
 def main():
  run_wsgi_app(application)
 
 if __name__ == __main__:
  main()
 
 END--
 
 If i finish and Edit the MainPage handler to appear similar to the
 following... I will also run into a massive error message when
 viewing the application on Safari browser.
 
 This would then be the code I am runnnig:
 -
 
 from google.appengine.ext import db
 import cgi
 
 from google.appengine.api import users
 from google.appengine.ext import webapp
 from google.appengine.ext.webapp.util import run_wsgi_app
 
 class MainPage(webapp.RequestHandler):
  def get(self):
self.response.out.write('htmlbody')
 
greetings = db.GqlQuery(SELECT * FROM Greeting ORDER BY date
 DESC
 LIMIT 10)
 
for greeting in greetings:
 

[google-appengine] Re: http HEAD responds with 405 in webapp framework

2008-11-17 Thread Jesse Grosjean

I've just added an issue for it here:

http://code.google.com/p/googleappengine/issues/detail?id=869

If anyone else would like this too please star the issue.
--~--~-~--~~~---~--~~
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: suddenly, a new error in Cheetah in production GAE, doesn't occur in SDK

2008-11-17 Thread Marzia Niccolai
Hi Ben,

It's certainly not our desire to introduce any changes in the App Engine
library that would break our users app, but from time to time some parts of
the apis and libraries will be modified to fix issues/enhance features.

When these fixes happen, it's always possible that this will break a certain
subset of applications who are implicitly or incorrectly assuming certain
features of the API.  Of course, we'd like to avoid this when possible, but
sometimes it's difficult to anticipate how some of these changes can affect
certain applications.

We are certainly working on finding the right balance, and hope that as we
continue development with App Engine these kind of things will happen less
often.

-Marzia

On Sun, Nov 16, 2008 at 10:20 AM, Ben Adida [EMAIL PROTECTED] wrote:


 Hi Marzia,

 Thanks for the explanation!

 I'm a little bit surprised that the production API would change on its
 own like this. This makes a production application incredibly unstable
 if the underlying GAE API can change without warning. Is there any
 plan to allow an application to freeze the API on which it relies so
 that this kind of instability doesn't occur? Or is this simply because
 GAE is in beta and when (hopefully soon) it goes production then
 this won't happen?

 -Ben

 On Nov 15, 1:07 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
  Hi Ben,
 
  The recent maintenance included some changes to db.py, including adding a
  has_key function, which seems to be causing the error with template
  rendering.
 
  The new SDK has not yet been released, but the easiest/quickest fix would
 be
  to take the google.appengine.ext.db __init__.py file from 1.1.5, rename
 it,
  and included it with your application.
 
  Just change the imports, replacing from google.appengine.ext import db
 with
  from Db import db (assuming you changed the name of __init__.py to Db.py,
  for instance).
 
  Hope this helps, sorry for the confusion!
 
  -Marzia
 
  On Fri, Nov 14, 2008 at 3:19 PM, Ben Adida [EMAIL PROTECTED] wrote:
 
   Hi Marzia,
 
   Thanks again for your help.
 
   I want to stress that this started happening with no change in code on
   my end. And it works just fine in the SDK. Was there a library change
   of any kind in GAE over the last few days?
 
   The source code for my app is entirely public. Here's the template in
   particular:
 
  http://github.com/benadida/helios/tree/master/templates/election/one..
 ..
 
   and the controller
 
  http://github.com/benadida/helios/tree/master/controllers/election.py
 
   line 395.
 
   Thanks again,
 
   -Ben
 
   On Nov 14, 3:01 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
Hi Ben,
 
It's difficult to know what this stack trace means with out an idea
 of
   what
kind of obj the has_key method belongs to.  Would it be possible to
 at
   least
provide the template that is being rendered? And a description of
 what
   one
expects to be rendered?
 
-Marzia
 
On Fri, Nov 14, 2008 at 11:51 AM, Ben Adida [EMAIL PROTECTED] wrote:
 
 Marzia,
 
 It's a little difficult to cut down the example to size, because
 *all*
 of my pages that render content from the store are giving errors.
 Here's one URL where the issue comes up:
 

 http://dev.heliosvoting.org/elections/ahBkZXYtaGVsaW9zdm90aW5ncg8LEgh.
   ..
 
 and that will give you the complete stack trace.
 
 Let me know if that helps, and thanks.
 
 -Ben
 
 On Nov 14, 9:49 am, Marzia Niccolai [EMAIL PROTECTED] wrote:
  Hi Ben,
 
  Can you provide a more complete example of the code that causes
 this
 issue?
  As well as the complete stack trace.
 
  Thanks,
  Marzia
 
  On Fri, Nov 14, 2008 at 9:40 AM, Ben Adida [EMAIL PROTECTED]
 wrote:
 
   Suddenly, I'm getting the following errors on just about every
   page:
 
   if hasattr(obj, 'has_key') and obj.has_key(key):
   TypeError: has_key() takes exactly 1 argument (2 given)
 
   This is within the Cheetah templating library, _valueForName
   function.
   I haven't modified the Cheetah code, nor have I modified my
   application at GAE in the last few days.
 
   And I can't reproduce this error in my local SDK installation.
 
   Did GAE just change some internal libraries? I don't even
   understand
   why has_key() would ever take only one argument...
 


--~--~-~--~~~---~--~~
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: getting DeadlineExceededError posting facebook from GAE

2008-11-17 Thread MattG

found the problem -- nothing to do with timeouts.  was just a problem
with how I was passing args to facebook.

On Nov 17, 1:56 pm, MattG [EMAIL PROTECTED] wrote:
 seems unlikely that posting a newsfeed to facebook would take more
 that 10 seconds.

 thx for your help.

 On Nov 17, 7:43 am, admin go2 [EMAIL PROTECTED] wrote:

  Or maybe the server response is too slow to finish in 10 seconds

  =http://go2.appspot.com

  2008/11/17 MattG [EMAIL PROTECTED]

   happens every time.

   On Nov 16, 7:41 am, admin go2 [EMAIL PROTECTED] wrote:
There is not any bug in your code.
Maybe the temporary network problem cause the urlfetch function works
incorrectly.

=http://go2.appspot.com
2008/11/16 MattG [EMAIL PROTECTED]

 any idea what I'm doing wrong?  GAE log said this operation too 18k
 msecs.  here's there error:

 DeadlineExceededError at /mybagapp/post_bag_item
 Request Method:         POST
 Request URL:    http://mybagdev.appspot.com/mybagapp/post_bag_item
 Exception Type:         DeadlineExceededError
 Exception Value:
 Exception Location:     /base/python_lib/versions/1/google/appengine/
 runtime/apiproxy.py in Wait, line 161

 Traceback (most recent call last):
 File /base/python_lib/versions/1/django/core/handlers/base.py in
 get_response
  77. response = callback(request, *callback_args, **callback_kwargs)
 File /base/data/home/apps/mybagdev/1.329321030374107277/mybag/
 views.py in post_bag_item
  193. curr_user_obj.publish_user_action(request.POST,
 bag_item.item_name)
 File /base/data/home/apps/mybagdev/1.329321030374107277/mybag/
 user.py in publish_user_action
  107. call_id = True )
 File /base/data/home/apps/mybagdev/1.329321030374107277/mybag/
 gminifb.py in call
  170. response = urlfetch.fetch(_fbUrl, payload=args,
 method=urlfetch.POST, headers = {'Content_type': 'application/
 x_www_form_urlencoded'})
 File /base/python_lib/versions/1/google/appengine/api/urlfetch.py in
 fetch
  257. apiproxy_stub_map.MakeSyncCall('urlfetch', 'Fetch', request,
 response)
 File /base/python_lib/versions/1/google/appengine/api/
 apiproxy_stub_map.py in MakeSyncCall
  46. stub.MakeSyncCall(service, call, request, response)
 File /base/python_lib/versions/1/google/appengine/runtime/
 apiproxy.py in MakeSyncCall
  245. rpc.Wait()
 File /base/python_lib/versions/1/google/appengine/runtime/
 apiproxy.py in Wait
  161. rpc_completed = _apphosting_runtime___python__apiproxy.Wait
 (self)

  DeadlineExceededError at /mybagapp/post_bag_item
--~--~-~--~~~---~--~~
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: db.Text vs db.Blob

2008-11-17 Thread Andy Freeman

Question - does GAE zip db.Blob or db.Text data when it puts it in the
datastore?  If so, there's no point in me doing so and there may not
be any point in my using binary-format pickle.

I've definined a couple of custom properties, PickleProperty and
JSONProperty, both with an instance-specific zipped storage option.
When option determines whether get_value_for_datastore for a given
instance of these properties will zip the pickle or the JSON format
data.  (For pickle, there's also the binary vs plaintext decision.)

Yes, I do need to experiment with the combinations of pickle binary
and zipping.  I expect that JSON will zip quite well.  I also need to
figure out whether zipping buys me anything.

However, assuming that zipping and/or pickle binary format is
worthwhile, there are circumstances when I'd rather not use it and
those circumstances are not amenable to expando or even different
property instances.

The most important use case is probably program development.  When I'm
comfortable with how things are working wrt a given property instance,
I'll store zipped and/or pickle-binary data in db.Blob format in the
datastore.  However, when I'm not, I'll store plaintext in db.Text
format in the datastore so I can more look at newly stored data for
said instance with the console.

Since I don't want to rebuild the datastore wrt said property
instances between comfortable and uncomfortable, I'd like the
datastore to contain data in both formats for a given property
instance.

Thanks for your help,
-andy

On Nov 17, 2:12 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
 Hi Andy,

 It's possible you could do this (though not using the code below), but it
 seems like it would be easier to just use a db.Expando model?  I can't see
 any advantages to consistently having the same property name use two
 different types.

 -Marzia



 On Mon, Nov 17, 2008 at 12:56 PM, Andy Freeman [EMAIL PROTECTED] wrote:

  Since neither db.Text nor db.Blob is indexed, can we decide between
  them on an entity-specific basis?

  Specifically:

  class A(db.Model):
    a = CustomProperty()

  # where CustomProperty takes its data_type for get_value_for_datastore
  purposes from the value, not from CustomProperty's definition.

  a1 = A()
  a1.a = db.Text('hi')
  a1.put()
  a2 = A()
  a2.a = db.Blob('there')
  a2.put()

  Will the datastore have some problem with the fact that a1's a
  property db.Text while a2's a property is db.Blob?- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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: NonAuthSubToken Error Whean using google data apis

2008-11-17 Thread Jeff S

Hi Edmar,

Is the user signed in to your app when you are seeing this error? The
gdata-python-client requires a current_user so that it knows which
user the auth token belongs to. Without knowing who the current user
is, auth tokens cannot be reused/upgraded to session tokens.

Thank you,

Jeff

On Nov 15, 6:52 am, Edmar [EMAIL PROTECTED] wrote:
 My code :

 class GdataProxy(webapp.RequestHandler):
         def get(self):
                 # Create a client class which will make HTTP requests with 
 Google
 Docs server.
                 gd_client = gdata.contacts.service.ContactsService()
                 if self.request.get(token):
                         parameters = cgi.FieldStorage()
                         authsub_token = parameters['token']
                         gd_client.auth_token = authsub_token
                         gd_client.UpgradeToSessionToken()

                 else:
                         next = 'http://contexthack.appspot.com/proxy'
                         scope = 'http://www.google.com/m8/feeds/'
                         secure = False
                         session = True
                         authSubLogin = gd_client.GenerateAuthSubURL(next, 
 scope, secure,
 session)
                         self.response.out.write('a href ='+ 
 str(authSubLogin) + 'Login/
 a'  )

 After Login app engine show this error :

 Traceback (most recent call last):
   File /base/python_lib/versions/1/google/appengine/ext/webapp/
 __init__.py, line 499, in __call__
     handler.get(*groups)
   File /base/data/home/apps/contexthack/1.329305945994141299/
 main.py, line 89, in get
     gd_client.UpgradeToSessionToken()
   File /base/data/home/apps/contexthack/1.329305945994141299/gdata/
 service.py, line 601, in UpgradeToSessionToken
     raise NonAuthSubToken
 NonAuthSubToken
--~--~-~--~~~---~--~~
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] How to Backup Datastore

2008-11-17 Thread Edward

Is there a best practice for backing up one's datastore?

Is there a way to do this on the Google site to avoid having to do
this individually?  If not, is there something in the pipeline?


--~--~-~--~~~---~--~~
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] can not register

2008-11-17 Thread Hong

Hello every one, when I try to register for Google app engine , It has
to be activated by SMS, but when I fill my phone number (from
Vietnam), like this +84 988437027 , then I said can not be send or
something wrong?

What is the problem, I have also tried +84988437027 or, 84988437027
but they all didn't work. Please help me soon!!

--~--~-~--~~~---~--~~
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: bulkload_client.py not working

2008-11-17 Thread Gampesh

My app.yaml is

handlers:
- url: /load
  script: loader.py
  login: admin
- url: /.*
  script: main.py

loader.py is

from google.appengine.ext import bulkload

class InventoryLoader(bulkload.Loader):
def __init__(self):
fields = [
(name, str),
(quantity, int)
]

bulkload.Loader.__init__(self, Inventory, fields)

if __name__ == __main__:
bulkload.main(InventoryLoader())

my inventory.csv is in the c:/ and i fire a command that is

C:\Program Files\google_appenginetools\bulkload_client.py --
filename=c:\inventory.txt --king=Inventory --url=http://
famousandspicy.appspot.com/load

after getting error i fired another command which i got from the
google search

C:\Program Files\google_appenginetools\bulkload_client.py --
filename=c:\inventory.txt --king=Inventory --url=http://
famousandspicy.appspot.com/load --cookie='ACSID=AJKiYc[...]..w51g'

but i am not lucky this time also.


please help me out

Thanks
Gampesh

On Nov 18, 3:31 am, Marzia Niccolai [EMAIL PROTECTED] wrote:
 Hi,

 What information is in the logs for the posts from the client?  What does
 the App Engine handler look like for the data?  What does your app.yaml look
 like?

 -Marzia

 On Sun, Nov 16, 2008 at 11:57 PM, Gampesh [EMAIL PROTECTED] wrote:

  Hi,

  I tried to upload abc.txt and abc.csv but it not uploaded it gives me
  following error.

  INFO 2008-11-17 13:16:41,967 bulkload_client.py] Starting import;
  maximum 10 entities per post
  INFO 2008-11-17 13:16:41,967 bulkload_client.py] Importing 4
  entities in 29 bytes
  ERROR2008-11-17 13:16:43,437 bulkload_client.py] An error occurred
  while importing: Received code 302: Found

  302 Moved
  The document has moved
  here.
  ERROR 2008-11-17 13:16:43,453 bulkload_client.py] Import failed

  what is wrong in this.
--~--~-~--~~~---~--~~
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: How to Backup Datastore

2008-11-17 Thread Alexander Kojevnikov

 Is there a best practice for backing up one's datastore?

 Is there a way to do this on the Google site to avoid having to do
 this individually?  If not, is there something in the pipeline?

Datastore backup is on the short-term roadmap:
http://code.google.com/appengine/docs/roadmap.html

See comments in this issue for workarounds:
http://code.google.com/p/googleappengine/issues/detail?id=59


--~--~-~--~~~---~--~~
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: can not register

2008-11-17 Thread Alexander Kojevnikov

Community FAQ:
http://knol.google.com/k/marce/app-engine-community-faqs/

On Nov 18, 2:17 pm, Hong [EMAIL PROTECTED] wrote:
 Hello every one, when I try to register for Google app engine , It has
 to be activated by SMS, but when I fill my phone number (from
 Vietnam), like this +84 988437027 , then I said can not be send or
 something wrong?

 What is the problem, I have also tried +84988437027 or, 84988437027
 but they all didn't work. Please help me soon!!
--~--~-~--~~~---~--~~
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: can not register

2008-11-17 Thread pr3d4t0r

On Nov 17, 7:17 pm, Hong [EMAIL PROTECTED] wrote:
 Hello every one, when I try to register for Google app engine , It has
 to be activated by SMS, but when I fill my phone number (from
 Vietnam), like this +84 988437027 , then I said can not be send or
 something wrong?

 What is the problem, I have also tried +84988437027 or, 84988437027
 but they all didn't work. Please help me soon!!

Hong,

Google doesn't list Vietnamese mobile carriers for SMS authentication;
that's the reason why you didn't receive the verification message.

The pages for reporting issues aren't working very well either.  They
throw you back to the App Engine admin console login page.

Maybe someone from Google will see this and recommend alternative
actions, or configure their systems for your carrier.

Cheers,

pr3d4t0r
http://istheserverup.com
http://teslatestament.com

--~--~-~--~~~---~--~~
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] Collection of suggestions and Polls on them Options

2008-11-17 Thread probash.jibon

Hi,

I am planning a reunion for my school friends. I would like to post
something like this in my blog:
Suggest a date:
???
Suggest a place:
???
I want my friend to come to blog and suggest new date/place and vote
on the existing suggested dates/places.


Any idea on how to implement this.


Probash Jibon
http://probashjibon114.blogspot.com/



--~--~-~--~~~---~--~~
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] index status building since days

2008-11-17 Thread dobee

i have an index that is on status building since about a week, i
don't need it anymore, but vacuum says that the index is already
deleted:

Deleting selected index definitions.
2008-11-18 07:12:46,146 WARNING appcfg.py:892 An index was not
deleted.  Most likely this is because it no longer exists.

my import script, which works on the entity-level is now getting
Resource temporarily unavailable, now i don't know if this is
because of the dangling index and i just have to wait, or some other
reason.


--~--~-~--~~~---~--~~
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: How can I add Timer to my GAE application?

2008-11-17 Thread Alex Cheng

I used Cron from gaeutilities and it works fine for me.

Finally I can remove a damn button from my page since the user doesn't
need to manually click it to refresh the page but Cron will do it in
the background.

That's really cool!

On Nov 18, 4:20 am, Maciej Pietrzak [EMAIL PROTECTED] wrote:
 On 17 Lis, 16:09, A.TNG [EMAIL PROTECTED] wrote:

  On Mon, Nov 17, 2008 at 11:48 AM, Alex Cheng [EMAIL PROTECTED] wrote:

   I want to add a timer to my GAE application, so I can execute certain
   logic at given interval. I tried python's Timer object (http://
  www.python.org/doc/2.5.2/lib/timer-objects.html), but it doesn't seem
   to work properly.

  If you want cron jobs, you may try 
  thishttp://code.google.com/p/gaeutilities/wiki/Cron.
  Good luck. :-)

 Or you can try myhttp://schedulerservice.appspot.com/

 Main difference is that gaeutilities Cron runs inside your own app
 inside requests initiated by regular (human) clients. Cron tasks will
 not fire if there are no viewers, but generally every useful site has
 at least some page views per day, so that shouldn't be a big problem.

 On the other hand, Scheduler Service uses agents that call your url
 from external hosts, so the whole thing doesn't depend on human
 guests. But those external agents run on my servers, not Google's
 ones, so if I were you I woudn't expect them to be that reliable
 (altough me being me - I do expect them do be reliable, because I
 simply trust myself ;). Also, with gaeutilities you can define any
 number of tasks that will execute as often as you like as long as
 there are human-initiated page views on your site. Scheduler Service
 let's you define only a few schedulers that run at most 1 time per
 hour.

 Maybe the best thing would be to mix two technologies in new sites,
 that is - run Cron tasks from both human and schedulerservice urls and
 after your site (hopefully) gets some audience, drop schedulerservice
 part?

 Hope that helps.

 Regards
 Maciej
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---