[google-appengine] Unexpected timeouts

2008-10-14 Thread Roy Leban

This might be bug 764 (http://code.google.com/p/googleappengine/issues/
detail?id=764) but I'm not sure.

Sometimes, I get timeouts that don't make sense. For example,
refreshing my home page (sometimes, when it happens to include a
single database write).

0-13 05:58PM 18.196 / 500 4180ms 10883mcycles 5kb

  File myfile.py ...
some_entity.put()
  File /base/python_lib/versions/1/google/appengine/ext/db/
__init__.py, line 618, in put
return datastore.Put(self._entity)
  File /base/python_lib/versions/1/google/appengine/api/
datastore.py, line 162, in Put
raise _ToDatastoreError(err)
  File /base/python_lib/versions/1/google/appengine/api/
datastore.py, line 1627, in _ToDatastoreError
raise errors[err.application_error](err.error_detail)
Timeout

It's looking like the 10883 megacycles is 20-50x a typical load of my
home page. Anybody have any ideas?

--~--~-~--~~~---~--~~
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: Why my website is speeder using www. than without ?!?

2008-10-14 Thread manatlan

thanks a lot barry, it's a lot clearer ...
Gret, I'm not mad, this trouble is recent, since naked domain aren't
supported.
Thanks a lot ...

On Oct 14, 12:10 am, Barry Hunter [EMAIL PROTECTED]
wrote:
 Google have decided they can no longer support 'naked' domains, ie
 without a www - mainly becuase naked domains cant work well with cname
 records. And the technology they used to work around that limitation
 itself has issues.

 http://code.google.com/appengine/kb/commontasks.html#naked_domain

 ... so work at 'hosting' the naked domain elsewhere, and have it
 simply redirect to the www record.



 On Mon, Oct 13, 2008 at 9:34 PM, manatlan [EMAIL PROTECTED] wrote:

  I don't understand well (and it's like that since the beginning, and
  that trouble was not here)
  how can i correct this ?

  On 13 oct, 20:58, yejun [EMAIL PROTECTED] wrote:
  That's because manatlan.com is mapped only 2 static ips,www.manatlan.com
  is mapped to entire ghs google servers.

  On Oct 13, 2:44 pm, manatlan [EMAIL PROTECTED] wrote:

   Since some times, my website seems really down ...
   when i usehttp://manatlan.com... it can make 5 minutes to response.
   and when i usehttp://www.manatlan.com:it'sin a fraction of seconds
   (good way).

   This trouble is since one or two months. I can't find the trouble.
   I've got a gae id, which is hosted in a google app domain with 2
   urls :http://manatlan.comandwww.manatlan.com(dnshostedby google)

   In the past, all was good ! But since some times : it's really hard !
   Sometimes manatlan.com is really speed, sometimes not. WHere is the
   trouble ? dns ?

 --
 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 'UnicodeDecodeError'. Please help

2008-10-14 Thread yejun

iso8859-1 should be able to decode any char, but I guess there's a bug
in code which caused implicit unicode conversion.

On Oct 14, 12:44 am, Nishu [EMAIL PROTECTED] wrote:
 Hello,

 I am trying to develop a screen scraping application using the google
 Webapp framework. The application parses the html output of some other
 page to extract the required data and then forms a string out of these
 data. Sometimes the application works well but at times the
 application raises the following error:

         UnicodeDecodeError: 'ascii' codec can't decode byte 0x95 in
 position 100: ordinal not in range(128)

 After googling around for some time I tried the following:

         sys.setdefaultencoding(UTF-8)

 As a result the default encoding was set to 'UTF-8' but even this did
 not solve the problem and now the application raised the following
 error:

        UnicodeDecodeError: 'utf8' codec can't decode byte..

 So please help me solve this problem. Thanking you in advance.

 Nishant
--~--~-~--~~~---~--~~
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 'UnicodeDecodeError'. Please help

2008-10-14 Thread Nishu

Thanks for replying

Actually the html data that I am parsing is being rendered with UTF-8
encoding so I tried setting the default encoding as UTF-8. Just for
your information I would like to tell you that I am trying to parse
google's search results which is rendered with UTF-8 encoding. Is
there any other way to get google's search result instead of parsing
the HTML, some API which can be used with Python.

Your reply is highly appreciated but I will be thankful to you if you
can send me some code snippet or link to some other sources where I
can get more clear solution to my original problem.

Thanks
Nishant

On Oct 14, 12:13 pm, yejun [EMAIL PROTECTED] wrote:
 iso8859-1 should be able to decode any char, but I guess there's a bug
 in code which caused implicit unicode conversion.

 On Oct 14, 12:44 am, Nishu [EMAIL PROTECTED] wrote:

  Hello,

  I am trying to develop a screen scraping application using the google
  Webapp framework. The application parses the html output of some other
  page to extract the required data and then forms a string out of these
  data. Sometimes the application works well but at times the
  application raises the following error:

  UnicodeDecodeError: 'ascii' codec can't decode byte 0x95 in
  position 100: ordinal not in range(128)

  After googling around for some time I tried the following:

  sys.setdefaultencoding(UTF-8)

  As a result the default encoding was set to 'UTF-8' but even this did
  not solve the problem and now the application raised the following
  error:

 UnicodeDecodeError: 'utf8' codec can't decode byte..

  So please help me solve this problem. Thanking you in advance.

  Nishant
--~--~-~--~~~---~--~~
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: Unexpected timeouts

2008-10-14 Thread Josh Heitzman

Timeouts can happen on even the simplest of datastore operations.  As
I understand it when a timeout does occur on a transaction (including
a single put as there is a transaction there underneath) there is a
lot of extra processing due to retry attempts.

