[google-appengine] Re: Does SDK datastore data upload with appcfg.py?

2009-01-02 Thread Alexander Kojevnikov

> Pardon what should be an obvious question, but I have been unable to
> find a simple declarative answer.  Is the development data in the dev
> server datastore uploaded by appcfg.py?
>
No, to upload the data you will need to use the bulk data uploader or
Gaebar:
 * http://code.google.com/appengine/articles/bulkload.html
 * http://aralbalkan.com/1837

--~--~-~--~~~---~--~~
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: Adding property to a Model

2009-01-02 Thread Alexander Kojevnikov

> I can insert new rows fine, and see them in the Development server
> datastore viewer. But when I try to access the new property contains
> "NoneType: None".
>
You can assign a default value to the property, it will be used when
an entity has no value for the property:

  boat = db.StringProperty(default='my default value')

> How can I force the Datastore to add this new property without having
> to delete all the old data and re-add?
>
You don't have to re-create your entities, if you want you can iterate
through them and update the property value:

  entity.boat = 'my default value'
  entity.put()

If you have many entities, you will have to do the update in multiple
requests, probably using the __key__ index to properly iterate over
all of them. But before doing this, consider using the 'default'
parameter first, it's much easier.
--~--~-~--~~~---~--~~
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 not import my data model class in another **.py file ???

2009-01-02 Thread Youngfe

I have a file(xPhotoHandler.py) with following codes inside:

from google.appengine.ext import webapp
from google.appengine.api import users
from xphoto import xPhoto
class xPhotoHandler(webapp.RequestHandler):
   def get(self):
pass

I have defined xPhoto class in file(xphoto.py) in the my app root
folder

but when I call from web there's an error show as below:

xphoto undefined, xPhoto undefined

I don't know why? Can anyone help it out? 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: Does SDK datastore data upload with appcfg.py?

2009-01-02 Thread kang
no

On Sat, Jan 3, 2009 at 2:48 AM, 84dory  wrote:

>
> Pardon what should be an obvious question, but I have been unable to
> find a simple declarative answer.  Is the development data in the dev
> server datastore uploaded by appcfg.py?
>
> Thanks!
>
> >
>


-- 
Stay hungry,Stay foolish.

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



[google-appengine] Re: lower case string query

2009-01-02 Thread Webweave

In SQL, you simply compare the data value as lower or upper case,
which is the approach that is most often used to do a case-insensitive
match.

So you'd have something like:

WHEN UPPER(Mytable.myfield) = UPPER(?)

Or in Cake conditions, you'd do something like:

 '(UPPER(Mytable.myfield))' => strtoupper($value)

OR, if you know the data is stored in one case or the other, you don't
need the UPPER on the SQL.

On Dec 31 2008, 12:32 pm, Ray Malone  wrote:
> I came up with the same approach, however, this is a unclean way to
> handle it.  Is this the only option?
>
> On Dec 31, 10:42 am, "Rodrigo Moraes" 
> wrote:
>
> > On Wed, Dec 31, 2008 at 1:27 PM, Ray Malone wrote:
> > > I can't seem to find documentation on how to filter a string value and
> > > expect a lower case value.  For example if users input their names in
> > > upper and lower case I want to find the value using a lower case value
> > > later.
>
> > You'd need to store a copy of the name in lowercase, so that you can
> > filter by it.
>
> > -- 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] Adding property to a Model

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

I have an existing application that is in production
(volvooceanracegamehelp.appspot.com). I would like to add to one of my
entities an additional property.

I have done this in the python by just adding the line:
boat=db.StringProperty()

to my class that inherits from db.Model.


I can insert new rows fine, and see them in the Development server
datastore viewer. But when I try to access the new property contains
"NoneType: None".

How can I force the Datastore to add this new property without having
to delete all the old data and re-add?

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: Over Quota: Datastore Indices Count

2009-01-02 Thread Panos

Hi Marzia,

Happy new

I encounter the same issues at pckidsis.appspot.com. Could you please
fix it if it is your issue or let me know how to fix it on my end?

Thanks,
Panos

On Dec 22 2008, 9:03 am, Marzia Niccolai  wrote:
> Hi,
>
> If you reply to me with your app id, I will be able to fix this.
>
> -Marzia
>
> On Fri, Dec 19, 2008 at 11:40 PM, paptimus  wrote:
>
> > Hi, GAE team.
>
> > I encountered "Your application is exceeding a quota: Datastore
> > Indices Count" on dashboard.
>
> > The number of indeces is under 50, but one model has about 30 indeces.
> > So I think this one is the point of over quota warning and vacuumed
> > these indeces.
> > Vacuume_index was completed and there is no index of that model.
>
> > But the warging of over quota ramains over 24 hours and the status of
> > a new index remains "building".
>
> > I hope you check my index and change the status to "Error" if my index
> > has problems, please.
>
> > 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] Does SDK datastore data upload with appcfg.py?

