[google-appengine] Re: Can we do it in GAE

2009-01-13 Thread Jonk

On 14 tammi, 09:32, arnie  wrote:

> Is it possible to convert a physical location [such as address of a
> company] into co-ordinates [Latitude and Longitude]. I have seen this


http://code.google.com/apis/maps/documentation/services.html#Geocoding


j


--~--~-~--~~~---~--~~
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] Can we do it in GAE

2009-01-13 Thread arnie

Hi all
Is it possible to convert a physical location [such as address of a
company] into co-ordinates [Latitude and Longitude]. I have seen this
link
http://groups.google.com/group/Google-Maps-API/web/resources-non-google-geocoders
but does not get an idea of how to do it in GAE?
Any idea?
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: WYSIWYG Editor for App Engine

2009-01-13 Thread Lacrima

I am not sure that is what you are looking for, but try this:
http://code.google.com/p/app-engine-site-creator/



On Jan 13, 12:21 pm, Ashu  wrote:
> I have coded up the necessary logic, but now I am stuck trying to come
> with a descent looking Form to take input from the user. Are there any
> plugins or tools available to get the HTML part coded with ease.
>
> 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] Model.put() Override?

2009-01-13 Thread Devel63

I overrode the put method on a class derived from Model, primarily
because I wanted to do some accounting work when a new object was
saved (in the simplest case, just keeping track of a counter).  It
does its work, then calls super.

It works fine.

Until I use db.put([ob1,obj2,obj3]) to save a bunch of these, and then
of course the individual object.put() functions are never called.

Is there a best practice for this?  I really liked having it in the
"put", because then no caller needed to know about it, and it just
took care of itself.  Is the best thing to precede every "put" call
with an explicit "put_prep" call?
--~--~-~--~~~---~--~~
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: Configuring Friend Connect

2009-01-13 Thread benzrad

thx. i found ur answer on ur blog, and its works well. too nice!
now i hope i have a script to switch different friend connect script
according visiting url. u know, my appspot with custom domain mapping
blocked in China surveillance, while native appspot, like 
http://app21zh.appspot.com
, accessible in China. i had setup both domain, http://forum.be21zh.org
, and http://app21zh.appspot.com with my google friend connect. i hope
my appspot can returned respectively according visiting url.
thx again.

--~--~-~--~~~---~--~~
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: ifequal and filters, not working

2009-01-13 Thread boson

If you're creating custom tags, you could make one that does your
string-date comparison and conditionally includes its contents too, or
whatever you need like "ifmonthequal" or "ifdayequal".

Also - do custom tags need to be paired in open/close with contents?
I.e. could you make a version of {% with %} that just assigns a
variable from then on, without requiring a closing {% endwith %}?  I
haven't played with that aspect of templates much.


On Jan 13, 3:37 pm, Elvis  wrote:
> Thank you boson!
>
> I think that way not a very good, because try get simle logic in
> templates
>
> I create a new custom tag {% with %}, i just get it from django
>
> if somebody intrested
>
> == templatetags.py
> #!/usr/bin/env python
> #
> # From Django 1.0.2
> #
>
> """Django custom template tags."""
>
> from google.appengine.ext.webapp import template
> from django.template import Library
> from django.template import Node
>
> class WithNode(Node):
>     def __init__(self, var, name, nodelist):
>         self.var = var
>         self.name = name
>         self.nodelist = nodelist
>
>     def __repr__(self):
>         return ""
>
>     def render(self, context):
>         val = self.var.resolve(context)
>         context.push()
>         context[self.name] = val
>         output = self.nodelist.render(context)
>         context.pop()
>         return output
>
> def do_with(parser, token):
>     """
>     Adds a value to the context (inside of this block) for caching and
> easy
>     access.
>
>     For example::
>
>         {% with person.some_sql_method as total %}
>             {{ total }} object{{ total|pluralize }}
>         {% endwith %}
>     """
>     bits = list(token.split_contents())
>     if len(bits) != 4 or bits[2] != "as":
>         raise TemplateSyntaxError("%r expected format is 'value as
> name'" %
>                                   bits[0])
>     var = parser.compile_filter(bits[1])
>     name = bits[3]
>     nodelist = parser.parse(('endwith',))
>     parser.delete_first_token()
>     return WithNode(var, name, nodelist)
>
> # Register the filter functions with Django
> register = template.create_template_register()
> do_with = register.tag('with', do_with)
>
> == some.py
> ...
> from google.appengine.ext.webapp import template
> ...
> template.register_template_library('templatetags')
> ...
>
> == templ.html
> ...
> {% with game.date|date:"n" as startmonth %}
> {% with game.enddate|date:"n" as endmonth %}
> {% with game.date|date:"d" as startday %}
> {% with game.enddate|date:"d" as endday %}
>         {% ifnotequal startmonth endmonth %}
>
>                 {{ game.date|date:"d M" }} — {{ game.enddate|date:"d M" 
> }}
>
>         {% else %}
>
>                 {% ifnotequal startday endday %}
>
>                         {{ game.date|date:"d" }} — {{ 
> game.enddate|date:"d M" }}
>
>                 {% else %}
>
>                         {{ game.date|date:"d M" }}
>
>                 {% endifnotequal %}
>
>         {% endifnotequal %}
> {% endwith %}
> {% endwith %}
> {% endwith %}
> {% endwith %}
> ...
>
> I think my way is very ugly* but i very green in python, django and
> appengine
>
> thanks to all
>
> may be somebody have a something to say?
--~--~-~--~~~---~--~~
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: App Engine Deep Zoom of 100 Megapixel image

2009-01-13 Thread antsyawn

Thanks Tom :)

One of the Seadragon guys suggested I use png's instead of jpg's
because the image has a lot of flat color in it - it shrunk the data
down from 93mb to only 25mb, so it runs a bunch faster now.

Strangely, the admin dashboard for the app says I only have "0.02 of
0.50 Gbytes (5%)" of stored data, which surely means 20mb. I know for
sure that I have over 100mb of data stored in there. I'm wondering if
something to do with rolling your version number stuffs this figure
up...

