[google-appengine] Re: How to select a single word in stringproperty?

2009-04-18 Thread saintthor
谢谢回复。 我问的是字符串属性部分匹配的问题。按你的方法,只能匹配开头。需要匹配中间的时候,比如在前例里,查找含有 ccc 的对象,该怎么做? HOW to select the entity with "ccc" in strprop then? On 4月19日, 上午12时08分, 风笑雪 wrote: > You can read this > document:http://code.google.com/appengine/docs/python/datastore/queriesandinde... > > Give you a sample code: > >

[google-appengine] Re: Images API still limited to 1MB

2009-04-18 Thread Anuraag Agrawal
Indeed the entire API is limited to 1MB, but the point of discussion I'd like to make is that for data-related API calls like the datastore and memcache, it's easy to come up with hardware/implementation constraints that would warrant such a limit, and there are usually relatively simple ways to w

[google-appengine] errors with django.

2009-04-18 Thread Aaron
I need to know how the urls work. I would get errors on all 3 pages plus the admin. here is the error: : Caught an exception while rendering: Reverse for 'settings.contact-consultation-request' with arguments '()' and keyword arguments '{}' not found. Original Traceback (most recent call last)

[google-appengine] Retrieving Large Query Sets Containing Inequality Operators

2009-04-18 Thread Chris
I have the model: class Record(db.Model): date = db.DateProperty() Over 1000 Record instances may contain the same date value. The instances are also not created in the order of their dates. I'm trying to query all instances whose date is within a given range. I need to be able to query sets

[google-appengine] Re: Does AppEngine prevent you from importing a module added to sys.path?

2009-04-18 Thread 风笑雪
I think there is no such limit in GAE. http://code.google.com/intl/zh-CN/appengine/articles/django10_zipimport.html import sys sys.path.insert(0, 'django.zip') import django.forms.fields 2009/4/19 Lee Olayvar > I am trying to import a module, found in a subdirectory of my app. This app > dir

[google-appengine] Re: testing application error handling

2009-04-18 Thread Andy Freeman
Sounds like http://code.google.com/p/googleappengine/issues/detail?id=915 . Please star and comment as appropriate. On Apr 18, 1:34 pm, iceanfire wrote: > According to the google maps team, we have to expect atleast some > [small] amounts of datastore errors. > > Is there anyway to get the SDK

[google-appengine] Re: Does AppEngine prevent you from importing a module added to sys.path?

2009-04-18 Thread Lee Olayvar
Yup, disregard this whole post. :) (Why is it that i spent hours on this, then i find the answer after posting? :o) On Sat, Apr 18, 2009 at 7:29 PM, Lee Olayvar wrote: > Hmm, i'm starting to suspect it may be with how AE is caching main().. > > On Sat, Apr 18, 2009 at 7:15 PM, Lee Olayvar wrot

[google-appengine] Re: Does AppEngine prevent you from importing a module added to sys.path?

2009-04-18 Thread Lee Olayvar
Hmm, i'm starting to suspect it may be with how AE is caching main().. On Sat, Apr 18, 2009 at 7:15 PM, Lee Olayvar wrote: > I am trying to import a module, found in a subdirectory of my app. This app > directory is added to the sys.path list, but it fails if i try to import > it.. does AppEngin

[google-appengine] Does AppEngine prevent you from importing a module added to sys.path?

2009-04-18 Thread Lee Olayvar
I am trying to import a module, found in a subdirectory of my app. This app directory is added to the sys.path list, but it fails if i try to import it.. does AppEngine prevent this? Note that you may wonder who i don't just import the module via its full python path (import somepackage.package.mo

[google-appengine] Re: Google's ext.webapp.template module

2009-04-18 Thread 风笑雪
GAE's template is a part of Django 0.96. You don't have to use it, import django.template is also ok, or even Mako's template. 2009/4/19 GenghisOne > > What practically happens when this directive is executed? > * > from google.appengine.ext.webapp import template > * > > Is this importi

[google-appengine] Re: Timeout: datastore timeout: operation took too long.

2009-04-18 Thread Ray Malone
Today, my app has seen 2 timeout errors at 3:10 pm according to the log. Each one was 30 seconds apart. One was a Get and the other a Put. Each on totally different classes that are not connected in any way. On Apr 17, 4:15 pm, Brandon Thomson wrote: > Google will not really acknowledge this

[google-appengine] Re: memcache.set() and memcache.add() fail silently if time is greater than one month

2009-04-18 Thread 风笑雪
Why can't you just use memcache.set(key), and use a cron job to delete every month: memcache.delete(key). 2009/4/19 michael > > eg, memcache.set(key, value, 90 * 24 * 3600) # silently fails to set > the cache value > > Relevant doc show below but WTF is "one month" ? 28 days? or 29? or > 30? or