2009-01-02 Thread 84dory

Pardon what should be an obvious question, but I have been unable to
find a simple declarative answer.  Is the development data in the dev
server datastore uploaded by appcfg.py?

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: Access app.yaml values at run time

2009-01-02 Thread DocDay

Robin, that's exactly what I wanted! Clearly I need to take a more
serious look at the docs. Thanks so much.

Doc


On Jan 1, 7:37 pm, Robin B  wrote:
> See the environment section of the guide:
>
> http://code.google.com/appengine/docs/python/theenvironment.html
>
> I think you want: APPLICATION_ID, CURRENT_VERSION_ID
>
> If you still want to read the app.yaml at runtime, remove app.yaml
> from the skip_files section, read in the file directly from the read-
> only file system.
>
> Robin
>
> On Jan 1, 5:04 pm, DocDay  wrote:
>
>
>
> > Surely my Python code could parse the app.yaml file to pull out any
> > value I want. Instead, I'm wondering if GAE makes app.yaml values
> > available to my application at run time? Specifically, I'm looking for
> > application code and application version.- 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: Problem with PDF as a static file

2009-01-02 Thread warreninaustintexas

Yes - I forgot about the 1MB limit.  I can probably break it down into
two files and get them each under 1MB.

Thanks!
w.

On Dec 31 2008, 12:12 am, Gert-Jan 
wrote:
> Hi Warren,
>
> Did your pdf-file exceed 1 MB?
>
> Greetings,
>
> Gert-Jan
--~--~-~--~~~---~--~~
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: currency or comma in float numbers format

2009-01-02 Thread warreninaustintexas

I wrote my own function to convert since I couldn't find a Django
filter or Python library to do so.  I convert to a summary style
format instead of full-precision currency:

  if abs(what_number) > 10:
return_string = str(round(float(what_number)/10,places)) +
"B"
  elif abs(what_number) > 100:
return_string = str(round(float(what_number)/100,places)) +
"M"
  elif abs(what_number) > 1000:
return_string = str(round(float(what_number)/1000,places)) + "K"
  else:
return_string = str(round(float(what_number),places))

Hope that helps.
w.

On Jan 2, 5:31 pm, Shay Ben Dov  wrote:
> Hi,
> Anyone knows how to implement in GAE
> currency formating of floating numbers like:
> {{ value|floatformat:2 }} built_in filter
> Shay
--~--~-~--~~~---~--~~
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: Newbie Help needed - Administration Interface broken?

2009-01-02 Thread fiXedd

Brilliant!!! Worked like a charm. You're a lifesaver, thanks.

On Jan 2, 3:08 pm, Alexander Kojevnikov 
wrote:
> Do you use a Google Apps email? Try logging in with this 
> URL:http://appengine.google.com/a//
>
> On Jan 2, 2:04 pm, fiXedd  wrote:
>
> > I created a new app and it isn't showing up. Every time I go to
> > appengine.google.com it asks me to create a new project... even after
> > I've created several. However, if I try and upload my app (using one
> > of the names I created) it works fine and is available @
> > appname.appspot.com.
>
> > Can anyone help?
>
> > 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: Timeouts

2009-01-02 Thread Xavier Mathews

Place it in the issue tracker.

On 01/02/2009, Alexander Kojevnikov  wrote:
>
>> My application is getting a very high number of data store timeouts.
>>
>> Is there an unreported issue going on right now?
>>
> The status monitor doesn't show anything unusual:
> http://code.google.com/status/appengine/detail/datastore/2009/01/02
>
> >
>


-- 
Xavier A. Mathews
Student/Browser Specialist/Developer/Web-Master
Client Based Tech Support Specialist
Hazel Crest Illinois
xavieruni...@gmail.com¥xavierunited@hotmail.com¥truestar...@yahoo.com
"Fear of a name, only increases fear of the thing itself."

--~--~-~--~~~---~--~~
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] currency or comma in float numbers format

2009-01-02 Thread Shay Ben Dov

Hi,
Anyone knows how to implement in GAE
currency formating of floating numbers like:
{{ value|floatformat:2 }} built_in filter
Shay
--~--~-~--~~~---~--~~
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 java

2009-01-02 Thread magixman

Java as a language vs. Python as a language?  Both are serious
languages that can get the job done.  The real advantage of Java is
that just about any component you care to think of has already been
done in Java.   Python is not there yet and what is worse is that the
concept of "pure python" is rather new and so many components are
actually wrappers at the moment and so won't work on GAE.   Java is
infinitely more suitable for the ultimate goal of the GAE which is to
provide a scalable sandbox in the cloud.  For reasons known only to
those in Mountain View Python was chosen instead.  No problem we can
deal with it but I still can't for the life of me understand why.

