[google-appengine] Re: db.ReferenceProperty - need some mechanism for disabling collection
Andy Freeman wrote: class A(db.Model): pass class B(db.Model): a = db.ReferenceProperty(A) In some cases, it's an error to use instances of A to refer to instances of B. It would be nice to have some documented way to express that fact, to make it so that A.get(key).b_set throws an exception. I don't know why it would be an error or why you want to throw an exception, but the b_set attribute is just a query. You can always create your own query function that does whatever it is you want. Maybe something like the following: class A(db.Model): def get_b_set(self): if self.cant_refer_back_to_b: raise Exception return self.b_set_private class B(db.Model): a = db.ReferenceProperty(A, collection_name = b_set_private) 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Why python?
Strange Grammer ? Where is your mind?? On Oct 10, 8:50 am, Leo(雷傲) [EMAIL PROTECTED] wrote: I hate python's strange grammer! It's not neccesary to build a new style of grammer since the c-like grammer is so successful ! And I think the OOP is not so great. The procedure programming language is still powerful and will continue its power! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Timeout - operation took too long
I am also seeing a lot of time spent in WAIT? Sometimes as much as 3/4 of total CPU for any given set of calls! Has the datastore latency issue mentioned above been resolved? Here is an example from a profile run: ncalls tottime percall cumtime percall filename:lineno(function) 110.6490.0590.9370.085 {google3.apphosting.runtime._apphosting_runtime___python__apiproxy.Wait} On Oct 2, 2:33 pm, Sylvain [EMAIL PROTECTED] wrote: How can we help for this ? Each day, I've several Timeout. Do you still need more info about it (date,time, app_id,...) ? Regards On 30 sep, 18:57, johnP [EMAIL PROTECTED] wrote: For a while today, I started seeing errors in custom form validation. Requesting self.instance in ModelForm form resulted in ValueErrors. Now, it seems to have recovered a bit... On Sep 30, 9:43 am, Adam Loving [EMAIL PROTECTED] wrote: I am seeing the datastoretimeouterror intermittently several times a day (application = toyvirtualgifts) on a fairly simple put operation. Could this be caused by the rest of the request taking too long (like if thetimeoutfor the entire request fires during the put)? It doesn't seem like that would be the case here, but that's the only explanation I can think of. File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 618, in put return datastore.Put(self._entity) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 162, in Put raise _ToDatastoreError(err) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 1627, in _ToDatastoreError raise errors[err.application_error](err.error_detail) Timeout Thanks, Adam On Sep 28, 3:19 am, Ronald [EMAIL PROTECTED] wrote: Hi, I don't know how much work has been done on this front, but my app is still cripple by this issue. Maybe the amount oftimeouterrors in the log has decrease a little, but so has the amount of happy users of my site =( /ronald On Sep 19, 9:45 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi, Our engineers are looking in to your reports. If all of the people experiencing quota issues like this could email me directly with your application id, as well as the approximate times these errors were occurring, that would be helpful! Thanks, Marzia On Fri, Sep 19, 2008 at 11:17 AM, Michael Bailey [EMAIL PROTECTED]wrote: I got the error below on a app that has almost zero traffic: see screenshot: http://imagebin.ca/img/3rlwzkBy.png Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 496, in __call__ handler.get(*groups) File /base/data/home/apps/***/1.4/search.py, line 25, in get for kw in kws: File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 1257, in __iter__ return self.run() File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 1589, in run query_run = self._proto_query.Run(*self._args, **self._kwds) File /base/python_lib/versions/1/google/appengine/ext/gql/ __init__.py, line 572, in Run it = bind_results.Run() File /base/python_lib/versions/1/google/appengine/ext/gql/ __init__.py, line 1211, in Run results.append(bound_query.Run()) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 860, in Run return self._Run() File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 879, in _Run apiproxy_stub_map.MakeSyncCall('datastore_v3', 'RunQuery', pb, result) File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py, line 46, in MakeSyncCall stub.MakeSyncCall(service, call, request, response) File /base/python_lib/versions/1/google/appengine/runtime/ apiproxy.py, line 246, in MakeSyncCall rpc.CheckSuccess() File /base/python_lib/versions/1/google/appengine/runtime/ apiproxy.py, line 189, in CheckSuccess raise self.exception OverQuotaError: The API call datastore_v3.RunQuery() required more quota than is available. On Sep 10, 1:16 pm, Ronald [EMAIL PROTECTED] wrote: Hi, I'm seeing a number ofTimeouterrors on my log file: Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 496, in __call__ handler.get(*groups) File /base/data/home/apps/40tazo/2.29/index.py, line 46, in get moves = g.move(card,pickups) File /base/data/home/apps/40tazo/2.29/game.py, line 231, in move self.save() File /base/data/home/apps/40tazo/2.29/game.py,
[google-appengine] Re: GAE Jaxer
Jaxer's idea is simple. Take the same JavaScript knowledge you use in building rich internet applications and apply them to the server side as well. http://www.insideria.com/2008/01/jaxer-installation-impressions.html On Oct 10, 10:07 pm, Davide Rognoni [EMAIL PROTECTED] wrote: http://www.aptana.com/jaxer Google, let's go! :-) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: datastore exception handling examples
@Marzia Niccolai: thanks for taking the time to reply, I look forward to the articles when they come in due course. In the mean time I'll check out the example code and see what I can incorporate _ @Bill: thanks, ill take a look. On Oct 10, 6:24 pm, Bill [EMAIL PROTECTED] wrote: Are there any articles or sample code, showing how to robustly handle datastore exceptions, for production standard code? David, I recently modified my memcached, sharded counter system to handle various datastore exceptions:http://billkatz.com/2008/10/Fault-tolerant-counters-for-App-Engine You can look at or copy the open source code referenced in that article. It also depends on your app requirements. The above counter shouldn't be used for banking, for example, because if there are simultaneous memcache and datastore errors, you lose pending increments. But if you want something that minimizes the impact of exceptions for things like votes, it's a reasonable approach. -Bill --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: datastore transaction question
thanks for your replies, especially yejun, that thread is very informative, not only now, but of a problem I could see coming when I need to transact a product from one user to another and money must also be updated on both users. On Oct 10, 8:31 pm, yejun [EMAIL PROTECTED] wrote: I found an old thread on this topic.http://groups.google.com/group/google-appengine/browse_thread/thread/... It seems eventual consistency is the only practical option. On Oct 9, 1:04 pm, David [EMAIL PROTECTED] wrote: Hi, a question for all you datastore gurus: If I have: class User(db.Model): money = db.IntegerProperty(required=True) class Thing(db.Model): cost = db.IntegerProperty(required=True) stuff = db.BlobProperty(required=True) I need to allow a user to create a new thing and then reference the things they have somehow. So a request would be called with the cost and the blob data, and I would like to put a new Thing in the datastore. But heres the problem, only if the user has enough money to create the new Thing. This is causing me a issue, as i cant update two separate entity groups in one transaction. unless im missing something i dont want to group them as the Thing may be sold at a later data to a new User. so i need to: 1)get the users money 2)if they have enough create the Thing and put it in the datastore 3)update the users money and reference the Thing to the user somehow and re-store If any of this fails i need it all to roll back. Currently im creating the Thing regardles and performing a transaction on the User, if this fails i delete the Thing after. This makes me uneasy :) any suggestions would be most welcome. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: page not refreshing properly
Probably this issue (accepted) http://code.google.com/p/googleappengine/issues/detail?id=732 On 10 oct, 23:00, Jeff S [EMAIL PROTECTED] wrote: Hi ae, When you say that the page does not refresh properly, could you be more specific? Is it that the redirect doesn't happen, or the page content is not what you expect?... Cheers, Jeff On Oct 9, 7:17 pm, ae [EMAIL PROTECTED] wrote: I have a Sign Out link that signs somebody out and redirects them back to where they were (same url but with slightly different content)... but the page doesn't seem to refresh properly all the time. What's the best way to solve this? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: www [mydomain.org] Already used, please remove previous mapping first.
Worked for me, thanks Marzia. On Oct 10, 4:15 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi, For directions on how to remove the sites 'www' mapping in Google Apps, I've put together a quick page (nothing fancy :) http://groups.google.com/group/google-appengine/web/deleting-existing... This seems to be the issue most people are having when receiving this message. -Marzia On Wed, Oct 8, 2008 at 11:03 AM, Brade [EMAIL PROTECTED] wrote: In firefox I get the Address Not Found page, which would seem to mean that www is free to use if I wanted to. but I'm still not allowed to... --brad g. On Oct 8, 1:51 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi, Where are you taken when you hit 'www.yourdomain.com'?This is where the subdomain mapping is currently going, when you know that you can disable that service mapping to www. -Marzia On Wed, Oct 8, 2008 at 1:27 AM, ID [EMAIL PROTECTED] wrote: Hi, thanks for replying. I have checked, 'www' is not assigned to Sites, Pages, or anywhere else. this is a fresh domain, purchased thru google/enom. sites assigned to 'sites' and pages assignd to 'pages' subdomains already by default. 'www' assigned nowhere, yet it shows error 'Duplicate value' when trying to assign Pages or Sites. and shows error 'Already used, please remove previous mapping first' when trying to assign to Appengine app. thanks On Oct 7, 1:24 am, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi, The issue here is that, by default, Google Apps has assigned www to sites, and you have to disable this before mapping www to an App Engine app. Unfortunately, it's not very clear on how to do this in the Google Apps admin panel. To get www to work with your app, enable sites, if it isn't already, and go to the service settings for sites. Find and delete the 'www' mapping in the service settings. After this, you should be able to map your App Engine app towww.mydomain.com. -MarziaOn Mon, Oct 6, 2008 at 4:20 AM, Sylvain [EMAIL PROTECTED] wrote: Can you create an issue for this ? http://code.google.com/p/googleappengine/issues/list On 6 oct, 11:09, ID [EMAIL PROTECTED] wrote: Basically problem seems to be is this: Google Apps thinks 'www' is assigned to some service, thus locking 'www' so it cant be assigned any other service. But user can not see which service 'www' was assigned to by Google apps, therefore user not able to changed or disabled it. On Oct 5, 7:33 pm, Tom [EMAIL PROTECTED] wrote: Please try the following: Go to your site's dashboardhttps:// www.google.com/a/cpanel/[yourdomain.org]/Dashboardhttp://www.google.com/a/cpanel/%5Byourdomain.org%5D/Dashboard http://www.google.com/a/cpanel/%5Byourdomain.org%5D/Dashboard http://www.google.com/a/cpanel/%5Byourdomain.org%5D/Dashboard From there you'll likely see the Web Pages service set towww.yourdomain.org. Clicking on that will let you rename it (to home.yourdomain.orgfor example). Hope that helps! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Reference collection fetching
Hello, Say I have a one-to-many relationship between 'Father' and 'Son' modeled with a reference property on the Son entity. After fetching all sons of a father, are the father references of those sons prepopulated, or will they also be fetched? Illustrated in code... class Father(db.Model): name = db.StringProperty() class Son(db.Model): father = db.ReferenceProperty(Father) father = Father.get_by_key_name(some_key) # DataStore access sons = father.son_set.fetch(1000) # DataStore access for son in sons: logging.info(son.father.name) # DataStore access??? On a side note, I could figure this out myself if there were some way to log datastore access. Have I looked over some way to enabled this sort of logging? Thanks, Jeff --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Shutdown deployed application?
I don't think you can as a first-order operation. But, you could easily upload a version of your app that is shut down (possibly with nice, simple, static messages to that effect). If you upload it under a different version string (change version: in app.yaml), then you'd be able to shut down the app by switching the version in the Versions section of the dashboard. Of course, anyone who can guess your other version string could still access the old app, so this isn't as complete as an actual app-logic level change. On Oct 11, 1:00 am, GMan [EMAIL PROTECTED] wrote: Hi, Is there a way to shutdown the application once it isdeployed? Is this possible thru the Dashboard? If so, is it also possible to restart it, or can you simply re-deploy it? Thanks, GMan --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Reference collection fetching
Answering my own question here... father = Father.all().filter(name =, John).get() father.name = Doe sons = father.son_set.fetch(1000) print sons[0].father.name #prints 'John' Maybe I'm just used to more 'traditional' ORM systems, but that seems to me unintuitive. Not too mention inefficient. Since Google is so concerned with performance, you'd think they would have built-in some sort of level 1 cache for entities. Oh well... And I'd still like to be able to have a datastore access log. Jeff On Oct 11, 4:29 pm, Jeff Nichols [EMAIL PROTECTED] wrote: Hello, Say I have a one-to-many relationship between 'Father' and 'Son' modeled with a reference property on the Son entity. After fetching all sons of a father, are the father references of those sons prepopulated, or will they also be fetched? Illustrated in code... class Father(db.Model): name = db.StringProperty() class Son(db.Model): father = db.ReferenceProperty(Father) father = Father.get_by_key_name(some_key) # DataStore access sons = father.son_set.fetch(1000) # DataStore access for son in sons: logging.info(son.father.name) # DataStore access??? On a side note, I could figure this out myself if there were some way to log datastore access. Have I looked over some way to enabled this sort of logging? Thanks, Jeff --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] how to create a plugable system and API without pkg_resources
I have become used to / spoiled with entry points from pkg_resources and setuptools. What is a similar system that avoids too much reinventing of the wheel? The goal is to facilitate a plugable system where directories or files (much like with eggs) can be dropped in the appropriate directory and extend the system through existing extension points as well as define new ones. I am most familiar with the Trac use of this and really like it. That said, I am very open to suggestions on how to use another system (hopefully not homegrown as I am sure many others do this). Thank you, Jason --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: how to create a plugable system and API without pkg_resources
It isn't impossible to use pkg_resources and setuptools with GAE. Pylons makes use of these and appengine-monkey ( http://code.google.com/p/appengine-monkey/ ) was created to get Pylons working on GAE. If you aren't using Pylons appengine-monkey still may prove useful to you. On Oct 11, 10:51 am, sevenseeker [EMAIL PROTECTED] wrote: I have become used to / spoiled with entry points from pkg_resources and setuptools. What is a similar system that avoids too much reinventing of the wheel? The goal is to facilitate a plugable system where directories or files (much like with eggs) can be dropped in the appropriate directory and extend the system through existing extension points as well as define new ones. I am most familiar with the Trac use of this and really like it. That said, I am very open to suggestions on how to use another system (hopefully not homegrown as I am sure many others do this). Thank you, Jason --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: unable to add 'www' subdomain for app engine service
Hi Marzia- A slight variation on it worked -- thanks! I just had to first add a mapping in Google sites for www and then delete it once it was there. It was not there by default. All set now though -- thanks again. -Adam On Oct 10, 4:16 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi, Can you follow the directions here: http://groups.google.com/group/google-appengine/web/deleting-existing... To see if this helps? The common case seems like Google Sites is using 'www' whether or not Sites is enabled. -Marzia On Thu, Oct 9, 2008 at 5:55 PM, Adam Fisk [EMAIL PROTECTED] wrote: littleshoot.org. I didn't realize it was a www issue at first, but it definitely is. I'm able to add multiple other subdomains no problem. On Oct 9, 1:33 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi Adam, With which domain are you experiencing this issue? -Marzia On Thu, Oct 9, 2008 at 1:27 PM, Adam Fisk [EMAIL PROTECTED] wrote: I have the exact same problem. Any solutions? The unfortunately result is *my site is completely down.* This makes it virtually impossible to port a www.* site, which would account for, well, most of the sites on the Internet. -Adam On Oct 9, 11:13 am, ajablo [EMAIL PROTECTED] wrote: Hello, the domain in question is probud.info At the very begining it returned a 404, but it seemed like it originated from google page creator team (???) Then I configured google sites (it was google pages before I guess) in my apps profile to use 'www' prefix and it worked perfectly for sites. What I did then was to change the sites prefix from 'www' to 'temp' (both in my domain's CNAME records) just to try if maybe this time my appengine's service will work under 'www', unfortunately it didn't. Any attempt to assign it to appengine service is simply ignored without any error message. Current status is: I disabled sites completely for my domain (prefix history for sites is 'www' - 'temp' - disabled), when I open bothwww.probud.infoandtemp.probud.infoI get 'forbidden error 403' now. Assigning 'www' to my appengine service still fails. It seems like google has a big mess in there? Many thanks for your help, Adam On Oct 9, 6:57 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi, Can you please reply with the domain experiencing the issue? Also if you go towww.yourdomain.comanditdoesnot return a 404, what is shown would indicate what service it's currently mapped to. -Marzia On Thu, Oct 9, 2008 at 5:31 AM, ajablo [EMAIL PROTECTED] wrote: Hello, All my attempts to add 'www'subdomainto host my app as a AppEngine service in Google Apps fail silently. No error message. I can add any othersubdomain, like 'temp' or whatever with success. And I would like to assure that there are no other services configured to use 'www' subdomain. Many thanks for your help, Adam --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Google stop emailing comments
I have created issue asking google to stop email us every silly comment like +1 in issues. http://code.google.com/p/googleappengine/issues/detail?id=780 Please, star it. I do not see any other way from getting rid off those emails. I still wish to support Java and HTTPS. I can create rule to delete [EMAIL PROTECTED] with Issue in Subject but I believe I can loose some good email. May be should have option to unsubscribe from comments in some issues. 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Datastore: Query for .key does not work
On Aug 22, 9:55 am, Marzia Niccolai [EMAIL PROTECTED] wrote: You can't query for the key, there is really no need. I disagree that there is no need. I have some code that deals with a wide variety of models. The name of the model is passed in, so I do not have the model object. I want to do a query like this: q = db.GqlQuery(SELECT * FROM %s WHERE KEY = :k % tablename, k=key) orq = db.GqlQuery(SELECT * FROM %s WHERE :f = :v % tablename, f=field, v=value) # f happens to be key but I can't. Yes, I can do this (and it's how I handled it): eval(tablename).get(key) but (a) this is considerably clunkier, (b) it throws errors instead of handling an invalid table or key gracefully with no results returned, and (c) it doesn't support the second case, where the field name is a parameter -- you have to special case if (field.lower()==key) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Cant see my image and favicon :(
Hello, I have 2 url's: * http://shinobiwars.appspot.com/ranking - each img alt= src=avatars/default.png / is displayed corectly * http://shinobiwars.appspot.com/user/profile - img alt= src=avatars/default.png / is not visible :[ why? my app.yaml ** application: shinobiwars version: 1 api_version: 1 runtime: python handlers: - url: /avatars static_dir: avatars - url: /favicon.ico static_files: template/favicon.ico upload: template/favicon.ico - url: .* script: main.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: hackathon in Toronto, Canada?
Hmm two responses, not bad but could be better. I know there are more people in Toronto doing GAE. Now that the GAE Engineers have released Google Hackathon in a Box, I would like to implement a Toronto GAE Hackathon based on that. I have some ideas on venues. In the meantime, I've done the first step and sent an email to hackathonInABox. ilia. On Aug 18, 1:21 pm, AndyTI [EMAIL PROTECTED] wrote: I would love ahackathoninToronto! On Aug 17, 8:40 pm, Michael [EMAIL PROTECTED] wrote: I am interested. Mike, On Aug 16, 5:21 pm, Ilia Lobsanov [EMAIL PROTECTED] wrote: Anyone up for ahackathonorhackathon-like event inToronto, Canada? Please post a comment so I can gauge the interest. As an aside, is there an official channel for setting up GAE hackathons? Or can anyone start one? ilia --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Reference collection fetching
If you put your own __init__ in your model classes, you can count how many times instances are created. You can then watch the count to figure out where/when those model classes are created. Since successful datastore queries create instances of model classes # watch A._counter class A(db.Model): _counter = 0 def __init__(self, *args, **kwds): A._counter += 1 super(A, self).__init__(*args, **kwds) On Oct 11, 10:55 am, Jeff Nichols [EMAIL PROTECTED] wrote: Answering my own question here... father = Father.all().filter(name =, John).get() father.name = Doe sons = father.son_set.fetch(1000) print sons[0].father.name #prints 'John' Maybe I'm just used to more 'traditional' ORM systems, but that seems to me unintuitive. Not too mention inefficient. Since Google is so concerned with performance, you'd think they would have built-in some sort of level 1 cache for entities. Oh well... And I'd still like to be able to have a datastore access log. Jeff On Oct 11, 4:29 pm, Jeff Nichols [EMAIL PROTECTED] wrote: Hello, Say I have a one-to-many relationship between 'Father' and 'Son' modeled with a reference property on the Son entity. After fetching all sons of a father, are the father references of those sons prepopulated, or will they also be fetched? Illustrated in code... class Father(db.Model): name = db.StringProperty() class Son(db.Model): father = db.ReferenceProperty(Father) father = Father.get_by_key_name(some_key) # DataStore access sons = father.son_set.fetch(1000) # DataStore access for son in sons: logging.info(son.father.name) # DataStore access??? On a side note, I could figure this out myself if there were some way to log datastore access. Have I looked over some way to enabled this sort of logging? Thanks, Jeff- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: db.ReferenceProperty - need some mechanism for disabling collection
It's an error in the sense that I know that any code that tries to use certain back links, a.b_set in this example, is wrong according to what I know about my schema. Since I don't define b_set in A if I want back links, I'd really rather not say that I don't want b_set in A if I don't want it, especially if the way I say it looks a lot like a definition of b_set. I suppose that I could make my own version of db.Reference property that create a random name for unwanted backlinks. On Oct 10, 11:51 pm, Ross Ridge [EMAIL PROTECTED] wrote: Andy Freeman wrote: class A(db.Model): pass class B(db.Model): a = db.ReferenceProperty(A) In some cases, it's an error to use instances of A to refer to instances of B. It would be nice to have some documented way to express that fact, to make it so that A.get(key).b_set throws an exception. I don't know why it would be an error or why you want to throw an exception, but the b_set attribute is just a query. You can always create your own query function that does whatever it is you want. Maybe something like the following: class A(db.Model): def get_b_set(self): if self.cant_refer_back_to_b: raise Exception return self.b_set_private class B(db.Model): a = db.ReferenceProperty(A, collection_name = b_set_private) 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: db.ReferenceProperty - need some mechanism for disabling collection
Andy Freeman wrote: I suppose that I could make my own version of db.Reference property that create a random name for unwanted backlinks. If that's all you want then just give it a name that, like in my example, says that it shouldn't be used. There's nothing you can do enforce your schema. If someone wants to find all the B's that refer to a given A, they can just create their own query. 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: a way to determine image size would be greatly appreciated
Thanks Jeff, that is indeed pretty much the same issue. I swear I searched for it, but it was late... Anyways, I'm loving the GAE with Django 1.0. I'm excited to see how it evolves. thanks, - Claude On Oct 10, 1:47 pm, Jeff S [EMAIL PROTECTED] wrote: Hi Claude, This sounds a bit like the following feature request:http://code.google.com/p/googleappengine/issues/detail?id=435but your idea may be slightly different. Feel free to star this one, or file a new issue :) Thank you, Jeff On Oct 9, 10:25 pm, cz [EMAIL PROTECTED] wrote: If there was just one thing to add to the Image api, a way to determine the image size would be highest on my list. It just seems so easy to add... would it not be possible to stuff a couple of integers (height,width) along with the image data into the image service response ProtocolMessage? Maybe it's not so easy, I don't really know. But please, please, could someone at Google spend a couple of minutes to look into it? thanks, - Claude --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---