[google-appengine] Re: can not force delete a index with error!

2009-08-01 Thread John LeBlanc

I've experienced this as well.  My indexes have been marked Error
for two days and vacuum_indexes doesn't seem to make a difference.


On Jul 20, 4:52 pm, Ramesh  Thiruchelvam
ramesh.thiruchel...@gmail.com wrote:
 Hi Jeff,

 I wasn't able to delete the Error statusindexfor a day, the next
 day when I tried vacuum_indexes it got deleted without any problem.

 The fist day I tried many times, but theindexstatus was Error it
 didn't change to Deleting It was kind of stuck at theerror
 status.

 Kr,
 Ramesh

 On Jul 21, 6:06 am, Jeff S (Google) j...@google.com wrote:

  Hi Ramesh,

  It looks like the errored indices have been deleted.Indexdeletion can
  sometimes take a little while (minutes to possibly hours but this is rare).
  Please let me know if the indices that you wanted to remove are still there.

  Thank you,

  Jeff

  On Fri, Jul 17, 2009 at 10:08 AM, Ramesh Thiruchelvam 

  ramesh.thiruchel...@gmail.com wrote:

   I've the sample problem, my app id is sri-lankan, and myindexCity is
   having the problem.

   I tried appcfg.py vacuum_indexes many times but it didn't work.

   Please help me.

   Kr,
   Ramesh

   On Jul 13, 7:38 pm, jb j.b...@gmx.de wrote:
Hello,

all myindexare stuck aterrorfor some days now. I tried to
vacuum_indexes and update_indexes but nothing happend.  Could anyone
from google take a look at my indexes?  My app id is iferienhaus.

Thanks.

On Jul 1, 12:13 am, Jeff S (Google) j...@google.com wrote:

 Hello hu,

 I think the issues with adobeman's app have been addressed. What is
   your app
 ID? I'll take a look.

 Thank you,

 Jeff

 On Tue, Jun 30, 2009 at 2:32 AM, hu itswa...@gmail.com wrote:

  i got this problem too,and hope be resolved

  On Jun 29, 12:13 pm, adobeman xil...@gmail.com wrote:
   I have someindexshowing aserror, and tried

   appcfg.py vacuum_indexes My_application/

   appcfg.py update_indexes My_application/

   but after Ideletetheindexby command line, theindexstill shows up
   in the admin page.

   Anyone have idea how to effectively clear all the indexs, so I can
   try
   to rebuild the indexes  for my application?- 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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: brand new app. 500 error, nothing in the error logs.

2009-08-01 Thread ego008
some erro in your code,
try pass in localhost

2009/8/1 Shawn A. boris...@gmail.com


 Hello Holger,

 Wow! I could have stared at the file for hours and not noticed that.
 sometimes all you need is another pair of eyes. Thank you
 that worked like a charm. Sneaky that it worked in the sdk btw.

 Thanks,
 -Shawn

 On Jul 31, 9:15 pm, Holger w...@arcor.de wrote:
  Hi Shawn,
 
  Try changing your app.yaml to
 
  handlers:
  - url: /.*
script: flgs_database.py
 
  it's Python and Python sripts have got the ending 'py'.
 
  Bye,
  Holger
 



-- 
gae-django-cms (GD-cms)
a multi-user CMS running on GAE 一个基于GAE多用户的CMS
sample http://cmsdome.appspot.com/
projects http://code.google.com/p/gae-django-cms/

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

2009-08-01 Thread Henrik Schack

Hi
I'm new to Python/AppEngine in general.

What is the correct import statement for using PyCrypto ?

/Henrik Schack

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

2009-08-01 Thread Holger

Depends.

Depends on the module you want to use.

Could be For example:
from Crypto.Hash import MD5

Or:
from Crypto.Cipher import DES

See:
http://www.dlitz.net/software/pycrypto/

That's what I learnd by google 'python crypto'. The rest is tryerror.


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

2009-08-01 Thread Henrik Schack