http://lovepixelzoom.appspot.com

On Jan 12, 12:18 am, Tom  wrote:
> Fun!  Good work
>
> On Jan 10, 2:19 am, antsyawn  wrote:
>
>
>
> > I thought I'd post a mashup I put together using App Engine. It uses
> > Microsoft Seadragon and Lovepixel's 1x1 cityscape.
>
> > The Seadragon data weighs in at 93mb and is composed of over 2000
> > files.
>
> > I recommend viewing with Chrome, since it's by far the fastest for
> > this site.
>
> >http://lovepixelzoom.appspot.com- 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: user login URLs in html/javascript

2009-01-13 Thread thebrianschott

Well, my guru used Django templates, but I just used his {{...}}
tricks and never read the material use recommended. Now I have and I
see what you mean. I'll make a concerted effort to implement that with
my home page as you recommend. Thanks very much.

On Jan 12, 7:41 pm, djidjadji  wrote:
> Do you use (Django) templates?
> If not start using them, separate the function (code) from the
> presentation (html)
>
> Read the GAE example
>
> http://code.google.com/appengine/docs/gettingstarted/templates.html
>
> There they show you how to use the
> users.create_logout_url()
> users.create_login_url()
> methods in templates, read the Django doc about templates for version
> 0.96 for more things you can do.
>

 Brian in Atlanta
--~--~-~--~~~---~--~~
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 search Chinese using SearchableModel

2009-01-13 Thread @@
直接用中文说吧
要实现这个你需要自己把model中的string或者unicode的property 自己分词后再放到StringListProperty中。
对search的文字也需要做一个分词 然后用分词得到词去你保存分词的StringListProperty中查询

可以看看这里
http://www.until.cn/tag/分词 
页面上的搜索可以试试看

现在虽然可以做到,但是分词需要的词库是一个挺麻烦的问题。
gae上不允许放1m以上的文件,字库我是放在datastore里的。这样很容易就会出现DeadlineExceededError


On Tue, Dec 2, 2008 at 7:36 PM, lookon  wrote:

>
> the code is here:
>
> http://code.google.com/p/googleappengine/source/browse/trunk/google/appengine/ext/search/__init__.py?r=27
>
> how to rewrite it to make it suitable for search Chinese(or other
> language)?
>
> currently the SearchableModel can not search Chinese

--~--~-~--~~~---~--~~
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 search Chinese using SearchableModel

2009-01-13 Thread Tom

http://groups.google.com/group/google-appengine/browse_thread/thread/12cf67c2f0d2af58/320f7e43c3ce3baf?show_docid=320f7e43c3ce3baf

This thread may help you

On Dec 2 2008, 6:36 am, lookon  wrote:
> the code is 
> here:http://code.google.com/p/googleappengine/source/browse/trunk/google/a...
>
> how to rewrite it to make it suitable for searchChinese(or other
> language)?
>
> currently theSearchableModelcan not searchChinese
--~--~-~--~~~---~--~~
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: Global Time Synchronisation Guarantees

2009-01-13 Thread Anders

Yes, but the important thing is that the ordering of the messages is
correct, and the number sequences will ensure that. Hopefully the time
difference between servers will usually be just a few seconds. In the
worst case scenario the time presented to the users can be removed
entirely, but that will I hope not be needed.

I will add a fix for the transition zone between 'seconds ago' and '1
minute ago' which still can become presented in the wrong order, even
when the time difference between servers is just a few seconds.

On Jan 14, 2:00 am, Cesium  wrote:
> On Jan 13, 4:59 pm, Anders  wrote:
>
> > I have now solved it by using sequence counters and instead of
> > presenting 'N seconds ago' to the users it now says 'seconds ago'. It
> > should work as long as the time difference between servers is less
> > than one minute.
>
> Remember, "no guarantees" about the server's clock.
> Cesium
--~--~-~--~~~---~--~~
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: Global Time Synchronisation Guarantees

2009-01-13 Thread Cesium

On Jan 13, 4:59 pm, Anders  wrote:
> I have now solved it by using sequence counters and instead of
> presenting 'N seconds ago' to the users it now says 'seconds ago'. It
> should work as long as the time difference between servers is less
> than one minute.
>

Remember, "no guarantees" about the server's clock.
Cesium

--~--~-~--~~~---~--~~
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: Processing a number from a FORM

2009-01-13 Thread djidjadji