On Oct 13, 11:40 pm, Roy Leban [EMAIL PROTECTED] wrote:
 This might be bug 764 (http://code.google.com/p/googleappengine/issues/
 detail?id=764) but I'm not sure.

 Sometimes, I get timeouts that don't make sense. For example,
 refreshing my home page (sometimes, when it happens to include a
 single database write).

 0-13 05:58PM 18.196 / 500 4180ms 10883mcycles 5kb
 
   File myfile.py ...
 some_entity.put()
   File /base/python_lib/versions/1/google/appengine/ext/db/
 __init__.py, line 618, in put
 return datastore.Put(self._entity)
   File /base/python_lib/versions/1/google/appengine/api/
 datastore.py, line 162, in Put
 raise _ToDatastoreError(err)
   File /base/python_lib/versions/1/google/appengine/api/
 datastore.py, line 1627, in _ToDatastoreError
 raise errors[err.application_error](err.error_detail)
 Timeout

 It's looking like the 10883 megacycles is 20-50x a typical load of my
 home page. Anybody have any ideas?
--~--~-~--~~~---~--~~
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 embedd an image or html code while sending email in appengine ?

2008-10-14 Thread NiceGuy

Thanks a lot i got it.. ;-)
--~--~-~--~~~---~--~~
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: Why my website is speeder using www. than without ?!?

2008-10-14 Thread manatlan

Ok ... I had changed my dns hosting (enom) ...
@ make a url redirect to http://www.manatlan.com
and in Gapps, it handle only www.manatlan.com (not the naked domain
anymore)

It seems it works better ... (access to manatlan.com or www.manatlan.com
are speeder now)

so, when i try to go to http://manatlan.com ... browser redirect me to
http://www.manatlan.com

but I couldn't explain, why my test http://www.manatlan.com/test/ ,
which make a simple redirect to /, try to bring me to HTTPS://www.manatlan.com
(notice the https) ... in the real life, it should redirect to
http://www.manatlan.com/ !!! wtf ?


On 14 oct, 00:10, Barry Hunter [EMAIL PROTECTED] wrote:
 Google have decided they can no longer support 'naked' domains, ie
 without a www - mainly becuase naked domains cant work well with cname
 records. And the technology they used to work around that limitation
 itself has issues.

 http://code.google.com/appengine/kb/commontasks.html#naked_domain

 ... so work at 'hosting' the naked domain elsewhere, and have it
 simply redirect to the www record.



 On Mon, Oct 13, 2008 at 9:34 PM, manatlan [EMAIL PROTECTED] wrote:

  I don't understand well (and it's like that since the beginning, and
  that trouble was not here)
  how can i correct this ?

  On 13 oct, 20:58, yejun [EMAIL PROTECTED] wrote:
  That's because manatlan.com is mapped only 2 static ips,www.manatlan.com
  is mapped to entire ghs google servers.

  On Oct 13, 2:44 pm, manatlan [EMAIL PROTECTED] wrote:

   Since some times, my website seems really down ...
   when i usehttp://manatlan.com... it can make 5 minutes to response.
   and when i usehttp://www.manatlan.com:it'sin a fraction of seconds
   (good way).

   This trouble is since one or two months. I can't find the trouble.
   I've got a gae id, which is hosted in a google app domain with 2
   urls :http://manatlan.comandwww.manatlan.com(dnshostedby google)

   In the past, all was good ! But since some times : it's really hard !
   Sometimes manatlan.com is really speed, sometimes not. WHere is the
   trouble ? dns ?

 --
 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: ModelChoiceField

2008-10-14 Thread [EMAIL PROTECTED]

I just created my own ModelMultipleChoiceField class by copying and
pasting and changing up some stuff in the ModelChoiceField.

