[google-appengine] Re: app engine is down?
Just curios, anyone here has fully prepared for this unexpected outage? Show off you app with nice error message page! Things like http://www.giftag.com/ doesn't count, only one plain text: "You've encountered a problem with giftag.com We've been notified of this issue and are working to resolve it." (Well this is still much better then mine, mine is just Python exception message) Want to see some error pages with good humor. -- 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-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Internationalization in GAE using webapp
> Interesting ... however I am not very sure about {%trans %} blocks ... > I left you a *quick* message in your blog since I would not like to > start a flamewar here ... and I still wanna know your (and everybody > else's ... ;) opinion about that ... ;) > I have left comment on my blog. So I leave short answer for that here. make-message.py is capable to recognize {% trans "" %} in template files and put them all into one .po file with _() in scripts. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Internationalization in GAE using webapp
Last month, I wrote a blog posting "Using Django's I18N in Google App Engine." A simple demo [2] comes with the posting. I also used on an actual GAE app called I Thank [3], you can switch the language via Settings on top-right corner. Hope the doc can solve your questions. [1] http://makeyjl.blogspot.com/2009/02/using-djangos-i18n-in-google-app-engine.html [2] http://yjltest.appspot.com/i18n [3] http://i-thank.appspot.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 google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: deserialize json to python object
On Feb 10, 5:23 pm, Rein Petersen wrote: > obj = simplejson.loads("{'id':'KS1-0','type':'activity','units': > 1,'priceper':450}") The string of JSON is wrapped with double quote. ( http://json.org/ ) This will work obj = simplejson.loads('{"id":"KS1-0","type":"activity","units": 1,"priceper":450}') --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Chinese characters caus es ServerError 网页中有汉字,就会产生错误
(I edited the subject, many English speakers may not know this post is written in Chinese) I have tried this on Linux if I have this script in GB2312, I got no error but a warning: WARNING 2009-01-22 21:55:14,652 __init__.py] Response written is not UTF-8: 'utf8' codec can't decode byte 0xa3 in position 35: unexpected code byte So I guess that is possible that your python script is not in UTF-8 but GB2312 since you are using Simplified Chinese. If you save it as UTF-8, you shouldn't have any problem with Chinese. If you still want to retain the encoding, you can modify you code self.response.out.write('Hello, have no thing,有了汉字就不 灵了?'.decode('GB2312')) You have to decode every output statement. On Jan 22, 5:53 pm, 网页中有汉字,就会产生错误,不知是啥原因 wrote: > this code right in local development environment, but error on update > to server. > > import wsgiref.handlers > from google.appengine.ext import webapp > > class MainPage(webapp.RequestHandler): > def get(self): > self.response.headers['Content-Type'] = 'text/html; charset=utf-8' > self.response.out.write('Hello, have no thing,有了汉字就不 > 灵了?') > > def main(): > application = webapp.WSGIApplication( > [('/', MainPage)], >debug=True) > wsgiref.handlers.CGIHandler().run(application) > > if __name__ == "__main__": > main() > > 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. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Timeouts
I just got three timeouts about an hour ago within 10 minutes to my app (appid: brps), all generated same traceback. They happened at: 01-05 11:50AM 18.670 01-05 11:50AM 13.719 01-05 11:41AM 50.052 It's not a big deal to me, just want to provide the info. But I do have a question, can we catch `Timeout` exception? == One of the error log: 01-05 11:50AM 13.719 /get? blog=4589801858088630122&post=430278962333729325&callback=jsonp1231109286447&_=1231109287404 500 11474ms 8190ms-cpu 1kb See details 65.210.123.XXX - - [05/Jan/2009:11:50:25 -0800] "GET /get? blog=4589801858088630122&post=430278962333729325&callback=jsonp1231109286447&_=1231109287404 HTTP/1.1" 500 1115 - - 01-05 11:50AM 25.180 Traceback (most recent call last): File "/base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py", line 498, in __call__ handler.get(*groups) File "/base/data/home/apps/brps/1.330487559911947040/index.py", line 100, in get p = post.get(blog_id, post_id) File "/base/data/home/apps/brps/1.330487559911947040/brps/post.py", line 75, in get p = Post.get_by_key_name(key_name) File "/base/python_lib/versions/1/google/appengine/ext/db/ __init__.py", line 837, in get_by_key_name return get(*keys) File "/base/python_lib/versions/1/google/appengine/ext/db/ __init__.py", line 1032, in get entities = datastore.Get(keys) File "/base/python_lib/versions/1/google/appengine/api/ datastore.py", line 217, in Get raise _ToDatastoreError(err) File "/base/python_lib/versions/1/google/appengine/api/ datastore.py", line 1637, in _ToDatastoreError raise errors[err.application_error](err.error_detail) Timeout --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: how to write code about table in template?
This thread reminds me of http://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks-in-python On Dec 2, 9:56 am, kang <[EMAIL PROTECTED]> wrote: > it does not work.. > for example I have 100 image objects, and I want to render 5 in each > row...how to write the code? > > > > > 1st img2nd img 3rd img4th img5th > img > > 6th img. > > > > > > On Mon, Dec 1, 2008 at 6:30 PM, Matija <[EMAIL PROTECTED]> wrote: > > > > > > > {% for obj in objects %} > > > > {{ obj.col1 }}{{ obj.col2 }}... > > > > {% endfor %} > > > > > > > On Dec 1, 10:04 am, kang <[EMAIL PROTECTED]> wrote: > > > what? > > > I want to show 5 objs in each row, how to write the code? > > > > On Mon, Dec 1, 2008 at 5:01 PM, A. TNG <[EMAIL PROTECTED]> wrote: > > > > > On Mon, Dec 1, 2008 at 2:27 PM, lookon <[EMAIL PROTECTED]> wrote: > > > > > > I want to render table in the response. and the template_value is > > > > > objects. Then my question is how to write the template file. > > > > > > for example, > > > > > {% for obj in objects %} > > > > > > > > > > > > > > > code here > > > > > {{ obj }} dosen't work? > > > > > > > > > > > > > > > > {% endfor %} > > > > > -- > > > > Best Regards, > > > > TANG Jiyu (Blog:http://jiyu.wordpress.com.cn) > > > > -- > > > Stay hungry,Stay foolish. > > -- > Stay hungry,Stay foolish. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---