self.response.out.write( primality(int(str(self.request.get('content' )

The get() returns a unicode string. You need str() and int() to
convert to a parameter that
primality() understands. Print does not work on GAE. Have a second
look at the 'Getting Started'' Example.

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

2009/1/13 Joaquim :
>
> Hi !!
>
> I'm pretty new to web development and I am trying to do a script that
> show a FORM where you can write a number and when you hit a button,
> the script does some stuff with this number and prints you a result.
>
> I am using the web apps examples from the begginer guide, but I am
> stuck at the part of moving the number writed in the form.
>
> I understand pretty much all the code, but when the user clicks and my
> class executes...
>
> class Primalidad(webapp.RequestHandler):
>  def post(self):
>print primality(cgi.escape(self.request.get('content')))
>
> and then I have a function called 'primality' that obviously checks if
> the number is prime and prints "True" or "False"
>
> Actually all I have is a big "Error: Server Error"
>
> Well I hope I eplained myself as good as I think, see if somebody can
> hel me over here.
>
> Thank you!!
>
> >
>

--~--~-~--~~~---~--~~
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: maximum number of versions

2009-01-13 Thread Anders

Hi-

I am also having that problem and have similarly tried deleting old
version, updating old and major versions, etc.

App id:

gazebogorillas

Thanks for any help you can provide.

-Anders

On Jan 13, 9:30 am, Marzia Niccolai  wrote:
> Hi,
>
> Can you please provide the app id?
>
> -Marzia
>
> On Mon, Jan 12, 2009 at 9:49 PM, interf...@gmail.com
>
>  wrote:
>
> > I'm getting the same error. I deleted an older version of my app, and
> > when that didn't fix it I upped my major version. Neither helped. I
> > can't update my app :O
>
> > On Jan 5, 10:09 am, Marzia Niccolai  wrote:
> >> Hi,
>
> >> Are you experiencing this still?  This error, when it appears, should only
> >> be transient, and I believe it should have been resolved shortly after you
> >> were seeing it three days ago.
>
> >> -Marzia
>
> >> On Fri, Jan 2, 2009 at 10:21 AM, bFlood  wrote:
>
> >> > Marzia-
>
> >> > this is happening again, it was working fine all morning and then all
> >> > of a sudden I keep getting that error again
>
> >> > cheers
> >> > brian
>
> >> > On Dec 22 2008, 10:36 am, bFlood  wrote:
> >> > > just wanted to reply to the group for future users. the app started
> >> > > working again about an hour after Marzia posted so I'm assuming he did
> >> > > somethign in the background
>
> >> > > cheers
> >> > > brian
>
> >> > > On Dec 18, 2:16 pm, Marzia Niccolai  wrote:
>
> >> > > > Hi,
>
> >> > > > Thanks for the info, I'm looking in to this now.
>
> >> > > > If anyone else is experiencing this, please let me know.
>
> >> > > > -Marzia
>
> >> > > > On Thu, Dec 18, 2008 at 11:14 AM, bFlood  wrote:
>
> >> > > > > I keep getting this error when publishing:
>
> >> > > > >TooManyVersions(403)
> >> > > > > The application already has the maximum number ofversions
>
> >> > > > > when I checked the forum, the best advise was to up major version
> >> > > > > number which I did (from 1 to 2). This worked for about an hour and
> >> > > > > now I'm getting the same error again (and I can confirm that url's
> >> > > > > sent via appcfg.py have the proper "2" in the version). I doubt my
> >> > > > > version 2 has gone over the limit already so I'm thinking something
> >> > > > > else is wrong
>
> >> > > > > any suggestions? (besides going to V3)
>
> >> > > > > appID: dev-arc2earth
>
> >> > > > > cheers
> >> > > > > 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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Converting "François Pétill ant" to UTF-8

2009-01-13 Thread Tom

SearchableModel source
http://code.google.com/p/googleappengine/source/browse/trunk/google/appengine/ext/search/__init__.py?r=27

I am going to attempt to make the SearchableModel handle adding the
normalized forms of words automatically.  I'll report back with my
progress.  Wish me luck!


On Jan 13, 3:55 pm, Tom  wrote:
> Very helpful!
>
> On Jan 13, 1:18 pm, Chris Tan  wrote:
>
> > I've been using the code below for normalization.  Any characters
> > without
> > ascii equivalents are stripped:
>
> > import unicodedata
>
> > nfkd = unicodedata.normalize('NFKD', data)
> > normalized = nfkd.encode('ascii', 'ignore').lower()
>
> > It seems to work well so far for prefix suggest, except when the
> > datastore
> > query contains spaces it will fail.  Ideas anyone?
>
> > On Jan 13, 8:25 am, Tom  wrote:
>
> > > I need some suggestions/guidance on how to handle strings that contain
> > > characters like "François Pétillant".
>
> > > I have several problems.
>
> > > First, I do want to store these names in their original encoding
> > > (which I think I can do in a db.Text object).
>
> > > I also want to be able to search their names with or without the
> > > special characters.  (eg. "François" and "Francois" would both in the
> > > SearchableModel's tags)  Any utility to convert sensibly?
>
> > > Finally, I want to be able to send back the name in utf-8 in a format
> > > that can be converted back to the original on the user side.  (In this
> > > specific case the wine name is being sent back to my android phone
> > > app.)
>
>
--~--~-~--~~~---~--~~
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: Global Time Synchronisation Guarantees

2009-01-13 Thread Anders

I have now solved it by using sequence counters and instead of
presenting 'N seconds ago' to the users it now says 'seconds ago'. It
should work as long as the time difference between servers is less
than one minute.

On Jan 13, 9:17 pm, Anders  wrote:
> Using a global sequence number ensures correct ordering of records but
> not correct ordering of timestamps. If in a chat application the time
> is presented to the users with a resolution of seconds, then it may
> happen that the timestamps presented will sometimes have incorrect
> ordering (such as the newest message being presented as 15 seconds old
> while the second newest message is presented as being 7 seconds old).
> This is perhaps only a minor problem but anyway.
>

--~--~-~--~~~---~--~~
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] exception handling - datastore and more generally?

2009-01-13 Thread SM

Hi,

Are there examples for how to best handle exceptions raised by app
engine? There was a thread from October where someone had asked about
datastore exceptions and it sounded like there were not yet any docs
on this.

It would be great to see some code examples of best practices for
writing resilient app engine code.

Thank you.

--~--~-~--~~~---~--~~
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: ifequal and filters, not working

2009-01-13 Thread Elvis

Thank you boson!

I think that way not a very good, because try get simle logic in
templates

I create a new custom tag {% with %}, i just get it from django

if somebody intrested

== templatetags.py
#!/usr/bin/env python
#
# From Django 1.0.2
#

"""Django custom template tags."""

from google.appengine.ext.webapp import template
from django.template import Library
from django.template import Node


class WithNode(Node):
def __init__(self, var, name, nodelist):
self.var = var
self.name = name
self.nodelist = nodelist

def __repr__(self):
return ""

def render(self, context):
val = self.var.resolve(context)
context.push()
context[self.name] = val
output = self.nodelist.render(context)
context.pop()
return output

def do_with(parser, token):
"""
Adds a value to the context (inside of this block) for caching and
easy
access.

For example::

{% with person.some_sql_method as total %}
{{ total }} object{{ total|pluralize }}
{% endwith %}
"""
bits = list(token.split_contents())
if len(bits) != 4 or bits[2] != "as":
raise TemplateSyntaxError("%r expected format is 'value as
name'" %
  bits[0])
var = parser.compile_filter(bits[1])
name = bits[3]
nodelist = parser.parse(('endwith',))
parser.delete_first_token()
return WithNode(var, name, nodelist)

# Register the filter functions with Django
register = template.create_template_register()
do_with = register.tag('with', do_with)

== some.py
...
from google.appengine.ext.webapp import template
...
template.register_template_library('templatetags')
...

== templ.html
...
{% with game.date|date:"n" as startmonth %}
{% with game.enddate|date:"n" as endmonth %}
{% with game.date|date:"d" as startday %}
{% with game.enddate|date:"d" as endday %}
{% ifnotequal startmonth endmonth %}

{{ game.date|date:"d M" }} — {{ game.enddate|date:"d M" }}

{% else %}

{% ifnotequal startday endday %}

{{ game.date|date:"d" }} — {{ 
game.enddate|date:"d M" }}

{% else %}

{{ game.date|date:"d M" }}

{% endifnotequal %}

{% endifnotequal %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
...

I think my way is very ugly* but i very green in python, django and
appengine

thanks to all

may be somebody have a something to say?
--~--~-~--~~~---~--~~
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] Processing a number from a FORM

2009-01-13 Thread Joaquim

Hi !!

I'm pretty new to web development and I am trying to do a script that
show a FORM where you can write a number and when you hit a button,
the script does some stuff with this number and prints you a result.

I am using the web apps examples from the begginer guide, but I am
stuck at the part of moving the number writed in the form.

I understand pretty much all the code, but when the user clicks and my
class executes...

class Primalidad(webapp.RequestHandler):
  def post(self):
print primality(cgi.escape(self.request.get('content')))

and then I have a function called 'primality' that obviously checks if
the number is prime and prints "True" or "False"

Actually all I have is a big "Error: Server Error"

Well I hope I eplained myself as good as I think, see if somebody can
hel me over here.

Thank you!!

--~--~-~--~~~---~--~~
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] Logs not showing any log messages, reports HTTP error instead

2009-01-13 Thread Niranjan

HTTP response was too large: 1431311. The limit is: 1048576.

application: easychatroom

How can I fix/reset this.

Thanks,
Niranjan

--~--~-~--~~~---~--~~
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] OverQuotaError handling and custom error page

2009-01-13 Thread Juan Luis Belmonte Mendez

Hi all.
The quota problems that we are having is about the "High CPU Requests"
Quota. Everything else is Ok.

We are trying to handle the OverQuotaError, and will be lovely to show
our users a customized page explaining what is going on instead
google's overquota error page.

Wen I raise the exception to try if the try-except is working, it
works ok. But Not in real overquotas.

Adding some  logging I've seen that when we are experimenting an
overquota it seems that the application is not executed. I wonder
that, when this kind of overquota happens, appengine manage it self
the error and the get() don't even reach our application code.

The question is that if someone knows how to manage this or if there
is any workaround to manage the overquota, before appengine cancels
the requests to the application and send it's  overquotaerror page.

Thanks for all.
Regards

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



[google-appengine] Re: ifequal and filters, not working

2009-01-13 Thread boson

If you need to compare derived items (beyond what the template engine
can manage), then you need to prepare them in Python.  In the case you
mentioned, that means 1) add Python code to your handler to convert
dates to string representations and 2) make those strings available to
your template for comparison.