On Oct 13, 3:42 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 So below I have a snippet of my model form code. I was wondering does
 anyone know the correct format for the choices attribute of the
 ModelChoiceField class.

 channel =
 djangoforms.ModelChoiceField(Channel,query=Channel.all().filter('publish_status
 = ',True).filter('user =
 ',users.get_current_user()),choices=(Channel.title,Channel.title),widget=djangoforms.forms.SelectMultiple)

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



[google-appengine] Re: Downloading my application

2008-10-14 Thread Arun Shanker Prasad



On Oct 14, 5:05 pm, David Symonds [EMAIL PROTECTED] wrote:
 2008/10/14 Arun Shanker Prasad [EMAIL PROTECTED]:

  Definitely and an IMPORTANT one
  None of us want to loose our code..

 If you don't want to lose your code, make your own arrangements. Use
 source control, such as what Google provides 
 viahttp://code.google.com/hosting. The problem of losing your code has
 been solved in many ways over prior decades!

 Dave.

I know of svn and cvs to version the code..
for any php or similar scripting site, we all have the last resort to
actually get the code the webserver, since google app engine is also a
scripting site, and dont have the constraints of java class file there
can be some way to get the code we uploaded to the server
--~--~-~--~~~---~--~~
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: consistent order when sorting on values that are the same?

2008-10-14 Thread David Wilson (entertainment cloud)

as a note, its fine if it is 3,2,4. as long as its always 3,2,4.



On Oct 14, 3:00 pm, David Wilson (entertainment cloud)
[EMAIL PROTECTED] wrote:
 Another day, another question:

 Are fetch results returned in a consistent order when sorting on
 values that are the same.

 ie

 if my models have id 1..4 and values 1,2,2,3 and I perform a filtered
 fetch of value = 2. Will the models always be returned in the order
 id 2,3,4?

 im going to hit a problem if it undefined and could be 3,2,4.

 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] Possible to subclass User?

2008-10-14 Thread Alex Vartan

Apologies if this is a simple question, I'm still a python / GAE
novice. Is it possible to subclass the User class? I have just a
couple of extra properties and I'd like to store with User and rather
not create a duplicated UserOfMyApp class that includes a user as a
property if I can just subclass the User class itself.

What's the best solution if I just want to store a reference to
another model and a few integerproperties with a user?

Regards,
Alex
--~--~-~--~~~---~--~~
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: Modeling mutual references

2008-10-14 Thread Dado

I am having the same problem when defining a join model between two
models... because they depend on each other, but in my case is a
problem related to how Python imports classes (I am using import
to pull in models definitions that are in different files). Does the
code that you posted all reside in one file? Regardless, Python (I
think, but don't trust me on that) loads class and module definitions
as it reads (or import) the file, which means that when it first
encounters Book (with a Page ref in it) it doesn't know what Page is.
I haven't yet found a solution to this... please let me know if you
do.


On Oct 10, 1:06 pm, Andy Freeman [EMAIL PROTECTED] wrote:
 Yes, but then the db.ReferenceProperty won't verify that it's being
 pointed to the right kind of thing.

 On Oct 9, 4:40 pm, yejun [EMAIL PROTECTED] wrote:

  You don't have to give class for ReferenceProperty.
  first = db.ReferenceProperty()

  On Oct 9, 6:53 pm, acuth [EMAIL PROTECTED] wrote:

   Is it possible to have two models reference each other? I can't get
   this to work and haven't been able to find this limitation in the
   documentation. As a simple example, consider:

   class Book(db.Model):
           title = db.StringProperty()
           first = db.ReferenceProperty(Page)

   class Page(db.Model):
           text = db.TextProperty()
           next = db.SelfReferenceProperty()
           book = db.ReferenceProperty(Book)

   which generates NameError: name 'Page' is not defined when
   processing the Book class definition. Is this really a limitation of
   the underlying data store or is it more related to how models are
   defined in Python?

   I'm guessing the solution is to record the 'first page in book'
   information as a separate class, for example:

   class FirstPage(db.Model):
           book = db.ReferenceProperty(Book)
           first = db.ReferenceProperty(Page)

   any pointers would be gratefully received, Adrian- 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] ghs google servers.down ?

2008-10-14 Thread poke

c:\ping www.bitpoll.net

Pinging ghs.l.google.com [64.233.179.121] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

c:\ping ghs.l.google.com

Pinging ghs.l.google.com [64.233.179.121] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.



--~--~-~--~~~---~--~~
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 access Google Cache?

2008-10-14 Thread Vacilando

Hi,

In an application I build I sometimes need to check on a page, but it
is enough for me (and presumably much faster) if I could read its
latest copy from Google Cache.

Is there a way to fetcha page from Google Cache programmatically?

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] I can get SMS while I create new application

2008-10-14 Thread xiaoxiwu

I'm a user of China mobile, so I can't receive verification code,
could you help me to get the verification code please?

--~--~-~--~~~---~--~~
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] App Engi neでのファイル取込み

2008-10-14 Thread kns001

 App Engine にて、不明点がありますので投稿させて頂きました。

 【不明点】
  App Engineを使用した外部ファイルの取込と取出が可能でしょうか?

 例:Aさんが、App Engineにて作成したAPPを使用して自端末上のファイル
  (テキスト、word、excel、pdf等)をAppEngineサーバ(DataStoreAPI等を使用)に取り込む。
  続いてBさんが、同APPを使用してそのファイルを取り出して自端末にダウンロードし閲覧する。

 また、例のようなDataStoreAPIでGoogleサーバに取り込まなくても他に可能な
 代替案などがあればご教授いただきたいと思います。

 どうぞよろしくお願いいたします。

--~--~-~--~~~---~--~~
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] django template UnicodeDecodeError on gae.

2008-10-14 Thread kitly

different between django version 0.96/1.0 in file /django/template/
__init__.py

django 0.96 in gae, start line number: 700

class NodeList(list):
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bits.append(self.render_node(node, context))
else:
bits.append(node)
return ''.join(bits)


django 1.0, start line number: 759

class NodeList(list):
# Set to True the first time a non-TextNode is inserted by
# extend_nodelist().
contains_nontext = False

def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bits.append(self.render_node(node, context))
else:
bits.append(node)
return mark_safe(''.join([force_unicode(b) for b in bits]))

is that to say: current gae version django template doesnt support
Unicode .

--~--~-~--~~~---~--~~
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] YAML, mappings and handlers.

2008-10-14 Thread JFQueralt

Hi, everyone.

I am not sure this question has been raised in the past but I searched
a little bit and could not find any topic covering this doubt I am
having. Also, I am a newbie on this technologies so maybe my question
is kind of obvious.

- YAML allows us to map URL patterns to modules in written in Python.
- Inside a module, I can map an URL to a handler.

This basically means to me that I have 2 options to handle the
following common scenario:

Root
-Folder A
-File 1
-File 2
-File 3
-File 4
-File 5

-Folder B
-File 1
-File 2
-File 3

First option:
- YAML can map the whole folder A to a module and inside the module I
further discriminate the right handler to each File.

Second option:
- YAML maps directly a separate module per each File (which therefore
contains only one handler for that particular File).

My doubt concerns performance, stability and the like.
While I don´t mind coding more modules, I am not sure what´s more
performant.
From a discrimination level, it does not seem to make any difference
to me (do it at YAML level or module level... it´s basically the same)
but then other aspects might be considered.

Any ideas?

Cheers.

Jean

--~--~-~--~~~---~--~~
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: consistent order when sorting on values that are the same?

2008-10-14 Thread Barry Hunter

Possibly best just to try it!

But from
http://code.google.com/appengine/docs/datastore/queriesandindexes.html

* In the case of a tie, the key of the entity is used as the tie-breaker.

... its talking about list fields - but the same code is probably used
for sort order of non-lists.