Ahh OK thank you very much,
so PyCrypto isn't part of the AppEngine SDK download right ?

 /Henrik Schack

On Aug 1, 10:42 am, Holger w...@arcor.de wrote:
 Depends.

 Depends on the module you want to use.

 Could be For example:
 from Crypto.Hash import MD5

 Or:
 from Crypto.Cipher import DES

 See:http://www.dlitz.net/software/pycrypto/

 That's what I learnd by google 'python crypto'. The rest is tryerror.
--~--~-~--~~~---~--~~
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: PyCrypto

2009-08-01 Thread Holger

Really don't know.

If it is part, you are able to import it (import is needed anyway),

If not, you first have to install their code and than import it into
your script.

And anyway it's a python item not an appengine one. (You remember,
before installing appengine you had to install python 25 and there you
find crypt)

In the python folder Lib/test/ there is a file test_crypt.py. Maybe
this sample can help.

Which crypt code packet you want and need to use - see Python
documentation.

--~--~-~--~~~---~--~~
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: brand new app. 500 error, nothing in the error logs.

2009-08-01 Thread djidjadji

You should move your remote_api handler to the top.
It will never be called because the handler above it has the regex /.*

2009/8/1 Shawn A. boris...@gmail.com:

 Hello Holger,

 Wow! I could have stared at the file for hours and not noticed that.
 sometimes all you need is another pair of eyes. Thank you
 that worked like a charm. Sneaky that it worked in the sdk btw.

 Thanks,
 -Shawn

 On Jul 31, 9:15 pm, Holger w...@arcor.de wrote:
 Hi Shawn,

 Try changing your app.yaml to

 handlers:
 - url: /.*
   script: flgs_database.py

 it's Python and Python sripts have got the ending 'py'.

 Bye,
 Holger
 


--~--~-~--~~~---~--~~
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] Large static files enable a quota exhaustion attack

2009-08-01 Thread Alexander Konovalenko

I'd like to draw more attention to a security issue with the App
Engine quota system which makes it particularly easy for an attacker
to use up an app's bandwidth quota.

User syntax writes that when a client requests a large (10 MB) static
file but cancels the download immediately, the whole file size is
nevertheless counted against the outgoing bandwidth quota. By
repeating such requests without completing them, an attacker can
exhaust an app's quota while using little bandwidth on their side.

Originally reported in the issue tracker:
http://code.google.com/p/googleappengine/issues/detail?id=1178

P. S. Please cc me because I'm not subscribed to the group.
--~--~-~--~~~---~--~~
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 translate an application running on GAE?

2009-08-01 Thread Emilien Klein

OK, thanks Rodrigo for the link to Babel. I had already seen it, but
never used it.
The problem I see with using Babel is that it IS an external library,
which means that I need to integrate it with my project. What I'm
looking for is a way to have a translated application WITHOUT having
to install any external library...