On Jan 12, 4:32 pm, Elvis  wrote:
> Wery strange!
>
> I try to use ifequal with filters and it dosent work
>
> i search around web and found this is a normal
>
> but in october ive write very similar code and it working! i lost my
> working code and now try to rewite
>
> in appengine i cant use {% with ... %} because it dosent exists
>
> what you doif you need functionality like that:
>
> {% ifequal date|date:¨n¨ enddate|date:¨n¨ %}
>  do some
> {% else %}
> do some another
> {% endifequal %}
>
> any ideas^how to do it in templates?
--~--~-~--~~~---~--~~
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] Silicon Valley App Engine Developer meetup next Tuesday, Jan 20

2009-01-13 Thread Bill

The Silicon Valley App Engine Developer meetup is starting off the new
year reinvigorated with a nice venue provided by TIPS Group in Palo
Alto.

Topic: Hacking App Engine (or how to dig into lower level APIs and
customize them to your needs)

Speaker: Jens Scheffler (author of App Engine Fan blog),
http://blog.appenginefan.com/
Also Pete Koomen, Product Manager of App Engine, will talk about new
features and provide an update on the platform progress.

Location: TIPS Group, 1000 Elwell Ct, Palo Alto, CA 94303 (NOTE
LOCATION CHANGE)

Time: 7 pm, Tuesday, Jan 20, 2009

Schedule:
- Update on Google App Engine
- Main Talk on Hacking App Engine
- Lightning Talks

We'll have some time for prearranged lightning talks, so if you have a
demo of something running on App Engine, drop me a line.

For more details and to RSVP, visit:
http://web.meetup.com/116/calendar/9332524/
--~--~-~--~~~---~--~~
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: Converting "François Pétill ant" to UTF-8

2009-01-13 Thread Tom

Very helpful!