On Tue, Oct 14, 2008 at 3:05 PM, David Wilson (entertainment cloud)
[EMAIL PROTECTED] wrote:

 as a note, its fine if it is 3,2,4. as long as its always 3,2,4.



 On Oct 14, 3:00 pm, David Wilson (entertainment cloud)
 [EMAIL PROTECTED] wrote:
 Another day, another question:

 Are fetch results returned in a consistent order when sorting on
 values that are the same.

 ie

 if my models have id 1..4 and values 1,2,2,3 and I perform a filtered
 fetch of value = 2. Will the models always be returned in the order
 id 2,3,4?

 im going to hit a problem if it undefined and could be 3,2,4.

 thanks.
 




-- 
Barry

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

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



[google-appengine] Re: Can Google please stop marking Google App Engine mail as spam?

2008-10-14 Thread Barry Hunter

I'm not quite sure I understand, are you suggesting that Postini
should whitelist all AppEngine emails?

That sounds bad, would make appengine an attractive target for
spammers. It's true at the moment the technical hurdles make it
unattractive, but a default whitelist would make it very much less so.



On Tue, Oct 14, 2008 at 9:59 AM, Aral Balkan [EMAIL PROTECTED] wrote:

 I'm trying to communicate with my speakers and attendees and having a
 _terrible time_ of it because the email is being marked as spam by...
 wait for it... none other than Google.

 One of my speakers just sent me this:

 [Email from your app] is getting blocked by Google's Postini service
 by default. Postini is the Google for Domains spam/archive service.
 Thought you might have been trying to reach me re the conference so
 just unblocked the domain for myself.

 Can someone please look into this.

 Having Google App Engine email blacklisted by Google is making my life
 very difficult indeed.

 Thanks,
 Aral


 




-- 
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] How can I get a GAE Account?

2008-10-14 Thread [EMAIL PROTECTED]

My country is not in the Supported mobile providers list, but how can
I get the Google App Engine Account?
--~--~-~--~~~---~--~~
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 Google please stop marking Google App Engine mail as spam?

2008-10-14 Thread Aral Balkan

No, I'm saying it shouldn't blacklist them by default.

Aral

On Oct 14, 7:18 pm, Barry Hunter [EMAIL PROTECTED]
wrote:
 I'm not quite sure I understand, are you suggesting that Postini
 should whitelist all AppEngine emails?

 That sounds bad, would make appengine an attractive target for
 spammers. It's true at the moment the technical hurdles make it
 unattractive, but a default whitelist would make it very much less so.
snip
--~--~-~--~~~---~--~~
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 access Google Cache?

2008-10-14 Thread Sylvain

And what about memcache ?
http://code.google.com/appengine/docs/memcache/

On 14 oct, 17:14, Vacilando [EMAIL PROTECTED] wrote:
 Hi,

 In an application I build I sometimes need to check on a page, but it
 is enough for me (and presumably much faster) if I could read its
 latest copy from Google Cache.

 Is there a way to fetcha page from Google Cache programmatically?

 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: No response?

2008-10-14 Thread Mahmoud

You should add some logging to your application. It will make it
easier to see what is going awry:
http://code.google.com/appengine/docs/python/logging.html

On Oct 13, 6:16 am, sternr [EMAIL PROTECTED] wrote:
 I've just uploaded my first application, and no matter what request I
 try, I get error 500,
 And in the request log (the error log is empty) I get:

 MY.IP.ADDRESS - - [13/10/2008:03:14:30 -0700] GET / HTTP/1.1 0 0 - -

 What is http code 0? why am I getting it?

 HELP?!

 --sternr
--~--~-~--~~~---~--~~
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: Members: 4994

2008-10-14 Thread Davide Rognoni

Members: 5005 :-D

On Oct 13, 9:48 pm, Davide Rognoni [EMAIL PROTECTED] wrote:
 - 5
 - 4
 - 3
 - 2
 - 1
 5000 :-)
--~--~-~--~~~---~--~~
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] Newbie question - Request params available to def post(self)

2008-10-14 Thread Alex Vartan

Let's say I redirect a user to the url:

myapp.com/stuff?favorites=oatmealraisinbran

I generate the page with a def get(self) method in the Stuff
RequestHandler class and use self.request.get('favorites').

Then there is a form on the same page (/stuff) which processes some
additional input ('morestuff') and supplies me with a few other pieces
of data via post. When I process this using a def post(self) in Stuff,
I use self.request.get('morestuff').

But can I also access the original 'favorites' in the post method? I
can't find any documentation about this but perhaps it's because it's
just obvious. I guess the question is does the self.request object get
cleared after get(self) finishes generating the page, or are the
original query params still available to me when I call
self.request.get in the subsequent post method (is the dictionary of
key value pairs in the request object replaced, or augmented by post
data?)

Thanks much,
Alex
--~--~-~--~~~---~--~~
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: Downloading my application

2008-10-14 Thread Arun Shanker Prasad



On Oct 14, 7:49 am, Peter Recore [EMAIL PROTECTED] wrote:
  I know of svn and cvs to version the code..
  for any php or similar scripting site, we all have the last resort to
  actually get the code the webserver, since google app engine is also a
  scripting site, and dont have the constraints of java class file there
  can be some way to get the code we uploaded to the server

 If you're already using source control, you can just tag or label your
 code every time you upload a new version to app engine.  That way you
 can always recover whatever version you want.  You should probably be
 doing this anyway.  If you are relying on the fact that you can
 download your php code from a production server if your laptop
 explodes, you probably need to rethink your development environment.
 I would rather not have the GAE team devote their efforts to fixing a
 problem that can be solved on the user end, when there are lots of
 problems that can *only* be fixed on the server end.

I am not suggesting that the gae team spend a lot of time developing
this feature,
if I am able to get the code of diff versions in the dev console then
some of the modifications can be done on the move whn i am not at my
dev machine..
if anyone does not want such a feature then its up to u.. this group
is also supposed to a sounding board for ideas..
see the title of the discussion b4 blurting out something, this post
was abt downloading the source
if u are having issues on the server side, i suggest starting up a new
post or thread
--~--~-~--~~~---~--~~
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: decision to be an API and not a protocol...