[google-appengine] Re: Google Apps account - can't enable HTTPS or remove App Engine from domain

2009-04-18 Thread 风笑雪
BTW, you can try to set a new version in your app.yaml. 2009/4/19 风笑雪 > There is no way to disable GAE except deleting the app.yaml file, and I > don't think it will work. > Your apps need at least one domain for GAE( if you ever create one ). So > you can try add an new domain, delete the old o

[google-appengine] Re: Google Apps account - can't enable HTTPS or remove App Engine from domain

2009-04-18 Thread 风笑雪
There is no way to disable GAE except deleting the app.yaml file, and I don't think it will work. Your apps need at least one domain for GAE( if you ever create one ). So you can try add an new domain, delete the old one, then add it again. 2009/4/19 Chris L > > I set up App Engine with a Google

[google-appengine] Re: Remove naked domain from appengine application

2009-04-18 Thread Chris L
I have exactly the same problem. I will post here if I actually ever get it solved. On Apr 14, 5:32 pm, mifki wrote: > I have appengine application installed for my google apps domain and > naked domain specified for it. I can't neither remove that domain nor > disable entire application. I know

[google-appengine] Re: sort on _key_ out of order

2009-04-18 Thread 风笑雪
Well, but I don't care it, my application allows the same ID, I just need it for sorting, and it's harder to sort by time when the browser do an AJAX get. Some times I need handle the timezone difference between server and browser. If you want keep a unique ID, the best way is set its key_name, and

[google-appengine] Google Apps account - can't enable HTTPS or remove App Engine from domain

2009-04-18 Thread Chris L
I set up App Engine with a Google Apps domain one year ago. Now I am informed that "You must re-install this application to enable secure access for your users." Problem is, if I try to disable the App Engine service, nothing happens, even after hours of waiting. I have App Engine enabled for the

[google-appengine] Re: 500 Error uploading indexes. Need to clear indexes.

2009-04-18 Thread ssg123
Worked without any problems. Thanks! On Apr 17, 4:47 pm, "Jeff S (Google)" wrote: > Hello, > > I've errored out the stuck indexes so you should now be able to vacuum > them and upload new ones. Please let me know how it goes :-) > > Thank you, > > Jeff > > On Apr 17, 12:22 am, ssg123 wrote: >

[google-appengine] Re: sort on _key_ out of order

2009-04-18 Thread djidjadji
If two requests want to create an M() they will get the same ID. You must use some kind of transaction to get unique IDs 2009/4/18 风笑雪 : > I use this code to keep an id: > class M(db.Model): > id = db.IntegerProperty() > time = db.DateTimeProperty(auto_now_add=True) >@staticmethod >de

[google-appengine] Re: Announcing BDBDatastore, a replacement datastore for App Engine

2009-04-18 Thread Nick Johnson
On Apr 18, 11:34 pm, Dag wrote: > Very cool, but I don't know if this will solve the 'practical lock in' > problem for GAE python. It may be hard to find a hosting provider that > offers django along with long-running java processes. I don't expect this to be used by people wanting to host on sh

[google-appengine] Re: Announcing BDBDatastore, a replacement datastore for App Engine

2009-04-18 Thread Dag
Very cool, but I don't know if this will solve the 'practical lock in' problem for GAE python. It may be hard to find a hosting provider that offers django along with long-running java processes. Still, GAE-J developers now have a reasonable alternative and maybe some of your efforts can be appli

[google-appengine] memcache.set() and memcache.add() fail silently if time is greater than one month

2009-04-18 Thread michael
eg, memcache.set(key, value, 90 * 24 * 3600) # silently fails to set the cache value Relevant doc show below but WTF is "one month" ? 28 days? or 29? or 30? or 31? Depends on what it month it is? :-p set(key, value, time=0, min_compress_len=0) Sets a key's value, regardless of previous co

[google-appengine] Re: Newbie First Upload Problems

2009-04-18 Thread Wooble
Are you accessing your app through appspot? On Apr 17, 11:39 pm, codingJoe wrote: > I'll tell the newbie story on how I got into this mess. > > I developed a small app and tested on my laptop using the AppEngine > SDK.  I got my app to point that it was working the way I wanted. > Now, I'm ready

[google-appengine] dumb guy trying to access datastore remotely with remote_api

2009-04-18 Thread Ben Nevile
I was able to get appengine_console.py to launch in OS X with the help of this message: http://groups.google.com/group/google-appengine/browse_thread/thread/6bc2f759188476b2/967e636458681da0?lnk=gst&q=interactive+console+remote+api#967e636458681da0 When I try and fetch data, it asks for my name

[google-appengine] testing application error handling