On Dec 31 2008, 11:04 am, Aramaki  wrote:
> Hi, a few months ago I started with python to get used to GAE. Before
> that, I was working with java and it is still a language that I
> appreciate.
>
> But the fact is that after learning python I really don't see the
> advantage. My point is that python is strong enough to gracefully
> carry out almost any task conceived for GAE. It is fully OOP and
> strong enough. I use my eclipse like always so my question is guys:
>
> - The comunity interest in implementing java will give you so much
> advantage or it is because you do no want to learn python
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Timeouts

2009-01-02 Thread Alexander Kojevnikov

> My application is getting a very high number of data store timeouts.
>
> Is there an unreported issue going on right now?
>
The status monitor doesn't show anything unusual:
http://code.google.com/status/appengine/detail/datastore/2009/01/02

--~--~-~--~~~---~--~~
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: Newbie Help needed - Administration Interface broken?

2009-01-02 Thread Alexander Kojevnikov

Do you use a Google Apps email? Try logging in with this URL:
http://appengine.google.com/a//


On Jan 2, 2:04 pm, fiXedd  wrote:
> I created a new app and it isn't showing up. Every time I go to
> appengine.google.com it asks me to create a new project... even after
> I've created several. However, if I try and upload my app (using one
> of the names I created) it works fine and is available @
> appname.appspot.com.
>
> Can anyone help?
>
> 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-02 Thread Bryan A. Pendleton

If you really just care about consistency, and you're actually
thinking of using external requests (which, because of propagation
delays would still not provide a very strong guarantee), why not just
bite the bullet and use a single object to synchronize transaction?
This will force you to write your code to avoid updating that object
as aggressively as possible, but if you insist on a single accurate
anything in your system, you're basically going to run into the same
set of problems.

Of course, if you just need the *user* to have a consistently ordered
transaction log, that would be one object per user, and really
shouldn't suffer all that terrible contention (unless the user is
somehow regularly generating multiple invoices per second).

On Jan 2, 1:39 pm, James Ashley  wrote:
> On Jan 1, 12:17 pm, Andy Freeman  wrote:
>
> > > For a number of possible reasons (including the consistency of a
> > > running balance), an accounts engine might have a basic specification
> > > requirement that invoices are generated in sequence with ascending
> > > invoice numbers *and* ascending invoice time/date.
>
> > Except that consistency doesn't require both.  Either one is
> > sufficient and trying to have both merely puts you in the situation of
> > a person with two clocks - you don't know which one is correct.
>
> > Moreover, it's easy enough to fake an ascending time/date.  (Take the
> > max of the system time and epsilon past the most recent entry.)
>
> > If time is actually an issue, you can't use system time unless it's
> > guaranteed to be accurate, not just consistent.  For that, you're
> > probably better off consulting an accurate time source.
>
> This was pretty much exactly my thought.  Put your own central server
> on the web and use urlfetch() to get timestamp/invoice numbers.
>
> -- James
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Timeouts

2009-01-02 Thread Xavier Mathews
Nope no that we know of.be sure that it is not a server time out and
that there is no bug in the app preventing it to load correctly! It may just
be loading time or the save time could be to long..space issue! ETC

Xavier A. Mathews
Student/Browser Specialist/Developer/Web-Master
Client Based Tech Support Specialist
Hazel Crest Illinois
xavieruni...@gmail.com¥xavierunited@hotmail.com¥truestar...@yahoo.com
"Fear of a name, only increases fear of the thing itself."











On Fri, Jan 2, 2009 at 11:44 AM, Aaron  wrote:

>
> My application is getting a very high number of data store timeouts.
>
> Is there an unreported issue going on right now?
>
> -Aaron O'Brien
>
> >
>

--~--~-~--~~~---~--~~
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-02 Thread James Ashley


On Jan 1, 12:17 pm, Andy Freeman  wrote:
> > For a number of possible reasons (including the consistency of a
> > running balance), an accounts engine might have a basic specification
> > requirement that invoices are generated in sequence with ascending
> > invoice numbers *and* ascending invoice time/date.
>
> Except that consistency doesn't require both.  Either one is
> sufficient and trying to have both merely puts you in the situation of
> a person with two clocks - you don't know which one is correct.
>
> Moreover, it's easy enough to fake an ascending time/date.  (Take the
> max of the system time and epsilon past the most recent entry.)
>
> If time is actually an issue, you can't use system time unless it's
> guaranteed to be accurate, not just consistent.  For that, you're
> probably better off consulting an accurate time source.


This was pretty much exactly my thought.  Put your own central server
on the web and use urlfetch() to get timestamp/invoice numbers.


-- James

--~--~-~--~~~---~--~~
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: urlencode in app engine templates

2009-01-02 Thread ctran

Look at the source instead of what the browser tells you: you'll see
that is encoded (with %20)