2008-10-14 Thread Aral

I hope that Google will move on to the challenge of handling other
languages once it has managed to implement Google App Engine properly
in Python first.

Aral

On Oct 13, 6:00 pm, Peter Recore [EMAIL PROTECTED] wrote:
 App engine to me is a hosting environmnt first, and an API second.
 The API alone is no big deal. In fact, it has some annoying
 limitations that many other api's don't. (I'm not complaining here)
 App engine's killer feature is the fact that it is hosted within
 google's infrastructure, with the ability to scale up by adding lots
 of instances of your app automagically.
snip
--~--~-~--~~~---~--~~
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: bulkloadclient

2008-10-14 Thread Marzia Niccolai
This seems like there might be an issue with the handler mapping for your
application, it probably can't find the correct Python class to send the
request.

Make sure you have correctly mapped /raceload in your app.yaml and in your
script's application handler.

-Marzia

On Tue, Oct 14, 2008 at 1:55 AM, Sterny [EMAIL PROTECTED] wrote:


 I'm having problems uploading data to previously loaded tables.
 I get the following error.
 I'm on windows xp some tables load ok. All load up ok on my localhost.

 Any ideas?

 I get the following error.:

 C:\Google_appspython C:\Program Files\Google\google_appengine\tools
 \bulkload_client.py
 --filename C:\Google_apps\data\Race.csv --kind Race  --url
 http://myrunningdata.appspot.com/raceload
 INFO 2008-10-14 08:21:56,700 bulkload_client.py] Starting import;
 maximum 10 entities per post
 INFO 2008-10-14 08:21:56,700 bulkload_client.py] Importing 4
 entities in 185 bytes
 ERROR2008-10-14 08:21:57,460 bulkload_client.py] An error occurred
 while importing: Received code 500: Internal Server Error

 htmlhead
 meta http-equiv=content-type content=text/html;charset=utf-8
 title500 Server Error/title
 /head
 body text=#00 bgcolor=#ff
 h1Error: Server Error/h1
 h2The server encountered an error and could not complete your
 request.
 pIf the problem persists, please A HREF=http://www.google.com/
 support/ http://www.google.com/support/report/A y
 our problem and mention this error message and the query that caused
 it./h2
 h2/h2
 /body/html

 


--~--~-~--~~~---~--~~
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 'UnicodeDecodeError'. Please help

2008-10-14 Thread kang
a.decode('utf8','ignore')

On Tue, Oct 14, 2008 at 12:44 PM, Nishu [EMAIL PROTECTED] wrote:


 Hello,

 I am trying to develop a screen scraping application using the google
 Webapp framework. The application parses the html output of some other
 page to extract the required data and then forms a string out of these
 data. Sometimes the application works well but at times the
 application raises the following error:

UnicodeDecodeError: 'ascii' codec can't decode byte 0x95 in
 position 100: ordinal not in range(128)

 After googling around for some time I tried the following:

sys.setdefaultencoding(UTF-8)

 As a result the default encoding was set to 'UTF-8' but even this did
 not solve the problem and now the application raised the following
 error:

   UnicodeDecodeError: 'utf8' codec can't decode byte..

 So please help me solve this problem. Thanking you in advance.

 Nishant

 



-- 
Stay hungry,Stay foolish.

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



[google-appengine] Re: Downloading my application

2008-10-14 Thread David Symonds

2008/10/14 Arun Shanker Prasad [EMAIL PROTECTED]:

 Definitely and an IMPORTANT one
 None of us want to loose our code..

If you don't want to lose your code, make your own arrangements. Use
source control, such as what Google provides via
http://code.google.com/hosting. The problem of losing your code has
been solved in many ways over prior decades!


Dave.

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



[google-appengine] Re: consistent order when sorting on values that are the same?

2008-10-14 Thread Marzia Niccolai
I can confirm that it is the key that is used.

-Marzia

On Tue, Oct 14, 2008 at 12:45 PM, David Wilson (entertainment cloud) 
[EMAIL PROTECTED] wrote:



 ok, thanks, I read that, but wasnt sure.

 testing will be the way forward :)



 On Oct 14, 7:11 pm, Barry Hunter [EMAIL PROTECTED]
 wrote:
  Possibly best just to try it!
 
  But fromhttp://
 code.google.com/appengine/docs/datastore/queriesandindexes.html
 
  * In the case of a tie, the key of the entity is used as the tie-breaker.
 
  ... its talking about list fields - but the same code is probably used
  for sort order of non-lists.
 
  On Tue, Oct 14, 2008 at 3:05 PM, David Wilson (entertainment cloud)
 
 
 
  [EMAIL PROTECTED] wrote:
 
   as a note, its fine if it is 3,2,4. as long as its always 3,2,4.
 
   On Oct 14, 3:00 pm, David Wilson (entertainment cloud)
   [EMAIL PROTECTED] wrote:
   Another day, another question:
 
   Are fetch results returned in a consistent order when sorting on
   values that are the same.
 
   ie
 
   if my models have id 1..4 and values 1,2,2,3 and I perform a filtered
   fetch of value = 2. Will the models always be returned in the order
   id 2,3,4?
 
   im going to hit a problem if it undefined and could be 3,2,4.
 
   thanks.
 
  --
  Barry
 
  -www.nearby.org.uk-www.geograph.org.uk-
 


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



[google-appengine] Re: Newbie question - save geocode to the Datastore

2008-10-14 Thread Yang

Hi,

Right, I think I got that far. But when I try to add it to data store,
I get the following error  GeoPtProperty is supposed to take GeoPt
data type, which is geographical point represented by floating-point
latitude and longitude coordinates. But it doesn't say whether it
needs to be a list or tuples...  Any help would be much appreciated.
Thank you in advance!

