[google-appengine] Re: how to write the output of a django template into a frame?

2010-02-25 Thread dburns
template.render returns you the contents of the template, and you are trying to provide that to the src attribute. The src attribute should be the LOCATION, not the content. See http://www.w3schools.com/TAGS/tag_iframe.asp Should be something like: self.response.out.write('iframe src=myframe

[google-appengine] Re: Issue with app deployment?

2010-02-16 Thread dburns
Same here, at least I've seen the 'Version not ready' error after it went up to waiting 128 seconds between checks. Glad it's not just me. The system doesn't seem to be completely read-only (the existing version can still write). On Feb 16, 10:20 pm, gwstuff gwsa...@gmail.com wrote: Hi, I'm

[google-appengine] Re: how large data can i use in App Caching and how long will it be cached?

2010-02-13 Thread dburns
In Python at least, GAE looks for a function called main() to enable app caching. Simply rename main() to something else. On Feb 13, 6:41 am, Eric Ka Ka Ng ngk...@gmail.com wrote: is it possible to 'disable' the app caching behavior? - eric On 12 February 2010 17:48, saintthor

[google-appengine] Re: Transaction across entities in different groups

2010-01-29 Thread dburns
da...@tuppeny.com wrote: On Jan 24, 12:29 am, dburns drrnb...@gmail.com wrote: Making a User instance the parent of a SS (snapshot) instance seems like a natural fit, except then I can't fetch all the favourites via: favs = SS.get_by_id(user.fav_ids).  The reason is that all parents

[google-appengine] Re: Transaction across entities in different groups

2010-01-26 Thread dburns
/9/Distributed-Transactions-on-App-Engine Robert On Sat, Jan 23, 2010 at 9:14 PM, dburns drrnb...@gmail.com wrote: Thanks for the reply.  Using a ReferenceProperty from the SS to the User does at first sound ideal, but the problem is that the back- reference that this gives you is actually

[google-appengine] Transaction across entities in different groups

2010-01-23 Thread dburns
I'd appreciate any insight into the best design for this problem. I have a photo-sharing app. I want people to be able to mark a photo as a favourite, just as YouTube does with videos. I have two kinds: Snapshots and Users. Given a user, I need to be able to get a list of their favourites, and

[google-appengine] Re: Transaction across entities in different groups

2010-01-23 Thread dburns
is probably preferable, because if you do decide to make photos children of another entity the IDs won't be globally unique while the db.Keys still will be. On Jan 23, 7:29 pm, dburns drrnb...@gmail.com wrote: I'd appreciate any insight into the best design for this problem.  I have a photo

[google-appengine] Re: Transaction across entities in different groups

2010-01-23 Thread dburns
is probably preferable, because if you do decide to make photos children of another entity the IDs won't be globally unique while the db.Keys still will be. On Jan 23, 7:29 pm, dburns drrnb...@gmail.com wrote: I'd appreciate any insight into the best design for this problem.  I have a photo

[google-appengine] Re: Automating appcfg.py

2010-01-21 Thread dburns
first. --- end server output --- Password for [my email account] Thanks again, Arjun On Jan 9, 1:34 pm, dburns drrnb...@gmail.com wrote: appcfg.py has this option that should help:   --passin              Read the login password from stdin. stdin means standard input, which is normally

[google-appengine] Re: dev_appserver.py issue. When I deploy to app engine the code works fine. Please help

2010-01-14 Thread dburns
Looks like you are running Python26. I did initially too, but ran into troubles. Things have been smooth since I installed 2.5 instead (which is what they recommend). On Jan 13, 8:46 pm, adamjamesdrew same theikl...@gmail.com wrote: 2010-01-13 20:44:04 Running command:

[google-appengine] Re: How I can predict or calculate overhead in Datastorage. For me now it looks like 900% or real stored data. Or its simple multiplayed by 10?

2010-01-13 Thread dburns
Every single one of those properties is indexed by default. Do you really need to be able to search or sort by every property? If not, add indexed=False to the parameter list for each property where an index isn't required. That will affect new entries, but won't affect the existing data. To

[google-appengine] Re: Datastore caching

2010-01-13 Thread dburns
Adding a column to a kind will affect any new entities, but won't affect the existing data. To update the existing data (to reduce space), you would have to traverse over all the entities and simply get and put them. On Jan 13, 3:02 am, WallyDD shaneb...@gmail.com wrote: I have added a column

[google-appengine] Re: Datastore caching

2010-01-13 Thread dburns
Ignore the part (to reduce space) -- admittedly I was copying and pasting from a very similar reply I just made on another thread. :-) The basic idea applies, though. On Jan 13, 1:31 pm, dburns drrnb...@gmail.com wrote: Adding a column to a kind will affect any new entities, but won't affect