On Jan 1, 4:54 am, Remis B  wrote:
> Hi Everyone
>
> I need to url encode an string in the template. In django template
> language reference I saw documentation for filter "URLENCODE" which
> "Escapes a value for use in a URL". When I tried it,  it does nothing,
> I'm getting back the same string. I want to produce an url with
> properly encoded url string, such as "Full HD1080p" where space and other characters are
> encoded in url safe form.
>
> I've tried this syntax in my template file
>
> 
> {{ feature.code }}
>
> Just wondering what I'm doing wrong.
>
> Thanks in advance.
>
> Remis B
--~--~-~--~~~---~--~~
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: Validating UTF-8 securely

2009-01-02 Thread Ross Ridge

Alexander Konovalenko wrote:
> Did those who implemented str.decode() and the codecs module design
> them to handle any possible malicious UTF-8 input correctly?

The UTF-8 decoder is designed to convert UTF-8 to Unicode and to treat
any input that's not valid UTF-8 as an error.

> Unicode is complex; there are some interesting types of code points
> there that could require special treatment.

If so, that would be a different issue.  The UTF-8 encoding is simple.

> So corner cases might
> exist that never occur in practice but are able to break Python's
> implementation of UTF-8.

In practice, random byte strings get fed into Python's UTF-8 decoder,
so that doesn't seem to be likely.

> Making sure that your implementation does its
> error handling correctly in the face of malicious input requires
> expert knowledge of the specification and a conscious effort to make
> the code secure.

The alternative is to write your own code to validate UTF-8 strings.
However, I'd trust Python's UTF-8 codec over your code.

> I am not sure if such a purposeful effort was made to secure UTF-8
> handling in Python. That's why I'm asking. I'm posting here first
> because I am primarily interested in the App Engine implementation
> which might differ from upstream CPython.

There's no reason for the UTF-8 codec to be any different.

Ross Ridge

--~--~-~--~~~---~--~~
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-02 Thread bFlood

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] SMS: through python AIM/gtalk libraries?

2009-01-02 Thread mclovin

I wanted to test out some SMS web app, where I can communicate w/ the
application from my phone. I was wondering if the App Engine allows me
to do this through the use of either AIM libraries or Gtalk Libraries
written in python.

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] three web proxy sites on Google app Engine(proxypy, go2, web-proxy), which is better?

2009-01-02 Thread auzhuang

I found three web proxy sites on Google app :

http://proxypy.appspot.com/

http://go2.appspot.com/

http://web-proxy.appspot.com/

which is better?  Is it open source?

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

2009-01-02 Thread Aaron

My application is getting a very high number of data store timeouts.

Is there an unreported issue going on right now?

-Aaron O'Brien

--~--~-~--~~~---~--~~
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] Newbie Help needed - Administration Interface broken?

2009-01-02 Thread fiXedd

I created a new app and it isn't showing up. Every time I go to
appengine.google.com it asks me to create a new project... even after
I've created several. However, if I try and upload my app (using one
of the names I created) it works fine and is available @
appname.appspot.com.

Can anyone help?

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] Should I use App Engine Patch

2009-01-02 Thread Ray Malone

I'm not sure of the benefits of using the Patch.  I have been able to
build two good sized apps (1000+ lines of code each) using the App
Engine defaults.   I know my code is not best practice yet, so I'm
looking to learn more and make my next app better.  While I like how
the models are setup, the process of creating and maintaining an app
seems complicated.  Can you tell me what I would gain from using the
Patch.  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: one application multiple alias domain

2009-01-02 Thread gops

thanks , that just didn't occur to me...rocking!!

one more question :: How can i handle multiple google apps account
from same interface ? ... basically i have multiple clients , and as a
admin , it is quite tadious to logout and login for different
admin ...  and as it occurs to me , there must be multiple
profile extension for firefox ... let me google for it.

thanks for your help.

On Jan 1, 11:50 pm, niklasr  wrote:
> Sure you can. For each domain just apply the same app.
> Niklas
> On Jan 1, 2:29 pm, gops  wrote:
>
> > is there any way in google apps to add gooogle app engine app and run
> > it for multiple domain alias.
>
> > i.e.  www.maindomain.com/mypage.htmlandwww.aliasdomain.com/mypage.html
> > will show same page.
>
> > can anybody confirm weather it is possible or not ?
--~--~-~--~~~---~--~~
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: "RuntimeError: maximum recursion depth exceeded" when accessing User object (app engine patch)

2009-01-02 Thread reyjexter

after further investigating the problem, i noticed that the email
field on the User model is causing the problem. Here is the last few
lines of the trace:

 File "/home/jexter/pythonworkspace/myproject/common/appenginepatch/
ragendja/auth/models.py", line 40, in __str__
return unicode(self).encode('utf-8')
  File "/usr/local/google_appengine/google/appengine/api/