File C:\Program Files\Google\google_appengine\google\appengine\api
\datastore_types.py, line 596, in __init__
(lat, typename(lat), lon, typename(lon)))
BadValueError: Expected floats for lat and long; received
(37.3096785453849 (a unicode) and  (a unicode).

And in my python code looks like this...

class LocationInfo(db.Model):
geocode = db.GeoPtProperty()
equip = db.ListProperty(long)
rating = db.RatingProperty()

class AddLocation(webapp.RequestHandler):
def post(self):
loc = LocationInfo()
loc.geocode = self.request.get('latlng')
loc.put()
self.redirect('/')

And my javascript looks like this

GEvent.addListener(map, click, function(overlay, point) {

if (marker) {
map.removeOverlay(marker);
  }

var iwform =  'form action=\addDB method=post'
+ input type=\hidden\ name=\latlng\ value=+point+
+ 'label for=placeName:/labelinput id=id_place 
type=text
name=place size=15 value=/br /'
+ 'input type=submit value=Save/'
+ '/form';

var marker = new GMarker(point,{draggable:true});
map.addOverlay(marker);
map.openInfoWindowHtml(point, iwform);
}


On Oct 10, 7:57 am, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 Without getting too much into the details, you'll probably want to do
 an asynchronous (AJAX) request to your web app.  Basically, once the
 geocode request has gone through and you have the coordinates, fire
 off another request to post the coordinates and associated data to
 your AppSpot for storage.

 -B

 On Oct 9, 3:56 pm,Yang[EMAIL PROTECTED] wrote:

  Hi,

  I am sorry for such newbie question...  I would appreciate any help.

  I am trying to write a simple code which allows a user to place
  markers on a map and save them. Those saved markers would be displayed
  to everyone. There are more thing I want to do past it, but I am stuck
  at saving the markers geocode to the Datastore.  I created db class,
  and initialized instance of it, but since marking activity happens in
  javascript, I don't know how to pass the geocode information from
  javascript portion to body part of HTML code so that it could be
  saved. Also, in reverse direction, I need to pass geocodes of all
  markers in the map canvas to display them.  I am very new to the whole
  Google App Engine thing, so any help would be much much appreciated.

  Thank you,

  -Yang
--~--~-~--~~~---~--~~
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: Compare Query and GqlQuery?

2008-10-14 Thread mrchucho

If I'm not mistaken, GqlQuery simply constructs a Query behind the
scenes:

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

On Oct 14, 6:11 pm, Tom [EMAIL PROTECTED] wrote:
 Is there an article/faq that compares the use cases and tradeoffs for
 Query vs. GqlQuery?  When would one be used over the other, etc.

 Thanks!
 Tom

--~--~-~--~~~---~--~~
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] New Admin Console Release

2008-10-14 Thread Marce

Today we've released some new features in our Admin Console to make it
easier for you to manage your application.

* Admin Logs: This new feature displays a record of all actions
committed by the application's admins. Click on 'Admin Logs' under the
'Administration' section of the navigation bar. You can search for app
configuration, version management, developer administration, and
datastore changes. Just choose the desired event from the drop down
and click 'Display'!

* Regex Filtering in Logs: Looking for all requests that throw a
certain error? Want information on all requests containing specific
query arguments? Use the new regex filter on the logs page of your
admin console to search for requests that contain text matching a
given regular expression. Note: at most 10,000 log records are
searched per request; use the Next link to search further back. The
time stamp of the last record searched (not the last record matched!)
is displayed to help you decide whether to search further back. If the
end of the logs is reached, the Next link is not shown.

* Log URLs can now be bookmarked: The logs URLs in the admin console
now include an offset argument so that you can bookmark interesting
pages, and send them to other admins. This also enables usage of the
'back' button on your logs pages.

We hope these changes will make it easier for you to manage your app
and troubleshoot any issues you may have.
--~--~-~--~~~---~--~~
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: Ordering with an inequality filter

2008-10-14 Thread kang
maybe you can write GQL like:

SELECT * FROM kind
[WHERE condition [AND condition ...]]
[ORDER BY property [ASC | DESC] [, property [ASC | DESC] ...]]
[LIMIT [offset,]count]
[OFFSET offset]


On Wed, Oct 15, 2008 at 6:38 AM, mrchucho [EMAIL PROTECTED] wrote:


 Let's say I have blog and I want to fetch the top 10 posts created in
 the last 48 hours with the most comments and display them in order of
 comment count. I would expect to be able to do something like:

 Post.all().filter(created =, datetime.today() -
 timedelta(hours=48)) \
  .order(-comment_count) \
  .fetch(10)

 But this won't work because First ordering property must be the same
 as inequality filter property. Any idea how to implement something
 like this? The only thought I had was to remove the order clause,
 fetch EVERYTHING, then sort them in-memory and return a 10 item
 slice...


 



-- 
Stay hungry,Stay foolish.

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



[google-appengine] Re: Newbie question - Request params available to def post(self)

2008-10-14 Thread kang
or you can write code like:
class Stuff:
 get(self,favorites):
do something here.

application = webapp.WSGIApplication(

[(r'^/stuff/favorites/(?P(favorites).*)$', Stuff)],
 debug=True)


the url is like :
/stuff/favorites/oatmealraisinbranhttp://myapp.com/stuff?favorites=oatmealraisinbran


On Tue, Oct 14, 2008 at 11:49 PM, Alex Vartan [EMAIL PROTECTED] wrote:


 Let's say I redirect a user to the url:

 myapp.com/stuff?favorites=oatmealraisinbran

 I generate the page with a def get(self) method in the Stuff
 RequestHandler class and use self.request.get('favorites').

 Then there is a form on the same page (/stuff) which processes some
 additional input ('morestuff') and supplies me with a few other pieces
 of data via post. When I process this using a def post(self) in Stuff,
 I use self.request.get('morestuff').

 But can I also access the original 'favorites' in the post method? I
 can't find any documentation about this but perhaps it's because it's
 just obvious. I guess the question is does the self.request object get
 cleared after get(self) finishes generating the page, or are the
 original query params still available to me when I call
 self.request.get in the subsequent post method (is the dictionary of
 key value pairs in the request object replaced, or augmented by post
 data?)

 Thanks much,
 Alex
 



-- 
Stay hungry,Stay foolish.

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



[google-appengine] Re: Ordering with an inequality filter

2008-10-14 Thread mrchucho

Unfortunately, a GqlQuery just constructs a Query behind the scenes.
In other words, they're functionally equivalent and what is disallowed
by Query is similarly disallowed by GqlQuery.


On Oct 14, 7:18 pm, kang [EMAIL PROTECTED] wrote:
 maybe you can write GQL like:

 SELECT * FROM kind
     [WHERE condition [AND condition ...]]
     [ORDER BY property [ASC | DESC] [, property [ASC | DESC] ...]]
     [LIMIT [offset,]count]
     [OFFSET offset]



 On Wed, Oct 15, 2008 at 6:38 AM, mrchucho [EMAIL PROTECTED] wrote:

  Let's say I have blog and I want to fetch the top 10 posts created in
  the last 48 hours with the most comments and display them in order of
  comment count. I would expect to be able to do something like:

  Post.all().filter(created =, datetime.today() -
  timedelta(hours=48)) \
               .order(-comment_count) \
               .fetch(10)

  But this won't work because First ordering property must be the same
  as inequality filter property. Any idea how to implement something
  like this? The only thought I had was to remove the order clause,
  fetch EVERYTHING, then sort them in-memory and return a 10 item
  slice...

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



[google-appengine] Re: How to access Google Cache?

2008-10-14 Thread Sal

It's not very clear (at least to me) what you're trying to do. If you
have objects that are being pulled from the datastore, then you should
definitely use the memcache API as previously mentioned where
appropriate. However, if you're trying to get a link to a Google
Cached Page, the Search AJAX API exposes a cacheUrl property that you
can use in the JSON response.

On Oct 14, 8:14 am, Vacilando [EMAIL PROTECTED] wrote:
 Hi,

 In an application I build I sometimes need to check on a page, but it
 is enough for me (and presumably much faster) if I could read its
 latest copy from Google Cache.

 Is there a way to fetcha page from Google Cache programmatically?

 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 get a GAE Account?

2008-10-14 Thread [EMAIL PROTECTED]

Why nobody pay attention to me? Is there anyone could send a
invitation to me? thanks!

On 10月14日, 下午11时22分, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 My country is not in the Supported mobile providers list, but how can
 I get the Google App Engine Account?
--~--~-~--~~~---~--~~
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: YAML, mappings and handlers.

2008-10-14 Thread Sal

That's a good question. I personally route to the appropriate handlers
inside a main.py module. I pretty much adopted this approach from GvRs
presentation. But I have to admit, I don't know of any significant
advantages of one approach versus the other. I would like to see what
other ppl think.

On Oct 14, 10:29 am, JFQueralt [EMAIL PROTECTED] wrote:
 Hi, everyone.

 I am not sure this question has been raised in the past but I searched
 a little bit and could not find any topic covering this doubt I am
 having. Also, I am a newbie on this technologies so maybe my question
 is kind of obvious.

 - YAML allows us to map URL patterns to modules in written in Python.
 - Inside a module, I can map an URL to a handler.

 This basically means to me that I have 2 options to handle the
 following common scenario:

 Root
 -Folder A
 -File 1
 -File 2
 -File 3
 -File 4
 -File 5

 -Folder B
 -File 1
 -File 2
 -File 3

 First option:
 - YAML can map the whole folder A to a module and inside the module I
 further discriminate the right handler to each File.

 Second option:
 - YAML maps directly a separate module per each File (which therefore
 contains only one handler for that particular File).

 My doubt concerns performance, stability and the like.
 While I don´t mind coding more modules, I am not sure what´s more
 performant.
 From a discrimination level, it does not seem to make any difference
 to me (do it at YAML level or module level... it´s basically the same)
 but then other aspects might be considered.

 Any ideas?

 Cheers.

 Jean
--~--~-~--~~~---~--~~
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: App Engineでの ファイル取�zみ

2008-10-14 Thread yu ping322
可以把文件放在DataStore的BlobProperty里。但是请注意每个文件不能超过1M.google有限制。
例子:
model:
class UploadFile(db.Model):
data = db.BlobProperty()
orig_name = db.StringProperty()
ext = db.StringProperty()
date = db.DateTimeProperty(auto_now_add=True)
上传:
class Upload(BaseRequestHandler):
@requires_admin
def post(self):
filename = self.param('filename')
data = self.param('upfile')
fileext = self.param('fileext')
models.UploadFile(orig_name = filename, ext = fileext, data =
data).put()
下载:
class Download(BaseRequestHandler):
def get(self, file):
filename = self.request.path[len('/upload/'):]
split = filename.rfind('.')
if split == -1:
name, ext = filename, ''
else:
name = filename[:split]
ext = filename[split + 1:]

file = models.UploadFile.get(db.Key(name))
if not file:
self.main('没有找到这个文件!')
return
elif file.ext != ext:
self.main('没有找到这个文件!')
return
else:
ext = '.' + ext
mimetype = 'application/octet-stream'
if types_map.has_key(ext):
mimetype = types_map[ext]
self.response.headers['Content-Type'] = mimetype
self.response.headers['Content-Disposition'] = 'inline;
filename=' + file.orig_name.encode('utf-8') + ''
self.response.out.write(file.data)
2008/10/14 kns001 [EMAIL PROTECTED]:

 App Engine にて、不明点がありますので投稿させて頂きました。

 【不明点】
 App Engineを使用した外部ファイルの取込と取出が可能でしょうか?

 例:Aさんが、App Engineにて作成したAPPを使用して自端末上のファイル
 (テキスト、word、excel、pdf等)をAppEngineサーバ(DataStoreAPI等を使用)に取り込む。
 続いてBさんが、同APPを使用してそのファイルを取り出して自端末にダウンロードし閲覧する。

 また、例のようなDataStoreAPIでGoogleサーバに取り込まなくても他に可能な
 代替案などがあればご教授いただきたいと思います。

 どうぞよろしくお願いいたします。

 


--~--~-~--~~~---~--~~
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] 1000 mcycles to update a single entity

