[google-appengine] Regexps in app.yaml url for static_dir?
GAE docs [1] on configuring for serving static files say the url param used with static_dir uses regular expression syntax. I can't seem to get this to work. I wanted to let the URLs /stuff/v1/thing.gif, /stuff/v2/thing.gif, etc. all refer to a file thing.gif in my app's /static/stuff directory. Tried like this: - url: /stuff/.*/ static_dir: static/stuff But I only get 404s. (Nothing earlier in app.yaml is interfering either). I ended up converting it to this, which works: - url: /stuff/(.*)/(.*) static_files: static/stuff/\2 upload: static/stuff/(.*) So it works, but the syntax is much more cumbersome. Is regex supposed to work with static_dir, and if so what am I doing wrong (or is this a bug)? Thanks. I should say that I have only tested on this dev_appserver (Mac OS X) so far -- haven't verified this problem in production. [1] http://code.google.com/appengine/docs/configuringanapp.html#Static_File_Handlers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Timeouts
I just got three timeouts about an hour ago within 10 minutes to my app (appid: brps), all generated same traceback. They happened at: 01-05 11:50AM 18.670 01-05 11:50AM 13.719 01-05 11:41AM 50.052 It's not a big deal to me, just want to provide the info. But I do have a question, can we catch `Timeout` exception? == One of the error log: 01-05 11:50AM 13.719 /get? blog=4589801858088630122post=430278962333729325callback=jsonp1231109286447_=1231109287404 500 11474ms 8190ms-cpu 1kb See details 65.210.123.XXX - - [05/Jan/2009:11:50:25 -0800] GET /get? blog=4589801858088630122post=430278962333729325callback=jsonp1231109286447_=1231109287404 HTTP/1.1 500 1115 - - 01-05 11:50AM 25.180 Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 498, in __call__ handler.get(*groups) File /base/data/home/apps/brps/1.330487559911947040/index.py, line 100, in get p = post.get(blog_id, post_id) File /base/data/home/apps/brps/1.330487559911947040/brps/post.py, line 75, in get p = Post.get_by_key_name(key_name) File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 837, in get_by_key_name return get(*keys) File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 1032, in get entities = datastore.Get(keys) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 217, in Get raise _ToDatastoreError(err) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 1637, in _ToDatastoreError raise errors[err.application_error](err.error_detail) Timeout --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: request: versions accessed by URL param rather than prefix?
On Tue, Jan 6, 2009 at 10:15 AM, Ben Nevile ben.nev...@gmail.com wrote: Sadly I cannot redirect before returning to Facebook. I can ask Facebook to redirect, but if I redirect to a non-canvas page it won't render within the Facebook environment. Does that make sense? For example, if I wanted to redirect to 2.latest.myapp.appspot.com I can send Facebook this directive: fb:redirect url='http://2.latest.myapp.appspot.com' / Why can't you do a normal HTTP 304 redirect? 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: return a variable value from html form to python
Marzia and others, Thank you for your help. The good news is that I have revised my app to use the google maps methods of passing data around, GDownloadUrl() and it works pretty well on my local machine. The bad news is that when I deployed it to the appspot, it fails immediately. I worried that something was wrong when I tried to upgrade the svn version and got an error message that I don't understand. [3:15am brian~]% cd /Users/brian/googleapps/carpoolfinder/ [3:36am brian~/googleapps/carpoolfinder]% svn status subversion/libsvn_wc/lock.c:377: (apr_err=155007) svn: '.' is not a working copy One bug I know about in the application is that the center marker (pushpin) will not stay off-center from the underlying map if you want it to. While you are building the map, that pin will stay off-center until you go back to the existing map, and there it has centered itself. I would love to find the problem. Another problem occurs if the map builder supplies a ampersand (like walkers pedalers) in the people text field. Also, if the map builder supplies an initial name which begins with any digits, it fails. I will have to learn more Python, I guess to fix these two problems. So, I would like any help you can offer. Our app could be used and viewed at the following link, except that it is not working right now for some reason. Thanks, again. 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: return a variable value from html form to python
Our link is http://carpoolfinder.appspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: 1 application, multiple datastores
How do you know how the current GAE code actually works? I read the API docs - how do you manage it? I'm not the one asserting that there are hard boundaries between GAE datastores that the GAE run-time can't pierce. Neither am I - I am asserting that there are hard boundaries that you or I can't pierce, and that is a feature of the security architecture. The API docs bear out that assertion. I do *expect* that data partitioning is a DB layer feature, but as I said previously, I don't know that. It is generally believed that GAE is built on top of BigTable, which has a lot of internal Google users. I don't know that all of them can work with only one datastore; I'd guess that several require to access multiple datastores simultaneously. So, if there is a BigTable-level only one datastore and/or can't switch restriction, I'd be very surprised if was universal or could only be pierced by suid applications. I guess one of us will be surprised then :) - I would be surprised if gmail, sites, blogger, picassa, orkut etc. all operated in an open space and avoided data exposure through code implemented in each of those applications. That seems a ludicrous architecture to me - which is my point in this thread I guess. It makes much more sense to me to have the partitioning logic at the DB level (like a standard database tablespace), and for those applications to leverage that. Then they expose API's to access their data at the application level - not use the DB API's. Google does, in fact, expose API's for data access - http://code.google.com/apis/gdata/ - and does not give DB level access to it. So I think just by observing google's current architecture, it makes sense that they wouldn't break with that tradition at the application level for GAE. And not just because its tradition, but because it is rooted in sound architectural principles. Not so fast. Who said anything about application visible tokens? In fact, it could be just change_to_application_userstore, where a userstore is an ordinary GAE datastore. This could easily be written so it doesn't take any parameters from application code, which makes it just as secure as an open datastore call done at process startup. Or, it could support one token, so the application has access to the default datastore and a datastore determined by such a call. Again, that call need not take parameters from application code. I think this is getting away from the 106 proposal now, which states - 'This feature request is about allowing cross app queries using the db APIs only' And regardless, you can easily introduce the cited bug based on your clarification. Simply make the wrong call to 'change_to_datastore', and you still have the exposure problem. When your code is responsible for selecting the datastore, you can introduce the bug. This is fairly obvious. This could easily be written so it doesn't take any parameters from application code, which makes it just as secure as an open datastore call done at process startup. You are still asserting that application code carries the same robustness profile as a platform code. This is clearly not the case. If there are N applications implementing the application API, vs just the platform implementing the platform API, then it is a simple matter of statistics to show that you will get at least N times as many bugs. In fact it will be much more than N, because the volume of testing on the platform will be N times greater, and ther implementation process will be much more rigourous than most application. Without doing the analysis, I would expect the platform fragility (e.g. fragility = defects per month) to decrease exponentially as N increases. Using the application API, I expect fragility would remain roughly constant, and unrelated to N. But there is a hidden bigger probem - if fragility remains constant on a per app basis, then customers see app engine as a minefield - which apps are well implemented? The one they choose could be a broken one. How would they know? This means across the board, the risk of data exposure _from the customer perpsective_ is much worse if partitioning logic is performed in application code. What do you think of the possibility of being able to decide when you deploy your app how strict the data partitioning should be? In the marketplace concept, the customer could be made aware of the strictness of data partitioing when they sign up. My main concern is protecting customer data, and giving customers confidence in the data security of the GAE platform. This is how I read the intent of the original poster as well. On Jan 6, 3:40 am, Andy Freeman ana...@earthlink.net wrote: As it stands GAE does not allow cross data store queries, and from my perspective that is an aspect of the security architecture. 106 wants that aspect 'relaxed'. How do you know how the current GAE code actually works? I read the API docs - how do
[google-appengine] Getting around the limits of fetching large result sets
I've got several blogs scattered around and use none of them, so I thought I'd post this here and maybe some of the ideas and methods I'm using might help other developers using appengine. Let me preface this with, I've come to the conclusion that appengine is not the right tool for everyjob, and when you start looking at needing to do the things I mention below on a regular basis, you might wish to consider moving back to a traditional server/database solution, or look for other alternatives to BigTable. I had two problems, I attacked them two different ways to reach acceptable solutions. There was a constraint for both problems that some of you may not be aware of yet, so I'll explain that first. While the datastore has 1000 limit on fetch(), if you're regularly fetching 1000 entities you are going to get execution timeouts. Especially if you're doing something on each of those 1000 requests, like say, deleting them. I've found, when you're doing a write for every request, 75 is for the most part a safe number. Finally, one other piece of information you need is what I'm developing with. The latest version of appenginepatch and the django supplied with it, 1.0.2 I believe. The latest trunk version of gaeutilities (I need to get a new update out to you all who are using it). Ok... problems. Paging. I needed a nice paging system that would also be lightweight and user friendly. I read the very interesting article on paging by key, and it didn't really fit in this instance. keys didn't make for friendly urls and my paging items are static, I page by a score that can change on each entity. My solution was to use the paging library that comes with django. I run my query, and then page on top of it. Since the scores don't change every request, I also cache those queries in order to offer even better performance. I fetch 100 entities for the paging, which gives me 10 pages of 10, when run through the django pagination library. To increase the amount of pages, I could fetch more entities. Deleting more than 1000 records: My first solution was to create a page that deleted 75 records at a time, and refresh a whole lot. This was a bit frustrating when I have of 2 records. The next time I had to do it, I got a little bit more creative. First, the view in Django: def deleteAllStories(request): ''' This method deletes all stories in the database.''' from google.appengine.ext import db from fanatasticweb.models import Story query = db.GqlQuery('SELECT * FROM Story') results = query.fetch(75) if len(results) == 75: more = True db.delete(results) if more: return HttpResponse('More') else: return HttpResponse('done') This view is actually called from ajax request in this view def deleteAllStoriesV(request): return render_to_response('deleteall.html', {}) deleteall.html is a simple javascript function that calls the story deleteview and checks the content. If the content is not done it refreshes. That way, it will keep running even over the occastional datastore timeout error you'll encounter. The main thing I've learned is that when you need to start managing lots of records, it's possible. Javascript is more than likely going to be the answer. Javascript will also be useful for avoiding datastore timeouts in some instances as well. However, when you need to start creating multiple http requests to manage data on a regular basis, it may be time to move back to a server with your favorite database backend in order to be able to process those large transactions. --~--~-~--~~~---~--~~ 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: 1 application, multiple datastores
I guess one of us will be surprised then :) - I would be surprised if gmail, sites, blogger, picassa, orkut etc. all operated in an open space and avoided data exposure through code implemented in each of those applications. If the separation is by name and ordinary file access control, the code implemented consists of the name of the datastore for the application plus some application configuration that has to happen regardless. I'm pretty sure that google thinks that their folks can open an application-specific datastore name reliably. And, if they fail, they're talking to a datastore with the wrong structure. Or, are you thinking that those applications use a different datastore per external user? (If separate datastore per user is the usage pattern, bigtable requires far less concurrency support than the report mentions.) - and does not give DB level access to it. So I think just by observing google's current architecture, it makes sense that they wouldn't break with that tradition at the application level for GAE. And not just because its tradition, but because it is rooted in sound architectural principles What db level access are you talking about? The result of that open call is used by every other bigtable operation, including all db operations performed at the datastore. Unless GAE works differently, the runtime has access to that result. Not so fast. Who said anything about application visible tokens? In fact, it could be just change_to_application_userstore, where a userstore is an ordinary GAE datastore. This could easily be written so it doesn't take any parameters from application code, which makes it just as secure as an open datastore call done at process startup. And regardless, you can easily introduce the cited bug based on your clarification. Simply make the wrong call to 'change_to_datastore', and you still have the exposure problem. When your code is responsible for selecting the datastore, you can introduce the bug. This is fairly obvious. Huh? How can you make a wrong call that doesn't have any parameters? Here's the application code: {operations on application-wide datastore} change_to_application_userstore() # note - no parameters {operations on user-specific datastore} {return to user} The runtime knows what user and the mapping from said user to an application-specific datastore. The application doesn't specify the user and doesn't even know the name of the datastore. There are only two mistakes that the application writer can make - calling change_to_application_userstore too early or too late. If the change_to_application_userstore() call is too late, the application will try to perform some user-specific operations on the application-wide datastore, but those will likely fail because its structure is completely different. Note that the application doesn't have access to any data from the user's datastore at that point. If the change_to_application_userstore() call is too early, the application will try to perform some application-generic operations on the user's datastore, but those will likely fail for the same reason as above. Moreover, this can't leak user data because the application only has access to the user's datastore at that point. You are still asserting that application code carries the same robustness profile as a platform code. No, I'm not. I'm pointing out that the platform includes the run-time and that run-time can provide meaningful services in this area. If it's already providing related services, and I'm pretty sure that it is calling open_application_datastore with some application-specific key on startup, this doesn't change the risk profile. Do you really want to argue that the platform code in the run-time has a significantly different robustness profile than platform code running on a different server? (If I'm correct about it already providing related services, you're actually arguing about the relative robustness of related run-time code.) Would platform code running in a different process on the same machine have yet another robustness profile? On Jan 6, 4:57 am, hawkett hawk...@gmail.com wrote: How do you know how the current GAE code actually works? I read the API docs - how do you manage it? I'm not the one asserting that there are hard boundaries between GAE datastores that the GAE run-time can't pierce. Neither am I - I am asserting that there are hard boundaries that you or I can't pierce, and that is a feature of the security architecture. The API docs bear out that assertion. I do *expect* that data partitioning is a DB layer feature, but as I said previously, I don't know that. It is generally believed that GAE is built on top of BigTable, which has a lot of internal Google users. I don't know that all of them can work with only one datastore; I'd guess that several require to access multiple datastores simultaneously. So,
[google-appengine] Re: Suggests based on user input
If it's going to make a request each time it needs to calculate next suggestions, you could quickly hit your requests quota. When doing Ajax style functionality on your appengine site, it's best to keep in mind you have a finite amount of requests available to your application per day. On Jan 6, 9:58 am, Barry Hunter barrybhun...@googlemail.com wrote: You could use something like thishttp://developer.yahoo.com/yui/autocomplete/ the python script to output csv, or xml based on the datastore query should be fairly trival. 2009/1/6 Shay Ben Dov shay.ben...@gmail.com: Hi Everybody, Has anyone tried to implement a suggestions based on user input like inGmail when you start to key in the To: field and you get a lists of suggested names read from your contacts. I wish to implement the same reading suggestions from a datastore table based on user keyed_in input. Every assistance is appreciated. Thanks, Shay Ben Dov -- Barry -www.nearby.org.uk-www.geograph.org.uk- --~--~-~--~~~---~--~~ 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] Server Error (500) on deploy
Hello! I updated my Apps but it always told me : Cloned 100 files. Cloned 200 files. Cloning 293 application files. Cloned 100 files. Cloned 200 files. Closing update. Uploading index definitions. Error 500: --- begin server output --- Server Error (500) A server error has occurred. --- end server output --- Your app was updated, but there was an error updating your indexes. Please retry later with appcfg.py update_indexes. What's wrong with It? Somebody does me a favor ? I really appreciate. My app-id is :bugway --~--~-~--~~~---~--~~ 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] Interaction with other server
Tired of the performances of my cheap hosting, I would like to try to see if GAE is the answer for small projects that could be quite demanding and should be reliable. Let's imagine I have a database on my personal website and I would like to kind of mirror it every now and then to have almost the same data in my GAE app. I could for instance call a dynamically generated text file (ie xml) with all the needed data from my personal webserver and copy in the GAE app directory. Can I copy static files to the app directory from my app (in python)? I read network operations are limited but I presume not that much. Any suggestion? Thanks, chr --~--~-~--~~~---~--~~ 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] Refresh needed on every page load?!
My little GAE app: http://www.mobaganda.com/ The first time you hit the page, it's blank, refresh and everything comes up fine?! No errors in logs, nothing unusual going on with data, no red flags anywhere... no idea why this happens?! I get e-mails daily saying mobaganda is down!!, but it's not.. it just needs a page re-load, every time. Any ideas as to why this would happen? I don't even know how to start debugging this! 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Server Error (500) on deploy
Hi, This error is due to the fact that you have indexes that are currently building. I am fixing this and will follow up off group after it is complete. -Marzia On Mon, Jan 5, 2009 at 9:46 PM, blackball bug...@gmail.com wrote: Hello! I updated my Apps but it always told me : Cloned 100 files. Cloned 200 files. Cloning 293 application files. Cloned 100 files. Cloned 200 files. Closing update. Uploading index definitions. Error 500: --- begin server output --- Server Error (500) A server error has occurred. --- end server output --- Your app was updated, but there was an error updating your indexes. Please retry later with appcfg.py update_indexes. What's wrong with It? Somebody does me a favor ? I really appreciate. My app-id is :bugway --~--~-~--~~~---~--~~ 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: Refresh needed on every page load?!
Hi, This is due to the fact that you are missing: if __name__ == __main__: main() at the end of your application file. It's due to the way that App Engine does App Caching: http://code.google.com/appengine/docs/python/appcaching.html -Marzia On Tue, Jan 6, 2009 at 9:33 AM, Stirman stir...@gmail.com wrote: My little GAE app: http://www.mobaganda.com/ The first time you hit the page, it's blank, refresh and everything comes up fine?! No errors in logs, nothing unusual going on with data, no red flags anywhere... no idea why this happens?! I get e-mails daily saying mobaganda is down!!, but it's not.. it just needs a page re-load, every time. Any ideas as to why this would happen? I don't even know how to start debugging this! 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Query on partial string
Hi, With App Engine, there is not a great way to do partial string searches. To do prefix matching, which seems to be your use case, you can use inequality filters and the method described here: http://code.google.com/appengine/docs/datastore/queriesandindexes.html Query filters do not have an explicit way to match just part of a string value, but you can fake a prefix match using inequality filters: db.GqlQuery(SELECT * FROM MyModel WHERE prop = :1 AND prop :2, abc, uabc + u\ufffd) This matches every MyModel entity with a string property prop that begins with the characters abc. The unicode string u\ufffd represents the largest possible Unicode character. When the property values are sorted in an index, the values that fall in this range are all of the values that begin with the given prefix. -Marzia On Tue, Jan 6, 2009 at 12:59 AM, chromerunner gau...@gmail.com wrote: A noob question. I have a series of names in the datastore. They are stored in this format: surname-first initial. Examples would be: Smith-J Python-M Smith-KS Doe-J Users will want to find names by partial matching. Thus a query string of 'Smith' should find both J and KS above... I just can't find a way of doing it, am I missing what's glaringly obvious? Any pointers 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] Re: Query on partial string
Thanks Marzia, for two reasons (a) it is a valid workaround that I can use and (b) I feel less incompetent in not having discovered an obvious feature --~--~-~--~~~---~--~~ 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: Regexps in app.yaml url for static_dir?
Hi, This is due to the fact that the url parameter for static_dir works differently than that for static_files. The static_dir regex is prefix only with no groups: From static_dir description: url A URL prefix. This value uses regular expression syntax (and so regexp special characters must be escaped), but it should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path. And the description for static_files: url The URL pattern, as a regular expression. The expression can contain groupings that can be referred to in the file path to the script with regular expression back-references. For example, /item-(.*?)/category-(.*) would match the URL /item-127/category-fruit, and use 127 and fruit as the first and second groupings. -Marzia On Tue, Jan 6, 2009 at 12:16 AM, boson dan.kam...@gmail.com wrote: GAE docs [1] on configuring for serving static files say the url param used with static_dir uses regular expression syntax. I can't seem to get this to work. I wanted to let the URLs /stuff/v1/thing.gif, /stuff/v2/thing.gif, etc. all refer to a file thing.gif in my app's /static/stuff directory. Tried like this: - url: /stuff/.*/ static_dir: static/stuff But I only get 404s. (Nothing earlier in app.yaml is interfering either). I ended up converting it to this, which works: - url: /stuff/(.*)/(.*) static_files: static/stuff/\2 upload: static/stuff/(.*) So it works, but the syntax is much more cumbersome. Is regex supposed to work with static_dir, and if so what am I doing wrong (or is this a bug)? Thanks. I should say that I have only tested on this dev_appserver (Mac OS X) so far -- haven't verified this problem in production. [1] http://code.google.com/appengine/docs/configuringanapp.html#Static_File_Handlers --~--~-~--~~~---~--~~ 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: Regexps in app.yaml url for static_dir?
Marzia, Could you please provide an example of how one might use a regular expression with static_dir url pattern? The one I provided seemed like a pretty simple one (simple prefix, no groupings), but it doesn't work, so obviously I'm missing something here. What does work? Thank you. On Jan 6, 10:54 am, Marzia Niccolai ma...@google.com wrote: Hi, This is due to the fact that the url parameter for static_dir works differently than that for static_files. The static_dir regex is prefix only with no groups: From static_dir description: url A URL prefix. This value uses regular expression syntax (and so regexp special characters must be escaped), but it should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path. And the description for static_files: url The URL pattern, as a regular expression. The expression can contain groupings that can be referred to in the file path to the script with regular expression back-references. For example, /item-(.*?)/category-(.*) would match the URL /item-127/category-fruit, and use 127 and fruit as the first and second groupings. -Marzia On Tue, Jan 6, 2009 at 12:16 AM, boson dan.kam...@gmail.com wrote: GAE docs [1] on configuring for serving static files say the url param used with static_dir uses regular expression syntax. I can't seem to get this to work. I wanted to let the URLs /stuff/v1/thing.gif, /stuff/v2/thing.gif, etc. all refer to a file thing.gif in my app's /static/stuff directory. Tried like this: - url: /stuff/.*/ static_dir: static/stuff But I only get 404s. (Nothing earlier in app.yaml is interfering either). I ended up converting it to this, which works: - url: /stuff/(.*)/(.*) static_files: static/stuff/\2 upload: static/stuff/(.*) So it works, but the syntax is much more cumbersome. Is regex supposed to work with static_dir, and if so what am I doing wrong (or is this a bug)? Thanks. I should say that I have only tested on this dev_appserver (Mac OS X) so far -- haven't verified this problem in production. [1] http://code.google.com/appengine/docs/configuringanapp.html#Static_Fi... --~--~-~--~~~---~--~~ 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: request: versions accessed by URL param rather than prefix?
Dave, When dealing with Facebook and FBML you can't do a 304 redirect. Facebook is making the request to your server on behalf of the user. Ben On Jan 6, 1:35 am, David Symonds dsymo...@gmail.com wrote: On Tue, Jan 6, 2009 at 10:15 AM, Ben Nevile ben.nev...@gmail.com wrote: Sadly I cannot redirect before returning to Facebook. I can ask Facebook to redirect, but if I redirect to a non-canvas page it won't render within the Facebook environment. Does that make sense? For example, if I wanted to redirect to 2.latest.myapp.appspot.com I can send Facebook this directive: fb:redirect url='http://2.latest.myapp.appspot.com'/ Why can't you do a normal HTTP 304 redirect? 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: request: versions accessed by URL param rather than prefix?
Ben, I also am developing FB apps with GAE. I set up a Google Group for this: http://groups.google.com/group/facebook-and-google-app-engine and we've touched on the topic of how to best do app versioning there too. Your proposal is interesting! That group isn't a substitute for this one, but it's a good supplemental place to get all the FB+GAE people together under one virtual roof. Stop by and say hello :) On Jan 5, 12:13 pm, Ben Nevile ben.nev...@gmail.com wrote: Hi, Much of my work with App Engine is on Facebook applications. Facebook acts as a proxy through which all requests flow. Every application registers a callback URL that Facebook directs traffic at. So for instance http://apps.facebook.com/my_application/foo becomes http://my_application.appspot.com/foo One of my favorite GAE features is that I can access and test different versions of my App Engine code. Under most circumstances the URL subdomain-based access (eg, 1.latest.my_application.appspot.com, 2.latest.my_application.appspot.com, etc) is very convenient, but this convention doesn't fit well with Facebook's idea of the fixed callback URL. I can set up a dummy application to access the version of code that I want, but this is A. kludgy and B. inconvenient because all of the social context is absent in the dummy application (other friends using the app, etc.) I would very much like to be able to access different versions of my code using a query parameter. Then I could test my Facebook apps with URLs like http://apps.facebook.com/my_application/foo?APP_VERSION=2 which would be translated into http://my_application.appspot.com/foo?APP_VERSION=2 I'm hoping something like this already possible. If not, consider this a feature request! :) Ben --~--~-~--~~~---~--~~ 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: request: versions accessed by URL param rather than prefix?
On Wed, Jan 7, 2009 at 6:30 AM, Ben Nevile ben.nev...@gmail.com wrote: When dealing with Facebook and FBML you can't do a 304 redirect. Facebook is making the request to your server on behalf of the user. So it's Facebook that doesn't follow 304 redirects? That sounds broken. 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: request: versions accessed by URL param rather than prefix?
On Wed, Jan 7, 2009 at 8:44 AM, David Symonds dsymo...@gmail.com wrote: On Wed, Jan 7, 2009 at 6:30 AM, Ben Nevile ben.nev...@gmail.com wrote: When dealing with Facebook and FBML you can't do a 304 redirect. Facebook is making the request to your server on behalf of the user. So it's Facebook that doesn't follow 304 redirects? That sounds broken. An alternative workaround would be to do a urlfetch to your own application from your main handler, which can then contain the version switching logic. 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: AuthToken for Appengine
At the moment, there isn't really an option that avoids asking the user for their Google Account password. The Google Calendar API which you mentioned has a few options for web based authorization which would provide an auth token including OAuth and AuthSub http://code.google.com/apis/accounts/docs/OAuth.html http://code.google.com/apis/accounts/docs/AuthSub.html I think adding these auth mechanisms to App Engine would be a good feature request. Would you mind addind it to our issues list? http://code.google.com/p/googleappengine/issues Thank you, Jeff On Jan 4, 11:52 am, magnolia8...@gmail.com magnolia8...@gmail.com wrote: Is it possible in anyway for a web application to get an AuthToken for appengine like any other service like google calendar etc? The idea is to mange end users appengine apps from a web application using google authetication with out using user’s google id and password. If one can get hold the AuthToken for appengine then the appcfg.py can be tweaked to use that Authtoken to get the things done. Any information in this regard will be greatly appreciated. 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] object not iterable
Hi, there, I've been trying to figure out what is happening with my code, and after pounding my head against the wall for a while, I thought I'd ask you guys. I'm trying to extract some lines containing X= from an inputform. Here's the portion of code that is giving me trouble: inputdata = self.request.get('inputdata') nlines = inputdata.splitlines xlines = [] for val in nlines: if val.find('X='): xlines.append(val) Here's the error I get: for val in nlines: TypeError: 'builtin_function_or_method' object is not iterable I thought that splitlines would return a list, which should be iterable, right? --~--~-~--~~~---~--~~ 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: object not iterable
inputdata.splitlines refers to the function itself, you want to *call* the function, so use parentheses: nlines = inputdata.splitlines() On Tue, Jan 6, 2009 at 5:01 PM, Rockmaster rockmast...@gmail.com wrote: Hi, there, I've been trying to figure out what is happening with my code, and after pounding my head against the wall for a while, I thought I'd ask you guys. I'm trying to extract some lines containing X= from an inputform. Here's the portion of code that is giving me trouble: inputdata = self.request.get('inputdata') nlines = inputdata.splitlines xlines = [] for val in nlines: if val.find('X='): xlines.append(val) Here's the error I get: for val in nlines: TypeError: 'builtin_function_or_method' object is not iterable I thought that splitlines would return a list, which should be iterable, right? --~--~-~--~~~---~--~~ 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: object not iterable
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] Submitting App to the Gallery
Anyone knows how long this takes to show up in the gallery? 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] BadArgumentError: _app must not be empty.
I'm trying to get doctests running from inside of Textmate, and I've got so far that I can run the tests, and they work as expected until I try and put() the object, when I get the error above. I'm using Aral Balkan's gae_doctest.py and I've added os.environ ['APPLICATION_ID'] = APP_ID as suggested in another post. I've put gae_doctest in /Applications/GoogleAppEngineLauncher.app/ Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/ google_appengine/lib/ (which is symlinked to /usr/local/ google_appengine/lib Any ideas? --~--~-~--~~~---~--~~ 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] regex problems
Hello, I'm a bit confused by regular expressions in Python. I tested the following regex with http://re.dabase.com/, and it got a match there, but I can't seem to get a match once I run this: ( example line from xlines: X= 0. ) progX = re.compile('X=\s*\d+\.?\d*', re.I) xparts = [] for val in xlines: mX = progX.match(val) Any ideas? --~--~-~--~~~---~--~~ 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] Crazy Apps account / Google account behavior
So, I have an application that belonged to my Google account. Earlier today, our IT guy registered a Google Apps account for our domain -- and added an account with the same username / e-mail as my Google account (tay...@nemeannetworks.com). Just now, I deleted a *different developer* from the application -- signed in as my Google account. Upon saving, I was redirected to an Unauthorized to view this application page, and much to my dismay, I no longer had access to my application's admin console. Shockingly, however: I now have access to the admin console for my app *with my Google Apps login.* I did not delete or re-invite myself, it just happened by magic. Is there any way to grant access back to my Google account instead of to my Google Apps account without changing my Google account's e-mail address? Thanks, Taylor Hughes --~--~-~--~~~---~--~~ 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: Crazy Apps account / Google account behavior
More: If I add a new application while logged in as my Google account, I am immediately sent to an Unauthorized page -- and the new app shows up under my Apps account! (Just created crazytimeexcellent and saw this behavior.) On Jan 6, 5:46 pm, Taylor Hughes tay...@nemeannetworks.com wrote: So, I have an application that belonged to my Google account. Earlier today, our IT guy registered a Google Apps account for our domain -- and added an account with the same username / e-mail as my Google account (tay...@nemeannetworks.com). Just now, I deleted a *different developer* from the application -- signed in as my Google account. Upon saving, I was redirected to an Unauthorized to view this application page, and much to my dismay, I no longer had access to my application's admin console. Shockingly, however: I now have access to the admin console for my app *with my Google Apps login.* I did not delete or re-invite myself, it just happened by magic. Is there any way to grant access back to my Google account instead of to my Google Apps account without changing my Google account's e-mail address? Thanks, Taylor Hughes --~--~-~--~~~---~--~~ 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: regex problems
match() wants the regex to start at position 0. If your first char is not 'X' == No match try search() Read the python doc about the difference. 2009/1/7 Rockmaster rockmast...@gmail.com: Hello, I'm a bit confused by regular expressions in Python. I tested the following regex with http://re.dabase.com/, and it got a match there, but I can't seem to get a match once I run this: ( example line from xlines: X= 0. ) progX = re.compile('X=\s*\d+\.?\d*', re.I) xparts = [] for val in xlines: mX = progX.match(val) Any ideas? --~--~-~--~~~---~--~~ 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: regex problems
It's always something simple. 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: Crazy Apps account / Google account behavior
Hi Taylor, I will follow up with you off the group to get this sorted out. In generally, having an account that is both a Google Apps and Google Account is not a good idea with App Engine because what you have described will happen. You can read more about this here: http://code.google.com/appengine/articles/auth.html -Marzia On Tue, Jan 6, 2009 at 3:49 PM, Taylor Hughes tay...@nemeannetworks.comwrote: More: If I add a new application while logged in as my Google account, I am immediately sent to an Unauthorized page -- and the new app shows up under my Apps account! (Just created crazytimeexcellent and saw this behavior.) On Jan 6, 5:46 pm, Taylor Hughes tay...@nemeannetworks.com wrote: So, I have an application that belonged to my Google account. Earlier today, our IT guy registered a Google Apps account for our domain -- and added an account with the same username / e-mail as my Google account (tay...@nemeannetworks.com). Just now, I deleted a *different developer* from the application -- signed in as my Google account. Upon saving, I was redirected to an Unauthorized to view this application page, and much to my dismay, I no longer had access to my application's admin console. Shockingly, however: I now have access to the admin console for my app *with my Google Apps login.* I did not delete or re-invite myself, it just happened by magic. Is there any way to grant access back to my Google account instead of to my Google Apps account without changing my Google account's e-mail address? Thanks, Taylor Hughes --~--~-~--~~~---~--~~ 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] delete application in future?
I know there is currently no way to delete an application, but I am wondering if this will be possible in the future. The reason to do this would be to free up slots in the quota (currently 10 apps) we are given. If this will be possible in the future, when is an approximate timeframe? 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: delete application in future?
Thank you. On Jan 6, 4:33 pm, Alexander Kojevnikov alexan...@kojevnikov.com wrote: Star this issue to follow it up:http://code.google.com/p/googleappengine/issues/detail?id=335 On Jan 7, 11:28 am, SM sanja...@gmail.com wrote: I know there is currently no way to delete an application, but I am wondering if this will be possible in the future. The reason to do this would be to free up slots in the quota (currently 10 apps) we are given. If this will be possible in the future, when is an approximate timeframe? 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] Announce - Cumulo SAASi
Cumulo has opened up a limited beta for Cumulo SAASi. With Cumulo SAASi, you can write web services in any programming language in less than one hour. There is no network programming, only a simple command line protocol that allows you to wrap any piece of code (in any programming language), and bring it online as a web service. Full access controls and analytics are supplied for each web service. See http://www.cumulosoftware.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Configuring Friend Connect
could u help me, with what u asked? TIA. --~--~-~--~~~---~--~~ 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] 500 server error despite proper testing on dev_appserver.py and upload
On Jan 3, 7:34 am, pgctesting001 pgctesting...@gmail.com wrote: I used the google app engin sdk to develop a simple app for testing on upload to my standard test site. the sdk and gdata installed properly, the tests ran ok, my html file showed in the development server on my platfor, I created the app engine with cell phone call back procedure and uploaded the app to my test site and it is active and showing activity from the control panel. when I try to invoke it, I get a 500 Server Error from google, but nothing in the app's error logs. the app: print Content-type: text/html\n\n; print 'br' print 'pHello, world!/p' print 'br /' print 'strongThis is a test of the Google loader/strong' print 'br /' print 'strongHello, Thomas. How do you like me now?/strong' print 'br /' print 'strongHello, Tony. See what your help has produced?/strong' print 'br /' print 'strongFrom San Francisco, January 2, 2009./strong' the yaml file: application: pgctesting0102 version: 1 runtime: python api_version: 1 handlers: - url: /.* script: pgctesting0102.py --~--~-~--~~~---~--~~ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---