[google-appengine] Re: Automating appcfg.py

2010-01-09 Thread dburns
appcfg.py has this option that should help: --passin Read the login password from stdin. stdin means standard input, which is normally what you type, but you can redirect stdin like this: appcfg.py --passin other_parameters_here password where password is a file containing

[google-appengine] Re: Using memcache effectively

2010-01-07 Thread dburns
} (which can be cached in memcache), you want to make it sure that only friends can access that profile. Satoshi On Jan 5, 1:21 pm, dburns drrnb...@gmail.com wrote: My app may display a lot of different output for a given page (customized per user amongst other things), and I'm wondering how best

[google-appengine] Using memcache effectively

2010-01-05 Thread dburns
My app may display a lot of different output for a given page (customized per user amongst other things), and I'm wondering how best to use memcache. My current scheme is to estimate that a given user's output might be useful for, say 10 minutes, after which time the user has probably gone away

[google-appengine] Re: Timezones Date Formatting

2010-01-05 Thread dburns
It's an existing issue. Star this one: http://code.google.com/p/googleappengine/issues/detail?id=822can=5colspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary%20Log%20Component On Jan 4, 2:16 pm, Evan Klitzke e...@eklitzke.org wrote: I've noticed that app engine internally uses UTC

[google-appengine] Re: how to use less time for many urlfetches?

2010-01-01 Thread dburns
Have you seen this? http://code.google.com/appengine/docs/python/urlfetch/asynchronousrequests.html On Jan 1, 10:25 am, saintthor saintt...@gmail.com wrote: for each urlfetch, i have to wait till it returns. if i run many urlfetches, how can i save the waiting time? i have tried thread, the

[google-appengine] Re: How do i flush the memcache on production?

2009-12-12 Thread dburns
It's not currently available. You can vote up http://code.google.com/p/googleappengine/issues/detail?id=433, but in the meantime you'd have to write your own code to do a memcache.flush_all. On Dec 11, 2:17 pm, Evgeny evgeny.bo...@gmail.com wrote: I can do it from my console.. but how can i do

[google-appengine] Re: Enable URL locally for testing purposes

2009-12-08 Thread dburns
One crude way to tell if you're running locally or not: if self.request.host_url != http://localhost:8080: # Assume live server On Dec 8, 6:28 pm, Alex Popescu the.mindstorm.mailingl...@gmail.com wrote: On Dec 9, 1:25 am, Alex Popescu the.mindstorm.mailingl...@gmail.com wrote: Hi guys,

[google-appengine] Re: Catch All Doesn't Work

2009-12-07 Thread dburns
Your first url contain .py! You don't want .py in the url, do you? That would only match the url http://something.appspot.com/main2,py, which doesn't sound very likely. The second one should be a catch-all that invokes main.py. I use - url: /.* but I think yours should work. Maybe it's

[google-appengine] Re: preserve data during dev stage

2009-11-28 Thread dburns
By default, the development server should preserve data between runs. Are you sure you're not launching dev_appserver with the -c or -- clear_datastore flags? On Nov 27, 11:38 pm, james_027 cai.hai...@gmail.com wrote: hi, How do i preserve my data during the development stage. Every time I

[google-appengine] Re: How can I pre-fill the email address when deploying my apps?

2009-11-28 Thread dburns
On the command line, you can use: appcfg.py --emai...@b.com update [dir] You still have to enter your password. But I find it only prompts me for my password every 24 hours. On Nov 27, 8:44 pm, samwyse samw...@gmail.com wrote: *sigh* Thanks for letting me know it isn't just me.  Maybe

[google-appengine] Watch out for this subtle performance killer

2009-11-21 Thread dburns
I thought I'd share this, since I'm sure there are others that have fallen into the same trap using this very common pattern (in this sample, Pix derives from db.Model; get_pics is called on every page load): def get_pics(self): pics = memcache.get(pics) if

[google-appengine] Re: Using handle_exception()

2009-11-17 Thread dburns
I'm not sure if this is the best way, since I'm pretty new to Python, but here's an example showing testing for CapabilityDisabledError. I think the exception you're looking for is called OverQuotaError. def handle_exception(self, exception, debug_mode): if isinstance(exception,

[google-appengine] Re: Syntax Error while including javascript file

2009-11-12 Thread dburns
- url: /script/jquery\.js script: jquery.js should be - url: /script/jquery\.js static_dir: jquery.js the script: indicates what python or java script to invoke to handle the request. You simply want to hand the script to the browser that's requesting it. On Nov 12, 3:14 am, Felix

[google-appengine] Do non-stored items in a Model hurt storage efficiency?

2009-11-12 Thread dburns
Questions related to the db.Model-derived class shown below. 1) Would the not_stored member variable hurt efficiency of storage in any way? Its purpose is for temporary work, and it is of course not persisted to storage. Would its presence slow down storage or retrieval at all? 2) Would the