2009-04-18 Thread iceanfire
According to the google maps team, we have to expect atleast some [small] amounts of datastore errors. Is there anyway to get the SDK to throw these errors, so I can better test how my application responds when a specific query is denied (i.e make sure the right code kicks in and handles the erro

[google-appengine] becoming an app administrator with google apps account

2009-04-18 Thread jhf555
I'm trying to send email on GAE with my Google Apps primary email as the "From" email address. So I need to add that email address (which is i...@bigriddles.com) as an Administrator for my app. However, I'm having trouble doing this. I add that email as an adminstrator and receive the invite emai

[google-appengine] Re: Redirect all calls to appengine url to my Google Apps url

2009-04-18 Thread richardcur...@googlemail.com
I tried it. But when I call my appspot url now directly I get a webpage: Error: Server Error The server encountered an error and could not complete your request. If the problem persists, please report your problem and mention this error message and the query that caused it. My main domain works

[google-appengine] Google's ext.webapp.template module

2009-04-18 Thread GenghisOne
What practically happens when this directive is executed? * from google.appengine.ext.webapp import template * Is this importing Django or something else? The reason why I ask this is I'm a newbie to GAE and want to walk before I can run...on the surface Django looks powerful but there

[google-appengine] Re: sort on _key_ out of order

2009-04-18 Thread 风笑雪
I use this code to keep an id: class M(db.Model): id = db.IntegerProperty() time = db.DateTimeProperty(auto_now_add=True) @staticmethod def max_id(): maxID = memcache.get('MaxID') if maxID: return maxID messages = Message.all() messages.order("-id") message = me

[google-appengine] How are cookies sent?

2009-04-18 Thread richardcur...@googlemail.com
Hi, Sorry if this is a dumb question. I am watching the HTTP headers of two of my appengine locations. Downloading files from one always sends cookies along the request. The other appengine does not. I want to prevent cookies being sent. How do I do that? --~--~-~--~~

[google-appengine] Re: Redirect all calls to appengine url to my Google Apps url

2009-04-18 Thread richardcur...@googlemail.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 google-appengine

[google-appengine] Re: sort on _key_ out of order

2009-04-18 Thread David Wilson
thanks! i missed that in the docs :) I wasnt using a datetime just to save a bit of space, but i can see i need to know to guarantee ordering, or if i want to do ordered paging via key i would need to handle key creation myself to make sure they are in order. This becomes harder in one case for

[google-appengine] Re: Project scripts recovery

2009-04-18 Thread 风笑雪
Maybe it would be helpful: http://code.google.com/p/appfilesbrowser/ 2009/4/18 Barry Hunter > > basically no. Google provide no method to do this. > > Try searching the archives, people have posted various scripts that > can be used to help recover bits. (but dont think they can recover > all) >

[google-appengine] Re: Redirect all calls to appengine url to my Google Apps url

2009-04-18 Thread 风笑雪
Good article, thanks~ 2009/4/18 ctran > > Try this: > > > http://appengine-cookbook.appspot.com/recipe/redirect-from-appspot-to-your-domain > > On Apr 18, 9:18 am, "richardcur...@googlemail.com" > wrote: > > I know in principle how to redirect. > > > > The point is, all appengine python handler

[google-appengine] Re: How to select a single word in stringproperty?

2009-04-18 Thread 风笑雪
You can read this document: http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html Give you a sample code: class M(db.Model): s = db.StringProperty() class H(webapp.RequestHandler): def get(self): M(s='aaa bbb ccc ddd').put() M(s='eee ddd ccc fff').put() M(

[google-appengine] Re: Can't create first application

2009-04-18 Thread 风笑雪
I can visit http://appengine.google.com/dashboard?&app_id=xxx ,and get this message: You are not authorized to access this application. Of course you can't create this application, but if you got this message, that means it's not yours. If you're redirected to http://appengine.google.com/start , y

[google-appengine] Re: app.yaml - how to serve ALL files as they are..?

2009-04-18 Thread Wooble
I'd think this would work (but I haven't tried it): - url: / static_dir: static Note: this requires all of your site files to be in a subdirectory of your application, since for a static_dir directive you need to specify a relative directory. I'm not sure if "static_dir: ." would work. Try it

[google-appengine] How to select a single word in stringproperty?

2009-04-18 Thread saintthor
entities1.strprop = "aaa bbb ccc ddd" entities2.strprop = "eee ddd ccc fff" using qerry or gql, HOW to select the entity with "eee" in strprop? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" grou

[google-appengine] Re: Redirect all calls to appengine url to my Google Apps url

2009-04-18 Thread ctran
Try this: http://appengine-cookbook.appspot.com/recipe/redirect-from-appspot-to-your-domain On Apr 18, 9:18 am, "richardcur...@googlemail.com" wrote: > I know in principle how to redirect. > > The point is, all appengine python handler classes are identical for > both > > http://example.apps