On Jan 13, 1:18 pm, Chris Tan  wrote:
> I've been using the code below for normalization.  Any characters
> without
> ascii equivalents are stripped:
>
> import unicodedata
>
> nfkd = unicodedata.normalize('NFKD', data)
> normalized = nfkd.encode('ascii', 'ignore').lower()
>
> It seems to work well so far for prefix suggest, except when the
> datastore
> query contains spaces it will fail.  Ideas anyone?
>
> On Jan 13, 8:25 am, Tom  wrote:
>
> > I need some suggestions/guidance on how to handle strings that contain
> > characters like "François Pétillant".
>
> > I have several problems.
>
> > First, I do want to store these names in their original encoding
> > (which I think I can do in a db.Text object).
>
> > I also want to be able to search their names with or without the
> > special characters.  (eg. "François" and "Francois" would both in the
> > SearchableModel's tags)  Any utility to convert sensibly?
>
> > Finally, I want to be able to send back the name in utf-8 in a format
> > that can be converted back to the original on the user side.  (In this
> > specific case the wine name is being sent back to my android phone
> > app.)
>
>
--~--~-~--~~~---~--~~
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: Multiple WSGI apps

2009-01-13 Thread djidjadji

Yes, I only gave you some of the handlers of the app.yaml file.
How do you get an app working without the header in app.yaml?
When you put in the correct header does it work what you want?

2009/1/13 arnie :
>
> I have tried doing
> - url: /app1/.*
>  script: App1.py
>
> - url: /app2/.*
>  script: App2.py
> but it is not working. Also what about the other parameters in the
> yaml file
> application: appname
> version: 1
> runtime: python
> api_version: 1
> Will these not be included in in above case?
> 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: Global Time Synchronisation Guarantees

2009-01-13 Thread Anders

Using a global sequence number ensures correct ordering of records but
not correct ordering of timestamps. If in a chat application the time
is presented to the users with a resolution of seconds, then it may
happen that the timestamps presented will sometimes have incorrect
ordering (such as the newest message being presented as 15 seconds old
while the second newest message is presented as being 7 seconds old).
This is perhaps only a minor problem but anyway.

On Jan 12, 7:23 pm, Brett Slatkin  wrote:
>
> If you need a guaranteed ordering of time, there are a few ways to do
> this. One simple way is to use a set of incrementing sequence numbers
> in the Datastore. Every time an event happens, you transactionally
> increment the sequence number and write the event record to the
> Datastore. Then it doesn't matter what the timestamp is on the record,
> the events will always be ordered by the absolute time that they came
> in. This has some scalability issues (because you essentially have a
> global counter). But if you can partition your data reasonably, you
> could probably optimize throughput quite a bit.
>

--~--~-~--~~~---~--~~
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: Global Time Synchronisation Guarantees

2009-01-13 Thread Cesium

djidjadji wrote:
> You have no knowledge when your request is executed on the server.
> Launching a new interpreter takes time, the server is busy processing
> other requests. If the time of the data is important you should take a
> time measurement at the sensor and send it as part of the request

Correct!

David Symonds wrote:
> Why don't you get your sensors to track their own time?

Right on!

On Jan 13, 9:11 am, rvjcallanan  wrote:
>
> In summary, from reading all posts, I think the best solutions for the
> two scenarios presented are:
>
> SENSOR APPLICATIONS:
> Sensors need to timestamp packets themselves e.g. a cellphone-based
> system can sync to NTP.
> So this should not be in Google's problem domain
>

Whoa! Wait a second! (pun intended)
My sensors already speak HTTP over Ethernet to port 80 on a server.
Time transfer over Ethernet is a time honored tradition and serves
nicely in my application. I can sync my sensor's local clock to GAE
servers easily. (I'm doing that now.)

The addition of a hardware solution at each node is simply
not practical in my case.

My sensors are:
-low power (powered by 2 ea. AA batteries for 1 year.)
-small (think deck of cards)
-inexpensive (BOM cost under $30 US)
-sometimes indoors (think no reception of outside radio time signals).

The problem of accurate time synchronization across large computer
networks
was solved years ago. Google simply needs to step up and clarify
that, "Yea, we do that." Because, well..., because... They already do!
(And pretty nicely at that!)

This is a communication issue (between GAE developers and Google),
*not* a technical issue.

Cesium


--~--~-~--~~~---~--~~
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: Converting "François Pétill ant" to UTF-8

2009-01-13 Thread Chris Tan

I've been using the code below for normalization.  Any characters
without
ascii equivalents are stripped:

import unicodedata

nfkd = unicodedata.normalize('NFKD', data)
normalized = nfkd.encode('ascii', 'ignore').lower()

It seems to work well so far for prefix suggest, except when the
datastore
query contains spaces it will fail.  Ideas anyone?


On Jan 13, 8:25 am, Tom  wrote:
> I need some suggestions/guidance on how to handle strings that contain
> characters like "François Pétillant".
>
> I have several problems.
>
> First, I do want to store these names in their original encoding
> (which I think I can do in a db.Text object).
>
> I also want to be able to search their names with or without the
> special characters.  (eg. "François" and "Francois" would both in the
> SearchableModel's tags)  Any utility to convert sensibly?
>
> Finally, I want to be able to send back the name in utf-8 in a format
> that can be converted back to the original on the user side.  (In this
> specific case the wine name is being sent back to my android phone
> app.)
--~--~-~--~~~---~--~~
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: Converting "François Pétill ant" to UTF-8

2009-01-13 Thread Geoffrey Spear

That sounds like a bug in the dev server datastore viewer.  The
production datastore viewer handles unicode just fine.

As for searching, my suggestion would be to store a normalized version
of whatever strings you want to be able to search, then use the same
normalization on search strings before searching.  I have no idea if a
tool to do this normalization exists already; my experience with
encodings is almost entirely perl-based.

On Jan 13, 11:38 am, Tom  wrote:
> It does seem like the name "François Pétillant" is being stored
> successfully on the server and is queryable.  However, when I use the
> Datastore Viewer I get the error below.
>
> Any help in guiding me along the do's/don'ts of character encodings
> would be most appreciated.
> Thanks!
> Tom
>
> Traceback (most recent call last):
>   File "/cygdrive/c/Program Files/Google/google_appengine/google/
> appengine/ext/webapp/__init__.py", line 499, in __call__
>     handler.get(*groups)
>   File "/cygdrive/c/Program Files/Google/google_appengine/google/
> appengine/ext/admin/__init__.py", line 520, in get
>     value = DataType.get(raw_value).format(raw_value)
>   File "/cygdrive/c/Program Files/Google/google_appengine/google/
> appengine/ext/admin/__init__.py", line 852, in format
>     writer.writerow(value)
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe7' in
> position 4: ordinal not in range(128)
>
> On Jan 13, 11:25 am, Tom  wrote:
>
> > I need some suggestions/guidance on how to handle strings that contain
> > characters like "François Pétillant".
>
> > I have several problems.
>
> > First, I do want to store these names in their original encoding
> > (which I think I can do in a db.Text object).
>
> > I also want to be able to search their names with or without the
> > special characters.  (eg. "François" and "Francois" would both in the
> > SearchableModel's tags)  Any utility to convert sensibly?
>
> > Finally, I want to be able to send back the name in utf-8 in a format
> > that can be converted back to the original on the user side.  (In this
> > specific case the wine name is being sent back to my android phone
> > app.)
--~--~-~--~~~---~--~~
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: why the computer says "NameError: name 'execfile' is not defined"

2009-01-13 Thread Ludovit Scholtz

I have found out that Google app egine sdk does not run on
python-3.0rc3
(it works with 2.6.1)

LS

On 4. Jan, 09:37 h., Lance  wrote:
> when I just run the demo on my computer
> it says that.
> I am the newer.I am download the Google App Engine SDK.Please help
> thanks
>
> C:\Program Files\Google\google_appengine>dev_appserver.py demo
> Traceback (most recent call last):
>   File "C:\Program Files\Google\google_appengine\dev_appserver.py",
> line 50, in
> 
>     execfile(script_path, globals())
> NameError: name 'execfile' is not defined

--~--~-~--~~~---~--~~
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: maximum number of versions

2009-01-13 Thread Marzia Niccolai

Hi,

Can you please provide the app id?

-Marzia

On Mon, Jan 12, 2009 at 9:49 PM, interf...@gmail.com
 wrote:
>
> I'm getting the same error. I deleted an older version of my app, and
> when that didn't fix it I upped my major version. Neither helped. I
> can't update my app :O
>
> On Jan 5, 10:09 am, Marzia Niccolai  wrote:
>> Hi,
>>
>> Are you experiencing this still?  This error, when it appears, should only
>> be transient, and I believe it should have been resolved shortly after you
>> were seeing it three days ago.
>>
>> -Marzia
>>
>> On Fri, Jan 2, 2009 at 10:21 AM, bFlood  wrote:
>>
>> > Marzia-
>>
>> > this is happening again, it was working fine all morning and then all
>> > of a sudden I keep getting that error again
>>
>> > cheers
>> > brian
>>
>> > On Dec 22 2008, 10:36 am, bFlood  wrote:
>> > > just wanted to reply to the group for future users. the app started
>> > > working again about an hour after Marzia posted so I'm assuming he did
>> > > somethign in the background
>>
>> > > cheers
>> > > brian
>>
>> > > On Dec 18, 2:16 pm, Marzia Niccolai  wrote:
>>
>> > > > Hi,
>>
>> > > > Thanks for the info, I'm looking in to this now.
>>
>> > > > If anyone else is experiencing this, please let me know.
>>
>> > > > -Marzia
>>
>> > > > On Thu, Dec 18, 2008 at 11:14 AM, bFlood  wrote:
>>
>> > > > > I keep getting this error when publishing:
>>
>> > > > >TooManyVersions(403)
>> > > > > The application already has the maximum number ofversions
>>
>> > > > > when I checked the forum, the best advise was to up major version
>> > > > > number which I did (from 1 to 2). This worked for about an hour and
>> > > > > now I'm getting the same error again (and I can confirm that url's
>> > > > > sent via appcfg.py have the proper "2" in the version). I doubt my
>> > > > > version 2 has gone over the limit already so I'm thinking something
>> > > > > else is wrong
>>
>> > > > > any suggestions? (besides going to V3)
>>
>> > > > > appID: dev-arc2earth
>>
>> > > > > cheers
>> > > > > 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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: maximum number of versions

2009-01-13 Thread interf...@gmail.com

I'm getting the same error. I deleted an older version of my app, and
when that didn't fix it I upped my major version. Neither helped. I
can't update my app :O

On Jan 5, 10:09 am, Marzia Niccolai  wrote:
> Hi,
>
> Are you experiencing this still?  This error, when it appears, should only
> be transient, and I believe it should have been resolved shortly after you
> were seeing it three days ago.
>
> -Marzia
>
> On Fri, Jan 2, 2009 at 10:21 AM, bFlood  wrote:
>
> > Marzia-
>
> > this is happening again, it was working fine all morning and then all
> > of a sudden I keep getting that error again
>
> > cheers
> > brian
>
> > On Dec 22 2008, 10:36 am, bFlood  wrote:
> > > just wanted to reply to the group for future users. the app started
> > > working again about an hour after Marzia posted so I'm assuming he did
> > > somethign in the background
>
> > > cheers
> > > brian
>
> > > On Dec 18, 2:16 pm, Marzia Niccolai  wrote:
>
> > > > Hi,
>
> > > > Thanks for the info, I'm looking in to this now.
>
> > > > If anyone else is experiencing this, please let me know.
>
> > > > -Marzia
>
> > > > On Thu, Dec 18, 2008 at 11:14 AM, bFlood  wrote:
>
> > > > > I keep getting this error when publishing:
>
> > > > >TooManyVersions(403)
> > > > > The application already has the maximum number ofversions
>
> > > > > when I checked the forum, the best advise was to up major version
> > > > > number which I did (from 1 to 2). This worked for about an hour and
> > > > > now I'm getting the same error again (and I can confirm that url's
> > > > > sent via appcfg.py have the proper "2" in the version). I doubt my
> > > > > version 2 has gone over the limit already so I'm thinking something
> > > > > else is wrong
>
> > > > > any suggestions? (besides going to V3)
>
> > > > > appID: dev-arc2earth
>
> > > > > cheers
> > > > > 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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: OpenID, is it good?

2009-01-13 Thread jay

I thought google was participating in Open ID now? Do our app engine
logins support OpenID's?

On Jan 10, 11:16 am, Mengsong Chen  wrote:
> I have just read something about OpenID. It seems a good solution, in
> particularly for mobile web apps.
>
> I wonder what is the general feedback for it?
> How is it compare it Google Login?
>
> Thanks,
>
> M

--~--~-~--~~~---~--~~
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: Unable to delete Indices

2009-01-13 Thread Marzia Niccolai

Hi,

If you reply to me with your app id, I can fix this.

-Marzia

On Mon, Jan 12, 2009 at 9:10 PM, Gipsy  wrote:
>
> How can I delete my unwanted indices ?.
> I've tried appcfg.py vacuum_indexes  and it said everything deleted
> successfully.  But dashboard still says that i am exceeding indices
> count quota. And the indices are in Building status.
>
> Please help.
>
>
>
> >
>

--~--~-~--~~~---~--~~
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: Format for Australian verification? Getting error.

2009-01-13 Thread jay

Hey Bannerdyne,

I don't remember exactly what I did, but one thing I always forget it
to drop the leading 0 on mobile numbers. So from the US to call an
Australian mobile you dial +61 and 9 numbers  (not 10)

On Jan 13, 12:53 pm, bannerdyne  wrote:
> Sorry about the multiple posts - i had a computer glitch causing me to
> post several times.
>
> Please delete this one if required.
>
> On Jan 13, 12:15 am, bannerdyne  wrote:
>
> > Hi,
>
> > I am using a supported Australian carrier but am getting the following
> > error when I try to verify.
>
> > There were errors: * Mobile Number or Username
>
> > I am using the following format 61  000 000. I have tried removing
> > spaces, adding + symbol.
>
> > Can you please tell me what the format for an Australian number should
> > be?
>
> > 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: why the computer says "NameError: name 'execfile' is not defined"

2009-01-13 Thread bijiasuo2...@gmail.com

you should install Python 2.6.1
i have successful, but i don't know why. I don't know Python

On Jan 4, 4:37 pm, Lance  wrote:
> when I just run the demo on my computer
> it says that.
> I am the newer.I am download the Google App Engine SDK.Please help
> thanks
>
> C:\Program Files\Google\google_appengine>dev_appserver.py demo
> Traceback (most recent call last):
>   File "C:\Program Files\Google\google_appengine\dev_appserver.py",
> line 50, in
> 
>     execfile(script_path, globals())
> NameError: name 'execfile' is not defined

--~--~-~--~~~---~--~~
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: Converting "François Pétill ant" to UTF-8

2009-01-13 Thread Tom

It does seem like the name "François Pétillant" is being stored
successfully on the server and is queryable.  However, when I use the
Datastore Viewer I get the error below.

Any help in guiding me along the do's/don'ts of character encodings
would be most appreciated.
Thanks!
Tom

Traceback (most recent call last):
  File "/cygdrive/c/Program Files/Google/google_appengine/google/
appengine/ext/webapp/__init__.py", line 499, in __call__
handler.get(*groups)
  File "/cygdrive/c/Program Files/Google/google_appengine/google/
appengine/ext/admin/__init__.py", line 520, in get
value = DataType.get(raw_value).format(raw_value)
  File "/cygdrive/c/Program Files/Google/google_appengine/google/
appengine/ext/admin/__init__.py", line 852, in format
writer.writerow(value)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe7' in
position 4: ordinal not in range(128)


On Jan 13, 11:25 am, Tom  wrote:
> I need some suggestions/guidance on how to handle strings that contain
> characters like "François Pétillant".
>
> I have several problems.
>
> First, I do want to store these names in their original encoding
> (which I think I can do in a db.Text object).
>
> I also want to be able to search their names with or without the
> special characters.  (eg. "François" and "Francois" would both in the
> SearchableModel's tags)  Any utility to convert sensibly?
>
> Finally, I want to be able to send back the name in utf-8 in a format
> that can be converted back to the original on the user side.  (In this
> specific case the wine name is being sent back to my android phone
> app.)
--~--~-~--~~~---~--~~
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] Converting "François Pétillant" to UTF-8

2009-01-13 Thread Tom

I need some suggestions/guidance on how to handle strings that contain
characters like "François Pétillant".

I have several problems.

First, I do want to store these names in their original encoding
(which I think I can do in a db.Text object).

I also want to be able to search their names with or without the
special characters.  (eg. "François" and "Francois" would both in the
SearchableModel's tags)  Any utility to convert sensibly?

Finally, I want to be able to send back the name in utf-8 in a format
that can be converted back to the original on the user side.  (In this
specific case the wine name is being sent back to my android phone
app.)

--~--~-~--~~~---~--~~
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: Global Time Synchronisation Guarantees

2009-01-13 Thread rvjcallanan

Many thanks for all the contributions to my original question.
Where there is a will...there is a way!

In summary, from reading all posts, I think the best solutions for the
two scenarios presented are:

SENSOR APPLICATIONS:
Sensors need to timestamp packets themselves e.g. a cellphone-based
system can sync to NTP.
So this should not be in Google's problem domain

INVOICE APPLICATIONS:
Use a single synchronisation object to increment numbers and adjust
timestamps "artificially" to keep them in sequence.
But as one wag once said...that's all very well in practice, but will
it work in theory?
I'm new to GAE, I wouldn't mind seeing some sample code for this
solution :-)
Any takers?




On Jan 13, 9:24 am, "David Symonds"  wrote:
> On Tue, Jan 13, 2009 at 7:25 AM, Cesium  wrote:
>
> >> What algorithm are you trying to implement that requires synchronized
> >> clocks? To my knowledge it's a pretty well-known best-practice to
> >> never rely on clocks being the same across a distributed system. Some
> >> algorithms can take advantage of closely correlated clocks, but I
> >> believe they never need anything better than the guarantees of NTP
> >> (http://en.wikipedia.org/wiki/Network_Time_Protocol), which is
> >> essentially what App Engine provides.
>
> > My application requires a time stamp from GAE that differs from
> > UTC by no more than 1s. (I'll worry about latencies.)
> > Imagine for example, a global network of sensors that measure
> > geophysical data. The usefulness of the data is degraded if there
> > is a large uncertainty surrounding the sample epoch (timestamp).
>
> Why don't you get your sensors to track their own time?
>
> 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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Can not delete entity using Data Viewer and a GQL query.

2009-01-13 Thread murexconsult...@googlemail.com

http://volvooceanracegamehelp.appspot.com/ is the URL.

I know I can delete programatically, but would rather use the tool you
provide for one-off deletes.

Thanks for the help.


Robin

PS I just tried again using gql:
SELECT * FROM UserUpdates
WHERE windAngle=328

And it is still not working.


On Jan 12, 9:39 pm, Marzia Niccolai  wrote:
> Hi,
>
> If you reply with your app id I can look in to it directly.
>
> If you can find the data in the dataviewer, however, you can get the
> key string (from the data's URL) and call db.delete() directly on that
> key in your application (if, for instance, you included something like
> shell with your application so you could run interactive commands).
>
> -Marzia
>
> On Sun, Jan 11, 2009 at 1:33 PM, murexconsult...@googlemail.com
>
>  wrote:
>
> > There was a bug in my app and some bad data got into the Datastore.
>
> > So I want to delete some data. The models have a number of items so
> > rather than paging through them all 20 at a time to find it I ran the
> > GQL query:
> > SELECT * FROM UserUpdates
> > WHERE windAngle=328
>
> > This returns one row as expected. I then click on the tickbox beside
> > it and click on Delete.
>
> > I then get a dialog box asking if I am sure to which I say yes.
>
> > I then get the error displayed in a red box at the top saying "The URL
> > to forward to once the request is fulfilled" - Yes the error is a
> > partial sentence and makes no sense.
>
> > The item is NOT deleted.
>
> > This is happening to all 4 of my models. However 2 of them only have a
> > few hundred entries, so I was able to page through, find the item and
> > delete it. When I paged through, the deleting was successful.
>
> > I think that there must be a bug in the data viewer when removing data
> > found using a gql query.
>
> > 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: typical scenario

2009-01-13 Thread arnie

I have tried both the method of
import statement

and __init__.py file

also created the PYTHONPATH variable in system settings [windows xp]
and given even the path C:\App\DB\ but it is not working
What i am be able to understand is that the python runtime is not able
to find the folder DB
--~--~-~--~~~---~--~~
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: Multiple WSGI apps

2009-01-13 Thread arnie

I have tried doing
- url: /app1/.*
  script: App1.py

- url: /app2/.*
  script: App2.py
but it is not working. Also what about the other parameters in the
yaml file
application: appname
version: 1
runtime: python
api_version: 1
Will these not be included in in above case?
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: WYSIWYG Editor for App Engine

2009-01-13 Thread Roberto Saccon

there are tools and plugins for everything available on the Internet.
Make your question more precise. Is the editor for natural language or
programming language (which one) ? If the later is the case, I
recommend CodeMirror, it has pluggable parsers, is framework
independent and if you look at the source code, it is one of the most
amazing pieces of JavaScript I have seen in the last years (and it is
also used at Google, but I forgot which project)

regards
Roberto

On Jan 13, 7:21 am, Ashu  wrote:
> I have coded up the necessary logic, but now I am stuck trying to come
> with a descent looking Form to take input from the user. Are there any
> plugins or tools available to get the HTML part coded with ease.
>
> 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 print it?

2009-01-13 Thread Alexander Kojevnikov

> > Hi all
> > For a data model class say
> > Person with certain fields,
> > how can i access the unique numeric ID field associated with each
> > entity in query?
> > I use
> > persons=db.GqlQuery('SELECT __key__ FROM Person')
> > for p in persons:
> >   self.response.out.write(how to print the ID field here)
>
> self.response.out.write(p.key().id())
>
You should also replace 'SELECT __key__' with 'SELECT *' in your GQL,
you cannot select individual properties.

--~--~-~--~~~---~--~~
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] WYSIWYG Editor for App Engine

2009-01-13 Thread Ashu

I have coded up the necessary logic, but now I am stuck trying to come
with a descent looking Form to take input from the user. Are there any
plugins or tools available to get the HTML part coded with ease.

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 print it?

2009-01-13 Thread David Symonds

On Tue, Jan 13, 2009 at 8:30 PM, arnie  wrote:

> Hi all
> For a data model class say
> Person with certain fields,
> how can i access the unique numeric ID field associated with each
> entity in query?
> I use
> persons=db.GqlQuery('SELECT __key__ FROM Person')
> for p in persons:
>   self.response.out.write(how to print the ID field here)

self.response.out.write(p.key().id())


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



[google-appengine] How to print it?

2009-01-13 Thread arnie

Hi all
For a data model class say
Person with certain fields,
how can i access the unique numeric ID field associated with each
entity in query?
I use
persons=db.GqlQuery('SELECT __key__ FROM Person')
for p in persons:
   self.response.out.write(how to print the ID field here)
--~--~-~--~~~---~--~~
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 connect two pc?

2009-01-13 Thread David Symonds

On Tue, Jan 13, 2009 at 5:48 PM, jasmine infenta
 wrote:

> FOR OUR PROJECT,WE NEED TO CONNECT TWO PC USING A LAN CABLE AND  FROM ONE
> PC,WE SHD BE ABLE TO ACCESS THE FILES STORED ON THE OTHER  PC WITHOUT USING
> IPADDRESS. IS  IT POSSIBLE? IF SO HOW?PLEASE DO REPLY US..

What you really need is a functional Caps Lock key so you can write
without all capitals.

How is your question at all related to App Engine?


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



[google-appengine] Re: Global Time Synchronisation Guarantees

2009-01-13 Thread David Symonds

On Tue, Jan 13, 2009 at 7:25 AM, Cesium  wrote:
>
>>
>> What algorithm are you trying to implement that requires synchronized
>> clocks? To my knowledge it's a pretty well-known best-practice to
>> never rely on clocks being the same across a distributed system. Some
>> algorithms can take advantage of closely correlated clocks, but I
>> believe they never need anything better than the guarantees of NTP
>> (http://en.wikipedia.org/wiki/Network_Time_Protocol), which is
>> essentially what App Engine provides.
>>
>
> My application requires a time stamp from GAE that differs from
> UTC by no more than 1s. (I'll worry about latencies.)
> Imagine for example, a global network of sensors that measure
> geophysical data. The usefulness of the data is degraded if there
> is a large uncertainty surrounding the sample epoch (timestamp).

Why don't you get your sensors to track their own time?


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