datastore_types.py", line 556, in __init__
ValidateString(email, 'email')
  File "/usr/local/google_appengine/google/appengine/api/
datastore_types.py", line 98, in ValidateString
(name, value, typename(value)))
  File "/home/jexter/pythonworkspace/myproject/common/appenginepatch/
ragendja/auth/models.py", line 40, in __str__
return unicode(self).encode('utf-8')
  File "/usr/local/google_appengine/google/appengine/api/
datastore_types.py", line 556, in __init__
ValidateString(email, 'email')
  File "/usr/local/google_appengine/google/appengine/api/
datastore_types.py", line 98, in ValidateString
(name, value, typename(value)))
  File "/home/jexter/pythonworkspace/myproject/common/appenginepatch/
ragendja/auth/models.py", line 40, in __str__
return unicode(self).encode('utf-8')
  File "/home/jexter/pythonworkspace/myproject/common/appenginepatch/
ragendja/auth/models.py", line 176, in __unicode__
return self.email
RuntimeError: maximum recursion depth exceeded

So what I did is to manually clear out the entry on email field using
the bundled data viewer. The recursion error went about but i this
error instead:

coercing to Unicode: need string or buffer, NoneType found




On Jan 3, 12:35 am, reyjexter  wrote:
> i'm not sure if this is the correct place to post this problem. anyway
> my problem seems to occur when trying to access the user object.
>
> even when logging the user object stored on request using this simple
> code:
>
> import logging
> logging.debug(request.user)
>
> and even after adding the code:
>
> import sys
> sys.setrecursionlimit(5000)
>
> i'm still getting a recursion error.
>
> this is only thrown when accessing User object. all of my custom
> models doesn't seem to throw a recursion error.
>
> i already investigated and tried removing user reference key on all my
> models but i'm still getting the error.
>
> hope somebody helps me
>
> thanks
>
> rey
--~--~-~--~~~---~--~~
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: Validating UTF-8 securely

2009-01-02 Thread Alexander Konovalenko

On Fri, Jan 2, 2009, Ross Ridge  wrote:
> Alexander Konovalenko wrote:
>
> > But is that secure?
> > [...]
> > The official Python documentation does not explicitly say that.
>
> The documentation for str.decode() is explict:
>
>Decodes the string using the codec registered for encoding. [...]
>The default is 'strict', meaning that encoding errors raise
>UnicodeError

Yeah, I was referring to that same paragraph, too. Of course the docs
say that it should behave correctly. The question is whether it is a
practical "should" or a security "should". I'll try to say it another
way to make things more clear:

Did those who implemented str.decode() and the codecs module design
them to handle any possible malicious UTF-8 input correctly?

Sometimes code that works perfectly well and is considered bug-free
under normal circumstances turns out to be not so correct when exposed
to a hostile environment where people intentionally try to break it.
Unicode is complex; there are some interesting types of code points
there that could require special treatment. So corner cases might
exist that never occur in practice but are able to break Python's
implementation of UTF-8. Making sure that your implementation does its
error handling correctly in the face of malicious input requires
expert knowledge of the specification and a conscious effort to make
the code secure. You're trying to prove that whatever happens in the
untrusted parts of the system your code will still run correctly.

I am not sure if such a purposeful effort was made to secure UTF-8
handling in Python. That's why I'm asking. I'm posting here first
because I am primarily interested in the App Engine implementation
which might differ from upstream CPython.

 -- Alexander

--~--~-~--~~~---~--~~
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] "RuntimeError: maximum recursion depth exceeded" when accessing User object (app engine patch)

2009-01-02 Thread reyjexter

i'm not sure if this is the correct place to post this problem. anyway
my problem seems to occur when trying to access the user object.

even when logging the user object stored on request using this simple
code:

import logging
logging.debug(request.user)

and even after adding the code:

import sys
sys.setrecursionlimit(5000)

i'm still getting a recursion error.

this is only thrown when accessing User object. all of my custom
models doesn't seem to throw a recursion error.

i already investigated and tried removing user reference key on all my
models but i'm still getting the error.


hope somebody helps me


thanks

rey



--~--~-~--~~~---~--~~
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: Validating UTF-8 securely

2009-01-02 Thread Ross Ridge

Alexander Konovalenko wrote:
>   try:
> safe_unicode = unsafe_user_input.decode('utf8')
>   except UnicodeDecodeError:
> # the input is not valid UTF-8
>   response.write(escape(safe_unicode)) # this is safe now. Or is it?
>
> But is that secure? Is it guaranteed that the UnicodeDecodeError
> exception will be raised on any invalid or inappropriate UTF-8
> characters in the input string?

Yes, it will raise an exception if the string isn't encoded correctly
using UTF-8.

> The official Python documentation does not explicitly say that.

The documentation for str.decode() is explict:

Decodes the string using the codec registered for encoding. [...]
The default is 'strict', meaning that encoding errors raise
UnicodeError

> It
> might be the case that in some obscure situation the resulting unicode
> object would contain something strange that could yield invalid UTF-8
> when printed back to the user.

No.  Python won't generate invalid UTF-8 when converting Unicode
strings to UTF-8 either.

> You might have even applied some patches that can
> affect UTF-8 decoding and encoding.

That seems unlikely.

   Ross Ridge

--~--~-~--~~~---~--~~
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] dev_appserver.py Encountered error loading module

2009-01-02 Thread Toney

I get the following errors when I access any page of my application,
can anyone tell me what i may be missing?

Strange thing is the pages for the apps loads fine, the error below
comes from the server console.



ERROR2009-01-02 13:58:20,155 dev_appserver.py] Encountered error
loading module "fb.upload.uploa
d": : Could not find module
fb.upload.upload
Traceback (most recent call last):
  File "C:\Program Files\Google\google_appengine\google\appengine\tools
\dev_appserver.py", line 1607
, in LoadTargetModule
module_code = import_hook.get_code(module_fullname)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools
\dev_appserver.py", line 847,
 in decorate
return func(self, *args, **kwargs)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools
\dev_appserver.py", line 1470
, in get_code
full_path, search_path, submodule = self.GetModuleInfo(fullname)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools
\dev_appserver.py", line 847,
 in decorate
return func(self, *args, **kwargs)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools
\dev_appserver.py", line 1422
, in GetModuleInfo
submodule, search_path = self.GetParentSearchPath(fullname)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools
\dev_appserver.py", line 847,
 in decorate
return func(self, *args, **kwargs)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools
\dev_appserver.py", line 1401
, in GetParentSearchPath
parent_package = self.GetParentPackage(fullname)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools
\dev_appserver.py", line 847,
 in decorate
return func(self, *args, **kwargs)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools
\dev_appserver.py", line 1378
, in GetParentPackage
raise ImportError('Could not find module %s' % fullname)
ImportError: Could not find module fb.upload.upload
WARNING  2009-01-02 13:58:20,155 dev_appserver.py] Missing package
initialization files: c:\_dmg\fb\
upload\__init__.py, c:\_dmg\fb\__init__.py




Exception happened during processing of request from ('127.0.0.1',
4951)
Traceback (most recent call last):
  File "C:\Python25\lib\SocketServer.py", line 222, in handle_request
self.process_request(request, client_address)
  File "C:\Python25\lib\SocketServer.py", line 241, in process_request
self.finish_request(request, client_address)
  File "C:\Python25\lib\SocketServer.py", line 254, in finish_request
self.RequestHandlerClass(request, client_address, self)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools
\dev_appserver.py", line 2355
, in __init__
BaseHTTPServer.BaseHTTPRequestHandler.__init__(self, *args,
**kwargs)
  File "C:\Python25\lib\SocketServer.py", line 521, in __init__
self.handle()
  File "C:\Python25\lib\BaseHTTPServer.py", line 316, in handle
self.handle_one_request()
  File "C:\Python25\lib\BaseHTTPServer.py", line 310, in
handle_one_request
method()
  File "C:\Program Files\Google\google_appengine\google\appengine\tools
\dev_appserver.py", line 2359
, in do_GET
self._HandleRequest()
  File "C:\Program Files\Google\google_appengine\google\appengine\tools
\dev_appserver.py", line 2491
, in _HandleRequest
raise e
error: (10054, 'Connection reset by peer')



Exception happened during processing of request from ('127.0.0.1',
4952)
Traceback (most recent call last):
  File "C:\Python25\lib\SocketServer.py", line 222, in handle_request
self.process_request(request, client_address)
  File "C:\Python25\lib\SocketServer.py", line 241, in process_request
self.finish_request(request, client_address)
  File "C:\Python25\lib\SocketServer.py", line 254, in finish_request
self.RequestHandlerClass(request, client_address, self)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools
\dev_appserver.py", line 2355
, in __init__
BaseHTTPServer.BaseHTTPRequestHandler.__init__(self, *args,
**kwargs)
  File "C:\Python25\lib\SocketServer.py", line 521, in __init__
self.handle()
  File "C:\Python25\lib\BaseHTTPServer.py", line 316, in handle
self.handle_one_request()
  File "C:\Python25\lib\BaseHTTPServer.py", line 299, in
handle_one_request
self.raw_requestline = self.rfile.readline()
  File "C:\Python25\lib\socket.py", line 345, in readline
data = self._sock.recv(self._rbufsize)
error: (10054, 'Connection reset by peer')


Exception happened during processing of request from ('127.0.0.1',
4953)
Traceback (most recent call last):
  File "C:\Python25\lib\SocketServer.py", line 222, in handle_request