2008-10-14 Thread Josh Heitzman

I've been digging into where may app is spending its mcycles.  By
using memcache I've gotten all of my requests that only read data down
well under the 1000 mcycle overall average request processing limit;
however, I'm seeing that it takes about 1000 mcycles to update a
single entity (not indexed, not very large either).

Is this in line with what other folks are seeing?
--~--~-~--~~~---~--~~
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 get a GAE Account?

2008-10-14 Thread David Symonds

On Wed, Oct 15, 2008 at 11:43 AM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

 Why nobody pay attention to me? Is there anyone could send a
 invitation to me? thanks!

http://code.google.com/appengine/kb/sms.html#error


Dave.

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



[google-appengine] Re: 1000 mcycles to update a single entity

2008-10-14 Thread Josh Heitzman

Regarding the first question, those mcycle numbers are from logs on
GAE, not from local profiling.  But if you mean are lots of people
using, no.  I was the only user with any data when I did the test.

Regarding the second question, the entities are not what I would
consider large. For example, one has 10 integer properties, 1 string
property, 2 datetime properties, one string list property (15 strings
with none more 30 characters long), and one int list property (only 1
value at the moment).

The entity group had 4 entities in it when I generated those numbers.

There is no contention involved, as the data is user specific and I
was the only user with data when I did the test.