[google-appengine] Re: Simple way to check where you app is running? (DevServer vs AppEngine)

2009-04-18 Thread Lee Olayvar
Perfect, thanks! On Fri, Apr 17, 2009 at 7:19 PM, David Symonds wrote: > > On Sat, Apr 18, 2009 at 11:20 AM, Lee Olayvar > wrote: > > > Is there a simple way to tell where your app is running? Eg, something as > > fast as a little bool check? (__debug__ .. if that worked) > > import os > is_deb

[google-appengine] Re: Redirect all calls to appengine url to my Google Apps url

2009-04-18 Thread richardcur...@googlemail.com
I know in principle how to redirect. The point is, all appengine python handler classes are identical for both http://example.appspot.com and http://www.example.com So I had to check in EVERY python handler class - is the call coming from example.appspot.com - if yes redirect to www.example.co

[google-appengine] Can't create first application

2009-04-18 Thread ltcstyle
Hi, I have used Google App account to create google appengine project. I have been verified with the sms. Then I follow the link to create a new project. But when I finish, the new project is not created. At least I can't manage it. I then try to create it again. App engine display an error Sor

[google-appengine] Re: Images API still limited to 1MB

2009-04-18 Thread Tim Hoffman
Why don't you stick the images in Picasa and just manage them through app engine ? Thats what I am doing T On Apr 18, 4:28 pm, Anuraag Agrawal wrote: > When App Engine raised its request size limit from 1MB to 10MB, it > seemed like we would finally be able to use it for an image sharing > web

[google-appengine] Re: URI Errors... logs?

2009-04-18 Thread Jesse Grosjean
> Be sure to check the 'request' logs. If your app returned a non-200 > response code but didn't log an error, it will not show up in the > 'error' logs. Thanks! I didn't realize that. I'm guessing that it also won't log a response for 3XX errors? At least it seems not to. Does anyone know exact

[google-appengine] Are you a human ?

2009-04-18 Thread Tom Wu
Hi All, During my large database put into datastore, it shows Please go to "https://www.google.com/accounts/DisplayUnlockCaptcha\n"; "and verify you are a human. Then try again.") Yeah, I am a human. ha ha ha! Are you human ? The captcha will stop my application until I unlock the

[google-appengine] Re: sort on _key_ out of order

2009-04-18 Thread David Symonds
On Sat, Apr 18, 2009 at 3:21 PM, David Wilson wrote: > Is this expected behaviour? and thus do i need to always give a > key_name to guarantee order? this creates scaling issues for order > counter (which is probably why its not in order in the backend :) ) Keys are only guaranteed to be unique

[google-appengine] Re: Images API still limited to 1MB

2009-04-18 Thread 风笑雪
All API is limited to 1MB, not only image API. 2009/4/18 Anuraag Agrawal > > When App Engine raised its request size limit from 1MB to 10MB, it > seemed like we would finally be able to use it for an image sharing > website as while reasonably sized digital camera images over 1MB are > very like

[google-appengine] Images API still limited to 1MB

2009-04-18 Thread Anuraag Agrawal
When App Engine raised its request size limit from 1MB to 10MB, it seemed like we would finally be able to use it for an image sharing website as while reasonably sized digital camera images over 1MB are very likely, it'd take an extremely professional camera image to break the 10MB limit, which s

[google-appengine] Re: Redirect all calls to appengine url to my Google Apps url

2009-04-18 Thread 风笑雪
Sorry class Handler(webapp.RequestHandler): def get(self): self.set_status(301) self.redirect("http://www.example.com";) # this is what you want to redirect to 2009/4/18 风笑雪 > class Handler(webapp.RequestHandler): > def get(self): > self.set_status(301) > self.redirect("/home

[google-appengine] Re: Redirect all calls to appengine url to my Google Apps url

2009-04-18 Thread 风笑雪
class Handler(webapp.RequestHandler): def get(self): self.set_status(301) self.redirect("/home") and make Handler class to handle your url. 2009/4/18 richardcur...@googlemail.com > > Hi, > > how do I somehow 'redirect' all calls to appengine url to my Google > Apps url? > > Something

[google-appengine] Re: Performance issues

2009-04-18 Thread Eric Walker
Thanks for the suggestion. I'll try #3 as an first approach and see where that takes me (and look forward to #5). I think app-engine- patch has a main() declared, and I assume the app is getting cached as a result, but I'm not sure if that's the case. Re the file caching idea, I don't understan

[google-appengine] Re: Newbie First Upload Problems

2009-04-18 Thread 风笑雪
No need change your code, just change your app.yaml like below: - url: /.* script: main.py login: admin 2009/4/18 codingJoe > > I'll tell the newbie story on how I got into this mess. > > I developed a small app and tested on my laptop using the AppEngine > SDK. I got my app to point that i