self.process_request(request, client_address)
  File "C:\Python25\lib\SocketServer.py", line 241, in process_request
s

[google-appengine] Validating UTF-8 securely

2009-01-02 Thread Alexander Konovalenko

This is a question to Google developers who are working on the Python
runtime. Before I get to the subject matter let me start with a
two-paragraph introduction to provide a common background for all
readers.

There is an interesting kind of XSS vulnerability involving malformed
UTF-8. Sometimes an attacker could trick our website into serving
malicious JavaScript by posting some specially crafted text containing
invalid UTF-8 characters. For more information, see the Doctype
article "Malformed UTF-8: Who said 'hello%EE' can't be dangerous"
.

To protect against this, all user input should be validated to be
correct UTF-8 before it is sent back to other users. As long as
untrusted text contains only valid byte sequences representing real
Unicode characters, it is easy to sanitize it by replacing any <, >,
quotation marks and other special characters with safe equivalents.

So here is my question. What's the easiest but secure way to validate
UTF-8 on App Engine? For example, my first guess would be to use the
str.decode() method (which apparently uses the codecs module):

  # the unsafe_user_input variable is a plain old str, not a
  # unicode string yet
  try:
safe_unicode = unsafe_user_input.decode('utf8')
  except UnicodeDecodeError:
# the input is not valid UTF-8
  response.write(escape(safe_unicode)) # this is safe now. Or is it?

But is that secure? Is it guaranteed that the UnicodeDecodeError
exception will be raised on any invalid or inappropriate UTF-8
characters in the input string?

The official Python documentation does not explicitly say that. It
might be the case that in some obscure situation the resulting unicode
object would contain something strange that could yield invalid UTF-8
when printed back to the user. That could make the above code
vulnerable.

I know that you have done a pretty thorough security audit of the
Python interpreter. You might have even applied some patches that can
affect UTF-8 decoding and encoding. Does the behavior of the
str.decode() function on App Engine differ in any way from what the
official Python interpreter v2.5.4 does?

Thank you,
  -- Alexander

--~--~-~--~~~---~--~~
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] return a variable value from html form to python

2009-01-02 Thread thebrianschott

I cannot retrieve the value of the variable "g_place" in the following
python script back from "add_place.html". "g_place" is effectively
sent to "add_place.html" in the "def get(self)" section of class
AddPlace, but "g_place" is not returned to the python script in the
"def post(self)" section of class AddPlace. "g_place" is sent to
"add_place.html" and placed in the var "iwform" with the phrase
{{place|escape}}.

(I hope I have provided enough information. I am reluctant to upload
this buggy version to GAE, so I cannot just provide a link. Please
advise if there is another protocol/procedure I should be using to
provide the code as a link.)

Thanks,

Brian in Atlanta

***relevant python code below**
class MainPage(webapp.RequestHandler):
def get(self):
place_id = self.request.get("place", None)

place= Group(key_name=place_id)
place.place = place_id
place.user = user
place.put()
key = db.Key.from_path("Group", place_id)
path = os.path.join(os.path.dirname(__file__),
'add_place.html')
template_values = dict(place_id=place.key(),
place=place.place)
self.response.out.write(template.render(path,
template_values))


class AddPlace(webapp.RequestHandler):
#creates blank template_values
def get(self):
g_place = self.request.get('place')
user = users.get_current_user()
param = 'add_place.html'
path = os.path.join(os.path.dirname(__file__), param)
template_values = dict(place=g_place)
self.response.out.write(template.render(path,
template_values))

#creates initial group attribute values
def post(self):
g_place = self.request.get('place')
group= Group(key_name=g_place)
group.place = g_place
group.center_lat = float(self.request.get('center_lat'))
group.center_lng = float(self.request.get('center_lng'))
group.zoom = int(self.request.get('zoom'))
group.put()
self.redirect("/?place=%s" % g_place)


application = webapp.WSGIApplication(
 [('/', MainPage),
  ('/details.txt', Details),
  ('/add_place', AddPlace)],
 debug=True)
***relevant python code above**


***relevant html code below**
  var lastmarker;
  var myEventListener;

  var iwform = 'Enter your group\'s information:'
+ ''
+ 'Group Name or Initials: '
+ ''
+ '{{place|escape}}'
+ ''
+ '  '
+ '  '
+ '  '
+ '  '
+ '  '
+ '<\/form>';


  function process(form) {
// == populate map data
form.center_lat.value = String(map.getCenter().lat());
form.center_lng.value = String(map.getCenter().lng());
form.zoom.value = String(map.getZoom());
lastmarker.closeInfoWindow();
GEvent.removeListener(myEventListener);

return true;
  }
***relevant html code above**


--~--~-~--~~~---~--~~
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 query through multiple models?

2009-01-02 Thread Rodrigo Moraes