I am looking at 
http://makeyjl.blogspot.com/2009/02/using-djangos-i18n-in-google-app-engine.html
right now, and (while I'm not done playing around) I have already been
able to generate .po files, and my application still works OK. I'm
going to continue playing around, and then I'll report here about how
it went. If everything works fine I might even write a Knol article to
explain my steps (the article is not 100% accurate, I had to find out
to add {% load i18n %} in the templates for instance...

If anyone has another way of translating App Engine applications using
only the available tools, fell free to share it!

On 31 juil, 18:17, Rodrigo Moraes rodrigo.mor...@gmail.com wrote:
 Now, anwering some other questions.

  - I suppose that the .po / .mo files that open source projects
  traditionally use can not be used in the App Engine world?

 Yes, you can use those files with gettext functions. You'll probably
 need to wrap those functions and write some utilities to make it
 easier to use - but you don't need to do that because there are
 excellent libraries that have done it - Babel is the most known in the
 python world (I actually don't know any other).

  - Would you have various template files for each languages (like a
  contact.en.html, contact.fr.html, contact.nl.html, etc.) and use the
  appropriate file depending on the language that has been detected from
  the browser header?

 No! You would use one template, and have the strings wrapped by a
 translation function. The convention is to use a function name _.
 Like:

 {{ _(This is my string - I'll translate it later, and if not it'll be
 in English forever.) }}

 There are issues you'll find, like how to handle singular/plural and
 string replacements, but existing solutions cover that.

  - Would you use a single template file, but pass it the strings one by
  one that you would retrieve from the datastore (ouch, just writing
  this solution hurts!)

 Absolutelly no. The strings are stored in a .po file, which you
 compile into a .mo file. This if you go for the widely used gettext.

  Note: if you execute the following command from inside the GAE dev
  server folder:
  find | xargs -i grep -iH i18n \{\}
  you will see that a lot of files contain the string i18n, and that all
  are related to django. Does that mean that we could use standard
  Django internationalization techniques, or is it just that Google 
  forgot  to remove those files?

 I tried to use Django's i18n. Unfortunately Django is too tied to
 itself and that library is not reusable outside of Django. Fortunately
 later I found a standalone, reusable, well written one: Babel. It
 works very well.

 -- rodrigo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
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 translate an application running on GAE?

2009-08-01 Thread Rodrigo Moraes

On Sat, Aug 1, 2009 at 11:51 AM, Emilien Klein wrote:
 The problem I see with using Babel is that it IS an external library,
 which means that I need to integrate it with my project. What I'm
 looking for is a way to have a translated application WITHOUT having
 to install any external library...

Without any other external library, you have 2 options:

1. use gettext - http://docs.python.org/library/gettext.html
2. hack and patch django's i18n

The problem with the 2nd option is that your app stays tied to
django's ecosystem - later you need i18n in a small project and you'll
have to add django just for it. Ok, it is a valid solution, I just
personally prefer to use a external library that is not coupled with a
bunch of unrelated things, and avoid all the monkeypatching mess.

-- rodrigo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
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 translate an application running on GAE?

2009-08-01 Thread Devel63

We use the Django 0.96 that is bundled with GAE.

from django.utils.translation import gettext as _

Then just use _('My String) in the code, combined with the .po/.mo
files.


On Aug 1, 8:16 am, Rodrigo Moraes rodrigo.mor...@gmail.com wrote:
 On Sat, Aug 1, 2009 at 11:51 AM, Emilien Klein wrote:
  The problem I see with using Babel is that it IS an external library,
  which means that I need to integrate it with my project. What I'm
  looking for is a way to have a translated application WITHOUT having
  to install any external library...

 Without any other external library, you have 2 options:

 1. use gettext -http://docs.python.org/library/gettext.html
 2. hack and patch django's i18n

 The problem with the 2nd option is that your app stays tied to
 django's ecosystem - later you need i18n in a small project and you'll
 have to add django just for it. Ok, it is a valid solution, I just
 personally prefer to use a external library that is not coupled with a
 bunch of unrelated things, and avoid all the monkeypatching mess.

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



[google-appengine] Re: Large static files enable a quota exhaustion attack

2009-08-01 Thread Holger

Instead of offering your file as static file (whose download you can't
control) you could offer your file via url request from datastore and
make registration and login obligatory or block any third request from
the same IP.

Then a single attacker has got no chance, only a bot net would be
effective and if you are attacked by a botnet you are lost anyway -
could only take your app out of service, if there is too much
download.

--~--~-~--~~~---~--~~
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] update_indexes error

2009-08-01 Thread chemuto

Hi,

I cannot update my indexes. Getting Server Error 500. Haven't
reached yet 100.

App id: testingryv

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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How to translate an application running on GAE?

2009-08-01 Thread Emilien Klein

I understand your point, but Django has the benefit of coming bundled
with GAE, whereas Babel is an external lib that you need to import in
your project, keep up to date, etc...
I'll try to use what comes with GAE, and if it doesn't perform well,
then maybe I'll start looking at other external libraries.

On 1 août, 10:16, Rodrigo Moraes rodrigo.mor...@gmail.com wrote:
 On Sat, Aug 1, 2009 at 11:51 AM, Emilien Klein wrote:
  The problem I see with using Babel is that it IS an external library,
  which means that I need to integrate it with my project. What I'm
  looking for is a way to have a translated application WITHOUT having
  to install any external library...

 Without any other external library, you have 2 options:

 1. use gettext -http://docs.python.org/library/gettext.html
 2. hack and patch django's i18n

 The problem with the 2nd option is that your app stays tied to
 django's ecosystem - later you need i18n in a small project and you'll
 have to add django just for it. Ok, it is a valid solution, I just
 personally prefer to use a external library that is not coupled with a
 bunch of unrelated things, and avoid all the monkeypatching mess.

 -- rodrigo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
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 translate an application running on GAE?

2009-08-01 Thread Emilien Klein

Hi Devel63,
Thanks for your answer. But this is just for inside your Python files,
how do you manage text in the templates? Or don't you use templates? I
don't really see how you're managing this...
Is your app open source (i.e. Is there a place where I can see your
code)?

On 1 août, 10:31, Devel63 danstic...@gmail.com wrote:
 We use the Django 0.96 that is bundled with GAE.

     from django.utils.translation import gettext as _

 Then just use _('My String) in the code, combined with the .po/.mo
 files.

 On Aug 1, 8:16 am, Rodrigo Moraes rodrigo.mor...@gmail.com wrote:

  On Sat, Aug 1, 2009 at 11:51 AM, Emilien Klein wrote:
   The problem I see with using Babel is that it IS an external library,
   which means that I need to integrate it with my project. What I'm
   looking for is a way to have a translated application WITHOUT having
   to install any external library...

  Without any other external library, you have 2 options:

  1. use gettext -http://docs.python.org/library/gettext.html
  2. hack and patch django's i18n

  The problem with the 2nd option is that your app stays tied to
  django's ecosystem - later you need i18n in a small project and you'll
  have to add django just for it. Ok, it is a valid solution, I just
  personally prefer to use a external library that is not coupled with a
  bunch of unrelated things, and avoid all the monkeypatching mess.

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



[google-appengine] Non-default app versions: Are they first-class apps?

2009-08-01 Thread Bill

It's been suggested that a website could use different app versions to
support multiple languages or partitioning functions while still
getting access to a single datastore.  For example, see the last
paragraph here (http://stackoverflow.com/questions/1085898/choosing-
java-vs-python-on-google-app-engine/1087878#1087878).

I was told, though, that non-default app versions could have some
throttling or other limitations in place.  If so, what are the
limitations and is the App Engine team thinking of lifting those
limits so all app versions are first-class apps?

Thanks,
Bill
--~--~-~--~~~---~--~~
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: Are there any data recovery mechanisms for google app engine database?

2009-08-01 Thread Wooble

Considering Google Reader can't tell me how many unread stories I have
when the number is over 1000, I wouldn't count on Google having secret
technology that bypasses the limits of BigTable.

On Jul 31, 1:19 pm, johnP j...@thinkwave.com wrote:
 Any backup/restore that Google can provide should be much more
 reliable than any roll-your-own system; especially when dealing with
 the limitation of 1000 entities/query; no long-running-processes, etc.

 It's important functionality.  It almost feels weird to be saying
 something this basic and obvious.  :)

 johnP

 On Jul 31, 4:28 am, Ubaldo Huerta uba...@gmail.com wrote:

  The issue with appcfg.py exporting is that you need to write an
  Exporter class per entity, etc, etc.  It's prone to errors not to
  mention that it's a fair amount of work.

  Any professional web endeavor requires contingency plans to recover
  data in case there is an app error that incorrectly deletes, modifies
  data.  With the exporter thing, you have to write a lot of code, have
  to export everything since you can't export entities added or updated
  since last export. Also the data goes out of app engine, so recovery
  will take a long time.

  A real solution is to have a backup service to take snapshots and keep
  them in app engine world. I would bet that this is something that
  people will be willing to pay for since day one. The critical
  component of any web app is the data, so please prioritize backup/
  recovery feature.

  I see something related to this as the last item in the road map. I
  honestly can't believe that an alerting system for exception (which
  can be implemented with a couple of lines of code in the application)
  can be possibly more important that backup / recovery mechanism.

 http://code.google.com/appengine/docs/roadmap.html

  On Jul 30, 8:31 pm, Nick Johnson (Google) nick.john...@google.com
  wrote:

   Hi johnP,

   GAEBAR is certainly one option. The other option is to use the bulk
   exporting functionality of appcfg.py. Or, you can roll your own using
   remote_api.

   -Nick Johnson

   On Thu, Jul 30, 2009 at 7:24 PM, johnPj...@thinkwave.com wrote:

Thanks - those links to ways of recovering source-code.

What I'm interested in is hearing Google's recommendation on backing
up and restoring data.  GAEBAR is an option, I know.  Is the official
advice from Google to use it?

Backing up and restoring of data seems to be a significant-enough
issue to warrant some sort of official guidance:)

johnP

On Jul 30, 10:14 am, Holger w...@arcor.de wrote:
You may be interested in this 
threadhttp://groups.google.de/group/google-appengine/browse_thread/thread/e...

Could just use the zipme script to implement some download capability
in case your own source got 
lost.http://www.manatlan.com/blog/zipme___download_sources_of_your_gae_web...

Rename zipme (in app.yaml as well as in script) to something else and
use strong passwords to minimize the risk being hacked.

On Jul 30, 6:37 pm, johnP j...@thinkwave.com wrote:

 Does Google provide any best-practices for implementing a backup
 process?

 Thanks!

 johnP

 On Jul 30, 2:37 am, Nick Johnson (Google) nick.john...@google.com
 wrote:

  Hi,

  It's up to you to take backups of your data. We take regular 
  backups of the
  datastore, but we're unable to restore individual users' data.

  -Nick Johnson

  On Thu, Jul 30, 2009 at 5:22 AM, DiveIntoGAE taogf1...@gmail.com 
  wrote:

      If I delete some important datas by mistake, how can I recover
   them?

  --
  Nick Johnson, Developer Programs Engineer, App Engine

   --
   Nick Johnson, Developer Programs Engineer, App Engine


--~--~-~--~~~---~--~~
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: brand new app. 500 error, nothing in the error logs.

2009-08-01 Thread Jason Salas

Hi shawn,

The online tutorial might serve you better and is updated to reflect
the latest changes...a little better than the SDK:
http://code.google.com/appengine/docs/python/gettingstarted/

Good luck!

On 8/1/09, Shawn A. boris...@gmail.com wrote:

 Hello Holger,

 Wow! I could have stared at the file for hours and not noticed that.
 sometimes all you need is another pair of eyes. Thank you
 that worked like a charm. Sneaky that it worked in the sdk btw.

 Thanks,
 -Shawn

 On Jul 31, 9:15 pm, Holger w...@arcor.de wrote:
 Hi Shawn,

 Try changing your app.yaml to

 handlers:
 - url: /.*
   script: flgs_database.py

 it's Python and Python sripts have got the ending 'py'.

 Bye,
 Holger
 


-- 
Sent from my mobile device

--~--~-~--~~~---~--~~
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 translate an application running on GAE?

2009-08-01 Thread Jason Salas

I've used Babelfish only as a web tool, never an API, so does that
option exist?  You can leverage GAE's urlfetch lib and make a remote
call if Babelfish has a REST interface.

On 8/2/09, Emilien Klein emilien.kl...@gmail.com wrote:

 OK, thanks Rodrigo for the link to Babel. I had already seen it, but
 never used it.
 The problem I see with using Babel is that it IS an external library,
 which means that I need to integrate it with my project. What I'm
 looking for is a way to have a translated application WITHOUT having
 to install any external library...

 I am looking at
 http://makeyjl.blogspot.com/2009/02/using-djangos-i18n-in-google-app-engine.html
 right now, and (while I'm not done playing around) I have already been
 able to generate .po files, and my application still works OK. I'm
 going to continue playing around, and then I'll report here about how
 it went. If everything works fine I might even write a Knol article to
 explain my steps (the article is not 100% accurate, I had to find out
 to add {% load i18n %} in the templates for instance...

 If anyone has another way of translating App Engine applications using
 only the available tools, fell free to share it!

 On 31 juil, 18:17, Rodrigo Moraes rodrigo.mor...@gmail.com wrote:
 Now, anwering some other questions.

  - I suppose that the .po / .mo files that open source projects
  traditionally use can not be used in the App Engine world?

 Yes, you can use those files with gettext functions. You'll probably
 need to wrap those functions and write some utilities to make it
 easier to use - but you don't need to do that because there are
 excellent libraries that have done it - Babel is the most known in the
 python world (I actually don't know any other).

  - Would you have various template files for each languages (like a
  contact.en.html, contact.fr.html, contact.nl.html, etc.) and use the
  appropriate file depending on the language that has been detected from
  the browser header?

 No! You would use one template, and have the strings wrapped by a
 translation function. The convention is to use a function name _.
 Like:

 {{ _(This is my string - I'll translate it later, and if not it'll be
 in English forever.) }}

 There are issues you'll find, like how to handle singular/plural and
 string replacements, but existing solutions cover that.

  - Would you use a single template file, but pass it the strings one by
  one that you would retrieve from the datastore (ouch, just writing
  this solution hurts!)

 Absolutelly no. The strings are stored in a .po file, which you
 compile into a .mo file. This if you go for the widely used gettext.

  Note: if you execute the following command from inside the GAE dev
  server folder:
  find | xargs -i grep -iH i18n \{\}
  you will see that a lot of files contain the string i18n, and that all
  are related to django. Does that mean that we could use standard
  Django internationalization techniques, or is it just that Google 
  forgot  to remove those files?

 I tried to use Django's i18n. Unfortunately Django is too tied to
 itself and that library is not reusable outside of Django. Fortunately
 later I found a standalone, reusable, well written one: Babel. It
 works very well.

 -- rodrigo
 


-- 
Sent from my mobile device

--~--~-~--~~~---~--~~
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 translate an application running on GAE?

2009-08-01 Thread Roberto Saccon

I haven't followed this discussion in detail, but babelfish is easy to
implement in django, however you need a bit of low-level hackery, I
easily got it working (and I am not a regular Python hacker), I had
all the babelfish stuff running db-based (templates and translations),
completely replacing gettext. That project was just a proof-of-
concept. Start with looking the babelfish django integration they are
offering, that shows how to do things (helpful even if you are not
using django)

--
Roberto

On Aug 1, 6:56 pm, Jason Salas digitalpontificat...@gmail.com wrote:
 I've used Babelfish only as a web tool, never an API, so does that
 option exist?  You can leverage GAE's urlfetch lib and make a remote
 call if Babelfish has a REST interface.

 On 8/2/09, Emilien Klein emilien.kl...@gmail.com wrote:







  OK, thanks Rodrigo for the link to Babel. I had already seen it, but
  never used it.
  The problem I see with using Babel is that it IS an external library,
  which means that I need to integrate it with my project. What I'm
  looking for is a way to have a translated application WITHOUT having
  to install any external library...

  I am looking at
 http://makeyjl.blogspot.com/2009/02/using-djangos-i18n-in-google-app-...
  right now, and (while I'm not done playing around) I have already been
  able to generate .po files, and my application still works OK. I'm
  going to continue playing around, and then I'll report here about how
  it went. If everything works fine I might even write a Knol article to
  explain my steps (the article is not 100% accurate, I had to find out
  to add {% load i18n %} in the templates for instance...

  If anyone has another way of translating App Engine applications using
  only the available tools, fell free to share it!

  On 31 juil, 18:17, Rodrigo Moraes rodrigo.mor...@gmail.com wrote:
  Now, anwering some other questions.

   - I suppose that the .po / .mo files that open source projects
   traditionally use can not be used in the App Engine world?

  Yes, you can use those files with gettext functions. You'll probably
  need to wrap those functions and write some utilities to make it
  easier to use - but you don't need to do that because there are
  excellent libraries that have done it - Babel is the most known in the
  python world (I actually don't know any other).

   - Would you have various template files for each languages (like a
   contact.en.html, contact.fr.html, contact.nl.html, etc.) and use the
   appropriate file depending on the language that has been detected from
   the browser header?

  No! You would use one template, and have the strings wrapped by a
  translation function. The convention is to use a function name _.
  Like:

  {{ _(This is my string - I'll translate it later, and if not it'll be
  in English forever.) }}

  There are issues you'll find, like how to handle singular/plural and
  string replacements, but existing solutions cover that.

   - Would you use a single template file, but pass it the strings one by
   one that you would retrieve from the datastore (ouch, just writing
   this solution hurts!)

  Absolutelly no. The strings are stored in a .po file, which you
  compile into a .mo file. This if you go for the widely used gettext.

   Note: if you execute the following command from inside the GAE dev
   server folder:
   find | xargs -i grep -iH i18n \{\}
   you will see that a lot of files contain the string i18n, and that all
   are related to django. Does that mean that we could use standard
   Django internationalization techniques, or is it just that Google 
   forgot  to remove those files?

  I tried to use Django's i18n. Unfortunately Django is too tied to
  itself and that library is not reusable outside of Django. Fortunately
  later I found a standalone, reusable, well written one: Babel. It
  works very well.

  -- rodrigo

 --
 Sent from my mobile device
--~--~-~--~~~---~--~~
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] Do highly indexed entities take up more storage space?

2009-08-01 Thread Kyle Jensen

Hi,

I 'put' a few thousand highly indexed entities into the datastore
yesterday and I felt like they used up a lot of my 'storage quota'
even though the entities had few properties

Do highly indexed entities take up more storage space?

Thanks! Kyle
--~--~-~--~~~---~--~~
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: Do highly indexed entities take up more storage space?

2009-08-01 Thread 风笑雪
Of course they do, every index takes up some space.

2009/8/2 Kyle Jensen kljen...@gmail.com


 Hi,

 I 'put' a few thousand highly indexed entities into the datastore
 yesterday and I felt like they used up a lot of my 'storage quota'
 even though the entities had few properties

 Do highly indexed entities take up more storage space?

 Thanks! Kyle
 


--~--~-~--~~~---~--~~
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] UnicodeEncodeError when using bulkupload to download from datastore

2009-08-01 Thread iceanfire

I'm getting the following error when I download from the datastore:

UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in
position 265: ordinal not in range(128)

I tracked this error down to a 'TextProperty' Field in the datastore.
Any idea how I should deal with this?

Also, I had a quick question about using the bulkupload.py tool.
Initially, I had wanted to use it to backup the datastore--incase
(during my experimentation) I accidentally messed up anything.
However, now that I think about it, it'll be almost impossible to do
this if my datastore structure uses reference properties right?
Because deleting a table and then re-uploading it would change all the
keys etc... Any way around this?


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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: UnicodeEncodeError when using bulkupload to download from datastore

2009-08-01 Thread Holger

What's the name of your 'TextProperty' field?

 I tracked this error down to a 'TextProperty' Field in the datastore.
If this name should contain strange letters (ÄÜÖ etc) try changing the
name.

---
Re Datastore upload: That's an important question - would be
interested in an answer too.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---