On Oct 14, 8:31 pm, David Symonds [EMAIL PROTECTED] wrote:
 On Wed, Oct 15, 2008 at 1:50 PM, Josh Heitzman [EMAIL PROTECTED] wrote:
  Actually, I'm it take about 1500 mcycle to update one entity and then
  an about an additional 1000 mcycle per additional entity (each a
  different kind in this case) that is updated via the same db.put call.

 Is this in production? What size is the entity? Is it in a large
 entity group? How much contention do you think is involved?

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



[google-appengine] Re: 3000 mcycles and This request used a amount of CPU and may soon exceed its quota

2008-10-14 Thread Jon McAlister

Matija, you said:

or that app-engine quota permits this CPU
usage only few times let's say per minute and that they will stop my
application for several hours if I continue with this usage.

Bingo, that is exactly what we do. We don't absolutely forbid such
high CPU requests but we do highly discourage them. The best way to
think about it is that if we took it to the extreme, and let the app
spend as much time on each request as they liked, then we would only
be able to serve a small number of applications at the same time. It
is only by enforcing request deadlines and cpu-consumption limits that
we are able to make this service open to as many applications as
possible while also guaranteeing isolation between them.

Josh, to address your question, what you are really looking for is
improved support for offline processing (there are many issues for
this listed in the Issue Tracker). With that infrastructure in place
we may be able to adjust the limits. Offline processing is orthogonal
to billing.

Jon

On Oct 13, 9:32 am, Josh Heitzman [EMAIL PROTECTED] wrote:
 I've been wondering the same thing.  When they start letting us pay
 for this, will our apps still have to stay under some arbitrary
 average number of CPU cycles?

 On Oct 13, 3:21 am, Matija [EMAIL PROTECTED] wrote:

  Hi,
  I have some init stage imports to app-engine application and
  combining  with some ajax calls I was able to use maximum of 3000
  mcycles per request. When there is request that consumes more the 1000
  mcycles I have warning 'This request used a amount of CPU and may soon
  exceed its quota.' in my application log.

  Should I be worried because of that or not. Is this general warning
  for me to inform me that with this average CPU use i will use all my
  CPU quota eventually soon, or that app-engine quota permits this CPU
  usage only few times let's say per minute and that they will stop my
  application for several hours if I continue with this usage.
--~--~-~--~~~---~--~~
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: Possible to subclass User?

2008-10-14 Thread pr3d4t0r

On Oct 14, 8:15 am, Alex Vartan [EMAIL PROTECTED] wrote:
 Apologies if this is a simple question, I'm still a python / GAE
 novice. Is it possible to subclass the User class? I have just a
 couple of extra properties and I'd like to store with User and rather
 not create a duplicated UserOfMyApp class that includes a user as a
 property if I can just subclass the User class itself.

 What's the best solution if I just want to store a reference to
 another model and a few integerproperties with a user?

Composition is usually a better route.  The attributes and semantics
of the Google Accounts User instance are most likely different from
those of your application's user.  Handling the User as an attribute
will let you associate it freely with more than one entity, if your
application requires it.

In addition to making it an attribute, you may also want to have a
couple of domain-specific utility methods that perform the User
handling for your application.  Also, take a look at entity groups and
keys in the Datastore API.

Good luck and cheers,

pr3d4t0r
http://www.istheserverup.com
http://www.theteslatestament.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: How to access Google Cache from App Engine?

2008-10-14 Thread Jon McAlister

Sure! You can use the urlfetch API: 
http://code.google.com/appengine/docs/urlfetch/

On Oct 14, 8:31 am, Vacilando [EMAIL PROTECTED] wrote:
 Hi,

 In an application I build I sometimes need to check on a page, but it
 is enough for me (and presumably much faster) if I could read its
 latest copy from Google Cache.

 Is there a way to fetcha page from Google Cache programmatically?

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