On Fri, Jan 2, 2009 at 9:25 AM, djidjadji wrote:
> parents = db.get([Entity.parent.get_value_for_datastore(entity) for
> entity in result])
>
> Is more efficient because you only do 1 call to the datastore, for
> multiple objects.

Awesome... I thought it was not possible to get the key from a
ReferenceProperty without fetching the related entity.

This is a nice trick. :-)

-- 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: Memcache Question

2009-01-02 Thread Toney

Thank you djidja, that was very helpful

On Jan 1, 4:02 am, djidjadji  wrote:
> A snippet from the code for google.appengine.api.users
> --
>   A nickname is a human-readable string which uniquely identifies a Google
>   user, akin to a username. It will be an email address for some users, but
>   not all.
> -
> At the moment the __str__() functions returns the User.nickname().
> And that makes your memcache key unique for the current user.
> And when there is no logged in user you get the key 'RegistrationNone'
>
> 2009/1/1 Toney :
>
>
>
> > your correct about the quotes I did make a mistake when retyping the
> > code.
>
> > with the users.get_current_user() object what if I concatenated the
> > key as such...
> > query = memcache.get('Registration'+str(users.get_current_user()))
>
> > i'm not getting an error when I do it this way but i'm not sure if
> > doing it this way is a good idea
>
> > On Dec 31, 12:22 pm, djidjadji  wrote:
> >> There is NO difference, only the first names the individual arguments,
> >> you can call
> >> memcache.add(time=3600, value=query
> >> ,key="Registration'+users.get_current_user()" )
> >> and get the same result.
> >> The second versions uses the position of the arguments.
>
> >> I noticed some strange things with the quotes, single and double, are
> >> they exactly as given in the examples?
> >> users.get_current_user() returns a User object, this might not work
> >> very well in adding to a String unless Python calls the __str__()
> >> method on the User object because we try to add to a string.
>
> >> 2008/12/31 Toney :
>
> >> > I'm optimizing my code to use memcache, can anyone tell me the
> >> > difference between using memcache like this...
>
> >> > memcache.add(key="Registration'+users.get_current_user()",
> >> > value=query, time=3600)
>
> >> > versus this way...
>
> >> > memcache.add('Registration'+users.get_current_user(), query
>
> >> > I found one way while watching the building-scalable-web-applications-
> >> > with-google-app-engine video and the other in the memcache
> >> > documentation.
>
> >> > I'm thinking the second example appends data to the memcachce key and
> >> > the first replaces what's in the specific memcache key with the new
> >> > value.  or is there no difference??
--~--~-~--~~~---~--~~
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 query through multiple models?

2009-01-02 Thread djidjadji

parents = db.get([Entity.parent.get_value_for_datastore(entity) for
entity in result])

Is more efficient because you only do 1 call to the datastore, for
multiple objects.

2009/1/2 Rodrigo Moraes :
>
> On Fri, Jan 2, 2009 at 1:59 AM, Tiago S. wrote:
>> I´m facing the exactly same problem. I thought about querying all(with
>> a fetch(100), in my case) the children with name 'Joe', and then put
>> all the parent keys in a list(with a list comprehension, maybe). With
>> all the keys, query the Parent using Parent.get(list).
>
> You can simply do [entity.parent for entity in result]. If you have a
> ReferenceProperty, the first time you call the property "parent" to
> get the key, it'll be fetched. So building and fetching a list would
> only be possible if you store an additional property with the parent
> key - or you'd be doing double fetch.
>
> -- 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 query through multiple models?

2009-01-02 Thread Rodrigo Moraes

On Fri, Jan 2, 2009 at 1:59 AM, Tiago S. wrote:
> I´m facing the exactly same problem. I thought about querying all(with
> a fetch(100), in my case) the children with name 'Joe', and then put
> all the parent keys in a list(with a list comprehension, maybe). With
> all the keys, query the Parent using Parent.get(list).

You can simply do [entity.parent for entity in result]. If you have a
ReferenceProperty, the first time you call the property "parent" to
get the key, it'll be fetched. So building and fetching a list would
only be possible if you store an additional property with the parent
key - or you'd be doing double fetch.

-- 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: A newbie's site

2009-01-02 Thread lookon

我已经做了不少修改了,现在支持RSS了已经,并且在图片的内容页会显示随机图片。CSS也优化过了

On Dec 8 2008, 4:04 pm, lookon  wrote:
> I've built a google app engine site based on the simpleviewer example
> and FriendFeed Share Bookmarklet. The url ishttp://images.kangye.org/
>
> It's a website to let people shareimagesthey saw on the Internet and
> wish people can give the image a suitable caption. It has a
> bookmarklet and in the detail page, people can click the caption to
> edit.
>
> I'm new to GAE and python, and the site need to be improved a
> lot...wish you can give me some  suggeston~
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---