[google-appengine] Re: UnicodeDecodeError when trying to upload unicode CSV file using upload_data

2009-10-30 Thread dburns
This monologue of mine might help: http://groups.google.com/group/google-appengine/browse_thread/thread/28324f17f9007af5/8c6b48f885f90ae1?hl=en#8c6b48f885f90ae1 My last post summarizes what I found out. On Oct 30, 10:06 pm, Gezim Hoxha hge...@gmail.com wrote: Hi, I'm trying to upload a CSV

[google-appengine] Understanding concurrent updates

2009-10-27 Thread dburns
I'm trying to make sure I understand issues surrounding multiple concurrent users. Take the example from http://code.google.com/appengine/docs/python/datastore/transactions.html#Uses_For_Transactions def increment_counter(key, amount): obj = db.get(key) obj.counter += amount obj.put()

[google-appengine] Re: Pagination with Ranking

2009-10-02 Thread dburns
Hi Josh, Seems like you can use the technique in the linked document, but replace order(-when) with order(-score), so I guess the real issue is how to display the rank (I assume you mean first place, second place, etc.). If displaying pages of players, I think you can just use a counter (in

[google-appengine] Re: Pagination with Ranking

2009-10-02 Thread dburns
And of course I just finished reading the fine print that says it'll only return a maximum of 1000. Oh well, maybe I stirred some creative juices in someone else. On Oct 2, 8:04 pm, dburns drrnb...@gmail.com wrote: Hi Josh, Seems like you can use the technique in the linked document

[google-appengine] Re: How to NOT index a field

2009-07-09 Thread dburns
I mean vaguely recall, not vaguely require, sorry. --~--~-~--~~~---~--~~ 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

[google-appengine] Re: How to NOT index a field

2009-07-09 Thread dburns
Thanks Nick! Ah, I was convinced it had to be in index.yaml. OK, that's easy. Do you consider it good practise to do this, or is it naive to think it will help? That's interesting about StringProperty vs TextProperty. I'd assumed there was a different storage mechanism, but it sounds like

[google-appengine] Re: How to NOT index a field

2009-07-09 Thread dburns
Excellent. Many 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] Re: POST data causes error: type 'exceptions.UnicodeDecodeError': 'ascii' codec can't decode byte X in position Y: ordinal not in range(128)

2009-06-30 Thread dburns
Here's what I found out, in case it helps someone. Turns out I mis- read the stack trace. The exception happened AFTER calling my handler, not before (trace messages in my handler didn't show up because of buffering, reinforcing my incorrect theory that it hadn't been invoked). The issue was

[google-appengine] Re: Time zone in admin console

2009-06-26 Thread dburns
Thanks Nick. I went looking and discovered the issue tracking system, and I believe this is already logged: http://code.google.com/p/googleappengine/issues/detail?id=822 So I guess I'll wait :) Thanks for your reply. --~--~-~--~~~---~--~~ You received this

[google-appengine] POST data causes error: type 'exceptions.UnicodeDecodeError': 'ascii' codec can't decode byte X in position Y: ordinal not in range(128)

2009-06-25 Thread dburns
Hi, My app normally works fine, but certain POST data is causing it to blow up with a 500 (internal server error). The log contains the message in the stack trace below. Trouble is, my app hasn't even got started yet! It happens right at the run_wsgi_app line. My webapp.RequestHandler has

[google-appengine] Re: POST data causes error: type 'exceptions.UnicodeDecodeError': 'ascii' codec can't decode byte X in position Y: ordinal not in range(128)

2009-06-25 Thread dburns
Here's an update. I found out how to do basic CGI so I was able to examine the POST data directly. Interestingly, I got no errors decoding the POST data as ascii! Does this point to a bug in the run_wsgi_app code? Here's my new mainline. The output I got (minus the very long POST data) is

[google-appengine] Re: Google I/O 2009 - ..Scalable, Complex Apps on App Engine (audio problems)

2009-06-15 Thread dburns
The audio on that video is barely audible for me, too. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe

[google-appengine] Re: Unable to Run the Development Web Server

2009-06-10 Thread dburns
Looks like the .py extension is associated with the text editor rather than python.exe. For me, the installation took care of that, but you can change it manually via through Windows. Alternatively, you can explicitly put python.exe in front of the command so that it runs the script rather than