Re: [google-appengine] Memory usage while parsing XML file into Google App Engine datastore
Have you looked into using the Remote API https://developers.google.com/appengine/docs/python/tools/remoteapi https://developers.google.com/appengine/articles/remote_api You use your local machine to parse the file [no memory problems], create the needed objects, and put them in the datastore in batches. You can use a modified class Mapper to do the batch write as found in https://developers.google.com/appengine/articles/deferred -- You received this message because you are subscribed to the Google Groups Google App Engine group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/groups/opt_out.
Re: [google-appengine] How to show key name from datamodel.all() on Django template
lia href=/anime?key={{ myProject.key_name }} use {{myProject.key.name}} {{myProject.key.id}} {{myProject.key.id_or_name}} https://developers.google.com/appengine/docs/python/datastore/keyclass -- You received this message because you are subscribed to the Google Groups Google App Engine group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/groups/opt_out.
Re: [google-appengine] Stylesheet not being applied in Chome browser
I always use the following method when uploading new application code. I have two versions of the code: dev and main main is the default version. I upload the new code to the dev version and test if the update is working by using the url http://dev.appname.appspot.com Then temporarily make dev the default version. Upload the code to main and make main the default. This method never failed for static content (css,js). I need to force reload shift-ctrl-R the page to ignore the browser cache content. If you apply a cache buster to your css link your users will see the updated css immediate. link type=text/css rel=stylesheet href=/css/style.css?ver=20120104 You need to change the string anytime you upload a new version. If you use source version control you can use the version number of the css file. -- 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.
Re: [google-appengine] Feature Request: In Dashboard Schedule a default version deployment when instances die down
Instances die down automatic when you upload a new version. -- 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.
Re: [google-appengine] Desired feature in dashboard data viewer entity list, show full owned entity ids.
You can write your own version of the datastore viewer that dumps the objects of the Kind you want. When you have the key of an entity ask for the parent key with the Key.parent() method http://code.google.com/appengine/docs/python/datastore/keyclass.html#Key_parent Get the Key.kind() and Key.id_or_name() Continue until you get None as return and then reverse the list and display Op 2 januari 2012 18:09 heeft Brandon Donnelson branflake2...@gmail.com het volgende geschreven: I'd like to see the possibility to show the entire full entity id. Or click on a checkbox for detailed view. [] all values| details My imagined full detailed view of id would be like: from: id=4126 to: Decoded entity key: LearningPlanJdo: id=31096 CourseJdo: id=7150 CourseProgressJdo: id=4126 I'm looking for a pattern and its slow to open up each entity details view. Brandon Donnelson http://c.gwt-examples.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.
Re: [google-appengine] How to Filter the logs based on instance or loading_request using Labels
If you download the logs you get these extra info labels, and then do a grep or regex search Op 24 november 2011 01:37 heeft Scott Murphy sc...@pixoto.com het volgende geschreven: I would like to Filter all 500 requests for a specific instance. Is this possible using labels? I don't know which label to use for instance and/or loading_request? The information I want is in the first line of the log 0.1.0.3 - - [23/Nov/2011:16:05:58 -0800] GET /_ah/warmup HTTP/1.1 500 0 - - 10.354882841056537036.myapp.appspot.com ms=68570 cpu_ms=31239 api_cpu_ms=65 cpm_usd=0.867775 loading_request=1 exit_code=104 instance=00c61b117cde1998d024f2dbbd67e9f4d3dc1f So I want to do something like status:500, instance:00c61b117cde1998d024f2dbbd67e9f4d3dc1f but the valid labels are: Valid labels: day, month, year, hour, minute, second, tzone, remotehost, identd_user, user, status, bytes, referrer, useragent, method, path, querystring, protocol, request_id_hash -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/O2Ndn_cFnksJ. 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. -- 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.
Re: [google-appengine] Re: Large difference between datastore quota detail and appstat.
Does ndb support lists in get_by_id()? This could then be executed in parallel. You should then check with appstats on the GAE hardware if it works in parallel. db_keys = EMail.query(EMail.Status != 'Complete').fetch(keys_only=True) res = EMail.get_by_id( [k.id() for k in db_keys] ) list comprehensions are faster then append() calls -- 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.
Re: [google-appengine] Datastore operations are seriously expensive
The links is a redirect to http://code.google.com/appengine/docs/kb/billing.html But it should be (I think) http://code.google.com/appengine/kb/billing.html 7 november 2011 17:48 Kenneth kennet...@aladdinschools.com wrote: This may be old news to people but I just discovered it. http://code.google.com/appengine/kb/postpreviewpricing.html#operations_charged_for -- 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.
Re: [google-appengine] Re: How to determine datastore reads?
The RPC.Get and RPC.RunQuery can result in many Datastore Read Ops. They can return more then one object and thus read multiple index entries and multiple objects. Google is able to tally the Datastore Read and Write Ops. Why is there no API call that will return these numbers for the current request? I have changed part of my application to construct and read an aggregate object (containing the attributes of many small objects). The result is that the number of Datastore Read Ops dropped considerable. I'm still having a large number of Read Ops left and have no idea which requests are responsible for the bulk of them. It takes a long time to find the culprit because the billing stats lags quit some time. Op 15 oktober 2011 21:39 heeft Rishi Arora rishi.ar...@ship-rack.com het volgende geschreven: Actually, appstats is more consistent with the old pricing model, and so, it only shows up number of datastore queries executed, puts and gets, for each RPC. Here's a screenshot from the link I posted earlier: http://1.bp.blogspot.com/_dLfQMJsmsaI/S7NKKyRM5-I/AEA/rfaOPZXtr80/s1600/Picture+4.png The request history section shows recent requests, and if you expand a request, it'll show you datastore puts, gets, and queries. I believe gets translate to reads one-to-one, but puts depend on how many indexes get modified in the process. One put will almost always translate to multiple data store writes (one of each index that gets updated, and one for the entity being modified) -- 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.
Re: [google-appengine] 6470ms for a memcache get and write out the result?
page = CachedObject.all(keys_only=True).filter('appversion =', appversion) \ .filter('uri =', uri).get() if page: p = db.get(str(page)) self.write(p.html) memcache.set(cachekey, p.html, namespace='cachedpage|%s'%appversion) return else: Why do you first check to see if the datastore object exist (keys_only=True) and then fetch if key is found. This adds an extra RPC roundtrip. Just fetch the object and test page for None page = CachedObject.all().filter('appversion =', appversion) \ .filter('uri =', uri).get() if page: self.write(p.html) memcache.set(cachekey, p.html, namespace='cachedpage|%s'%appversion) return else: -- 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.
Re: [google-appengine] Re: How to determine datastore reads?
Where in the Appstats result can I find the number of Datastore Read Ops used in this request or in a certain RPC of the request? Op 14 oktober 2011 06:43 heeft Rishi Arora rishi.ar...@ship-rack.com het volgende geschreven: Appstats http://googleappengine.blogspot.com/2010/03/easy-performance-profiling-with.html On Thu, Oct 13, 2011 at 10:34 PM, J ja...@mapstagram.com wrote: Anyone know a way I can profile my app to see where my datastore reads are coming from? -- 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.
Re: [google-appengine] Re: API call datastore_v3.Put() required more quota ?
If you delete many entities it's faster to use a cursor. An entity is marked as deleted and will physically be removed in the datastore at a later time. It takes time to skip the marked entities when executing a query. The loop can be modified as such, no need to use count() as it uses CPU and time also, if the result set is empty there are no entities. try: cursor = None while True: q = Documents.all(keys_only=True) if cursor: q.with_cursor(cursor) result = q.fetch(200) if not result: break cursor = q.cursor() db.delete(result) except Exception, e: self.response.out.write(repr(e)+'\n') pass Op 16 september 2011 18:24 heeft sofia sofiacard...@gmail.com het volgende geschreven: I have the same problem.. Datastore quota at 100% and unable to delete an entity either through admin or using map/reduce. What I did is set up a script to delete x records at a time. I've managed to decrease data by 45% in 2 days but I then hit cpu quota so I'm guessing it's gonna take a few more days until I'm able to delete all the data. What i did was set up this script, bulkdelete.py: #!/usr/bin/env python # -*- coding: UTF-8 -*- # # import time from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.ext import db from lib.model import Documents class BulkDelete(webapp.RequestHandler): def get(self): self.response.headers['Content-Type'] = 'text/plain' mod = self.request.get('m') if not mod: exit try: while True: q = db.GqlQuery(SELECT __key__ FROM Documents ORDER BY date ASC) assert q.count() db.delete(q.fetch(200)) time.sleep(0.5) except Exception, e: self.response.out.write(repr(e)+'\n') pass # init application = webapp.WSGIApplication([('/bulkdelete', BulkDelete)],debug=True) def main(): run_wsgi_app(application) if __name__ == '__main__': main() and then call it each 5 min through cron.yaml. -- 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.
Re: [google-appengine] Datastore Read and Writes Statstics
It would be really nice if the WriteOps and ReadOps are logged for each request. Like the loading_request and ms time that is added to a line in the log. That way you can download the logs and find out which request is making the most Ops and perhaps needs a look at if it can be optimized. Op 22 september 2011 14:29 heeft Vivek Puri v...@vivekpuri.com het volgende geschreven: For Estimated Charges Under New Pricing, my app is showing $40/per day for Writes and $13/day for Reads. $40 worth of writes is 40 million write operations. Right now i have not idea which table is being written to most and contributing to that number. Can AppEngine team provide statistics on these write and read operations. I would hope this is something similar to existing Datastore Statistics tool. -- 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.
Re: [google-appengine] Instance Hours, Python Concurrency, and Regret
What also could reduce the instance hours billed is a slider that sets the instance idle time. The time an instance is kept alive idle is at the moment 10min. My loading request time is about 1.5 sec (webapp). It would be very helpful to have a slider in the Application Settings where I can adjust the idle time in increments of 5 or 10 seconds. -- 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.
Re: [google-appengine] GAE is missing requests
If you use Python API do you have the correct if __name__== 'main': main() in your code 2011/7/12 Nikolay Sohryakov nikolay.sohrya...@gmail.com: Hi, Sometimes GAE is missing my requests and instead of the requested page i get a clean page in my browser! Can you fix it please? I've tested it in different browsers on different computers. Thank you. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/BumLr0219OwJ. 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. -- 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.
Re: [google-appengine] disable, delete, remove ID/Name in a kind (table)
You can't. It's the primary key of the kind. The objects are fetched using this key. 2011/5/30 David Stone minpeng2...@gmail.com: Hello, I click on DataViewer to see my kinds (tables). No matter which kind (table) i look into and i always see the property (attribute) ID/ Name. I have not found any use of this attribute and really want to disable or remove or delete it. Is there any way to do so? Thanks! David -- 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. -- 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.
Re: [google-appengine] Violation of TOS?
It's a practice that more developers do. Have a separate app that is used for development and testing of the application without the risk of corrupting the main data. Give it a name like myapp_dev and if it does not cooperate together with the main app there is no problem with the TOS. 2011/4/24 David Hewitson thesplatz...@gmail.com: Hi there, I'm developing an application which provides an API for other developers to use freely -- at least, it will when I finish writing it. I want to create a fairly advanced example application for the API which would need to be its own independent appengine app, mostly because I don't want to mess up my core application's datastore with example data. Is that a violation of the terms of service which forbids multiple applications to evade fees? I'm not trying to trick anyone, I just want to keep things tidy. Hope I managed to convey my point. Cheers, David -- David -- 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.
Re: [google-appengine] Help a Newbie and earn Karma
The method dict.values() is the same as your mapToList(dictionary) function, but a lot faster. 2011/4/14 Jeremy Foote jdfoo...@gmail.com: I am new to App Engine, new to Python, and new to programming. :) Unfortunately, I don't know what I don't know, so this question will be more vague than I would like. -- 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.
Re: [google-appengine] Clarification on appengine-mapreduce
If you can filter the subset based on the key_name values (some kind of prefix) you can use the method described in http://djidjadji.appspot.com/2011-02-24-Near-optimal-key-ranges-for-GAE-mapreduce It uses a custom _split_input_from_namespace() method in a mapreduce.input_readers.DatastoreInputReader subclass 2011/4/8 Dan Dubois uvico...@gmail.com: OK thanks for letting me know. I am certainly looking forward to being able to map over a subset of entities. It'll make my implementation of broadcasting using the Channel API much nicer! -- 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.
Re: [google-appengine] Re: What's the syntax of the cron job for the first day of every month?
In the dev server you can see at what time the cron job would be scheduled. 2011/3/25 王宇辉 yuhui.w...@gmail.com: At least it can be parsed by google and uploaded to the backend :-) 2011/3/25 nickmilon nickmi...@gmail.com How do you know ? I guess you have to wait till the end of the month to see if it really works. just joking ;-) On Mar 24, 9:26 am, 王宇辉 yuhui.w...@gmail.com wrote: Thanks, Bob, It seems runs well 2011/3/22 Robert Kluin robert.kl...@gmail.com Hi, Have you tried: cron: - description: monthly summary job url: /tasks/summary/monthly schedule: 1 of month 00:00 Robert On Tue, Mar 22, 2011 at 04:12, 王宇辉 yuhui.w...@gmail.com wrote: Hey, I want to generate a monthly report on the first day of the month, any idea on doing this with cron jobs? -- Best regards, Yuhui -- 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.
Re: [google-appengine] About the usage of GAE
2011/3/14 Qiang Wang rurality...@gmail.com: I am wandering about if GAE fits for me, since it seems that the gmail is necessary for user who want to use my service. This is not TRUE. You can use many methods of login. Build your own login page, use gmail accounts, use OpenID, use OAuth. You can even use them all in the same app. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Deleting Data Really Expensive!
If would be better if the admin tool uses DatastoreKeyInputReader. I think it will use it, and thus being the fastest way of deleting large number of entities. It would be more cost effective if we make every index needed explicit. If for a single property you only need the ascending index you get a descending index for penalty extra. 2011/3/10 David Mora dla.m...@gmail.com: why would it be cheaper if at the end, the datastore admin creates a map reduce that iterates thru the model via splitting the index and loading each entity per key name ? Each map is a task queue so it is exactly the same :) -- 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.
Re: [google-appengine] Re: standart libraries import errors
type 'exceptions.ImportError': No module named appstats File /base/data/home/apps/xyz/abcdev/appengine_config.py, line 3, in webapp_add_wsgi_middleware from google.appengine.ext.appstats import recording and many other imports not found -- 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.
Re: [google-appengine] The server encountered an error and could not complete your request.
Scan the group first before posting such a question. Great change you are not the only one. If there is an issue created for the problem star it. -- 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.
Re: [google-appengine] to: GM
Google Chrome was unable to translate this 2011/3/8 edz edward_l...@yahoo.com: sir bat ang larong ito may bug? alwys disconnect and alwys error amft nmn... -- 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.
Re: [google-appengine] Confusion about key names
The Kind (db.Model) together with the key_id or key_name is the address of the object to read or write. Also the name space and app_id are part of this address (the db.Key) The SQL equivalent is table_name-row_id. 2011/3/5 Ram Rachum ram.rac...@gmail.com: Hello, I'm very confused about the whole key and key-name thing in GAE. What's the job of the key-name? Is this documented anywhere? I couldn't find it in the docs. For example, when I use `Model.get_or_insert`, why do I need to provide a `key_name`? I want to get an entity that matches the keywords I supply, or create one if one doesn't exist. Why do I need to put in a key name? What does it do? Is it stored on the object somehow? What will happen if I put in bla bla bla? Frustratedly yours, Ram. -- 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. -- 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.
Re: [google-appengine] Re: How to fetch the parent and child data in one to many relation based on child properties
What is the problem of traversing the Leave objects, harvest all the unique parent keys and retrieve them in a second query. In Python: leaves = someQuery.fetch(1000) parentKeys=set( [ k.key() for k in leaves ] ) parents = db.get(list(parentKeys)) 2011/3/3 andy andy.anand1...@gmail.com: I have Employee and Leave Transactions Details entities in one to many relation when i execute a query against Employee(parent) i am getting the result of employee and its responding leave transaction but if i need the information based on child properties (like 'Status' if Status is Applied ) then only retrieve the specific properties (rather than all details) of employee and leave transaction details. what you have suggested is right but using that i only get the child information but i want to include the parent also. one more can include more than one entity in query, like joining two tables/entity -- 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.
Re: [google-appengine] Re: Use Bottle Python framework with Google App Engine
In the HTML code the '' and '' are not escaped when used in the text with lt; and gt; This happens on multiple pages on the site 2011/3/2 dartdog tombran...@gmail.com: FWIW your page consistently crashes my chrome browser (dev chanel version 10 on the cr48) waiting on pixel quantserve..have not tried looking at on other machines/browsers it also happens on your home page (same error) -- 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.
Re: [google-appengine] Re: How do I sort based on the number of items on a list?
You can use the DerivedProperty from the aetycoon lib written by Nick Johnson (search his blog). During a put it will update the property no need to perform the count yourself. 2011/3/1 ogterran jonathanh...@gmail.com: Thanks guys. I'll add another IntegerProperty to increment the count -- 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.
Re: [google-appengine] Re: choice internationalization
You must translate the value you received in the POST request to the unicode value before you construct a form based on the POST/form content. You can use the _CHOICES_FORMATION variable. # these strings are in utf-8 - use it in the Model definition _CHOICES_FORMATION = ( 'Administração', 'Design Gráfico', 'Jornalismo', 'Marketing', 'Outras', ) class MyChoice(object): def __init__(self,val,usecode='latin_1'): self.val = unicode(val,usecode) self.valstr = self.val.encode('ascii','ignore') def __str__(self): return self.valstr def __unicode__(self): return self.val # use these for the Django form _CHOICES_FORMATION_FORM = tuple( [MyChoice(s,'utf-8') for s in _CHOICES_FORMATION] ) in your post handler def post(self): # translate the value for 'formation' to the right unicode string s = self.request.POST['formation'] self.request.POST['formation'] = [unicode(i) for i in _CHOICES_FORMATION_FORM if str(i)==s][0] 2011/2/18 Robert Kluin robert.kl...@gmail.com: Looks like on your model definition you've specified 'choices' for formation, and 'Administrao' is not one of the choices. Robert On Thu, Feb 17, 2011 at 20:42, Josir josi...@gmail.com wrote: I'm back on my choice internationalization problem. The solution given by djdjadji worked partially. Now the form is displayed but when I try to post data, I got a validation form error: Property formation is u'Administrao'; must be one of (, , 'Jornalismo', 'Marketing', 'Marketing', 'Psicologia', 'Publicidade', 'Radialismo', 'Cinema', 'Outras') Is this a Django 0.96 form error ? Is this solved if I upgrade Django to 1.2 ? Or: does somebody have any tip ? Thanks in advance, Josir Gomes On 26 jan, 15:05, djidjadji djidja...@gmail.com wrote: Then you have to build a class with a __str__() and a __unicode__() method. The __unicode__() method should return the string that is displayed in the combobox and the __str__() returns the value that is put in the field of the form at the time of submit. class MyChoice(object): def __init__(self,val): self.val = unicode(val,'latin_1') self.valstr = self.val.encode('ascii','ignore') def __str__(self): return self.valstr def __unicode__(self): return self.val _CHOICES_FORMATION = ( MyChoice('Administração'), MyChoice('Design Gráfico'), MyChoice('Jornalismo'), MyChoice('Marketing'), MyChoice('Outras'), ) 2011/1/26 Josir josi...@gmail.com: I got an error: File /home/josir/sist/google_appengine/google/appengine/ext/db/ djangoforms.py, line 170, in get_form_field choices.append((str(choice), unicode(choice))) UnicodeEncodeError: 'ascii' codec can't encode characters in position 10-13: ordinal not in range(128) What I understand is function get_form_field try to convert choice to a python string str(choice), where choice is each item of _CHOICES_FORMATION Any ideas on how to fix it ? Josir -- 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.
Re: [google-appengine] template inheritance while using django 1.2 via appengiene uselibrary in gae 1.4.2
Search for: def webapp_django_setup(): You should change the setup. Add your own file loader and config variable. Because webapp changes TEMPLATE_DIRS for every template rendering. 2011/2/22 Robert Kluin robert.kl...@gmail.com: There are several other similar discussions, here's a couple: http://code.google.com/appengine/forum/python-forum.html?place=msg/google-appengine-python/YaqfeygoiaI/WjRY2xTJEIEJ https://groups.google.com/group/google-appengine-python/browse_thread/thread/10010f148d74ec55/75d1c011f1f904d8 I think there was something in the past week or two as well, but I couldn't find it quickly. You might want to spend a few minutes searching the groups. -- 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.
Re: [google-appengine] Information about an app? Creation and contact info?
It could be that this name is a gmail acount. It could be that it looks like nothing is being deployed. Maybe the '/' URL is mapped to a not-implemented handler. You have to touch the right URL or with the right google accounts to get a responds. 2011/2/23 Kris Bravo kris.br...@gmail.com: I recently went to add a new app and found the name to be used already. When I looked at the existing app it doesn't appear to have anything deployed yet. The name is unique enough to make me wonder when it was created and whether the other owner needs it anymore. Is there a way to contact owners of other applications? Is there a way to know when an app was created? 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.
Re: [google-appengine] Re: Need help with redirection
Are you sure your redirect request handler is being called? Put some logging.info(Here-1) calls in your code. Have you tried http://localhost:8080/learn Have you read and understand HTTP and HTML tutorials. Why not put the external link directly in the a tag a href='http://www.some-site.com'Learn/a or in Django templates a href='{{teach_URL}}'Learn/a And in your template render function add a template_values['teach_URL'] = 'http://www.some-site.com' 2011/2/20 Rutwick rutwic...@gmail.com: Hi Robert, Thanks for the response! I have practiced the guestbook app 2 times for learning, and now the 3rd time, as I'm following it for making my own app. My data comes from some API, where in I'm passing a keyword. My problem is, I want to use a set of template values commonly throughout the site, no matter to what URL I'm going to. For example, if I want a value 'site-header':'Hello!', I want it to be same on all the pages. I have to pass it every time template.render function renders a page! I want to do it so that I can have a templating sort of flow for the site. Like, any where I call {{site-header}}, it should get the same value. And one more doubt, how to redirect to a third party site from my app? I made a tutorial for the app I'm making, and I want to redirect people to it for learning it. I tried this: My div='nav' has a like to my site: a href='/learn'Learn/a My main.py file: app = webapp.WSGIApplication([ ('/', Init), ('/learn', Learn)] class Learn(webapp.RequestHandler): def get(self): self.redirect('myblog.com') This isn't working! When I click the link, I get http://localhost:8080/myblog.com in the address bar (I'm working locally) and I tried hard coding the address, but it doesn't work either! Am I doing something wrong? Thanks, Rutwick -- 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] Cleanup All for GAE mapreduce
I have adapted the source code for mapreduce to add a Cleanup All function to the UI. I only modified the code for the python part of mapreduce. You can find the code and a blog post at http://djidjadji.appspot.com/2011-02-15-Cleanup-All-for-GAE-mapreduce -- 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.
Re: [google-appengine] MapReduce as Cron jobs: How to specify the number of shards?
Today I updated the mapreduce library. I see the same only 1 shard when I use the dev_server. The dev_server does not have the __scatter__ property of objects. The mapreduce library then falls back to a single shard. And on the production it depends on how many objects have a __scatter__ property. If less then shard_count have __scatter__ you get less shards. GAE Team: What determines if an object gets a __scatter__ property? 2011/2/11 djidjadji djidja...@gmail.com: In your cron_mapreduce.py add these two lines shard_count=int(self.request.get(shard_count, mr_control._DEFAULT_SHARD_COUNT)) mr_control.start_map( self.request.get(name), self.request.get(reader_spec, your_mapreduce.map), self.request.get(reader_parameters, mapreduce.input_readers.DatastoreInputReader), { entity_kind: self.request.get(entity_kind, models.YourModel), processing_rate: int(self.request.get(processing_rate, 100)) }, shard_count = shard_count, mapreduce_parameters={done_callback: self.request.get(done_callback, None) } ) 2011/2/10 Andrin von Rechenberg andri...@gmail.com: Hey there Today I created a library to run MapReduces as cron jobs in python. See here: http://devblog.miumeet.com/2011/02/schedule-mapreduce-daily-on-appengine.html However, I didn't figure out how to I'm able to set the shard_count programmatically. In mapreduce/control.py there is a function I call: def start_map(name, handler_spec, reader_spec, reader_parameters, shard_count=_DEFAULT_SHARD_COUNT, [...]) However, no matter what o I pass as the shard_count argument, it is ignored. Any ideas? Cheers, -Andrin -- 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.
Re: [google-appengine] Appengine scalability ~200 get/sec and about 50 put/sec
GAE is optimized for datastore read operations. No problem in scaling for get operations. The put scaling depends on if you are updating a particular entity group more then 1 or 2 times a second. If not then there is no problem in scaling put operations. If updating one (1) entity group more then 1/sec but it happens in bursts you can use the task queue to perform the update, it will retry in case you have a transaction exception. 2011/2/10 Atif Gulzar atif.gul...@gmail.com: Hi, I am estimating whether AppEngine is scalable for ~200 get/sec and about 50 put/sec RPC calls. I have ran the AppStat on my current app, which have currently very low traffic about ~20get and ~4put/sec. And the average time for my get rpc calls is about ~10ms while ~100ms for the put calls. Actually, I have a handler which calls a model on each call to get the user data. And I am expecting the load on this handler for about ~200hits/sec And some of these users may update some data. And I am expecting about ~50hits/sec on this update handler. I am just looking whether appengine will be scaleable for my above requirements? Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- 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. -- 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.
Re: [google-appengine] MapReduce as Cron jobs: How to specify the number of shards?
In your cron_mapreduce.py add these two lines shard_count=int(self.request.get(shard_count, mr_control._DEFAULT_SHARD_COUNT)) mr_control.start_map( self.request.get(name), self.request.get(reader_spec, your_mapreduce.map), self.request.get(reader_parameters, mapreduce.input_readers.DatastoreInputReader), { entity_kind: self.request.get(entity_kind, models.YourModel), processing_rate: int(self.request.get(processing_rate, 100)) }, shard_count = shard_count, mapreduce_parameters={done_callback: self.request.get(done_callback, None) } ) 2011/2/10 Andrin von Rechenberg andri...@gmail.com: Hey there Today I created a library to run MapReduces as cron jobs in python. See here: http://devblog.miumeet.com/2011/02/schedule-mapreduce-daily-on-appengine.html However, I didn't figure out how to I'm able to set the shard_count programmatically. In mapreduce/control.py there is a function I call: def start_map(name, handler_spec, reader_spec, reader_parameters, shard_count=_DEFAULT_SHARD_COUNT, [...]) However, no matter what o I pass as the shard_count argument, it is ignored. Any ideas? Cheers, -Andrin -- 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.
Re: [google-appengine] Is it impossible to guarantee a put()
Have a look at the deferred API in the SDK. No limit on the payload of a task, it is stored temporarily in the datastore. -- 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.
Re: [google-appengine] WTF... new SDK and new local datastore ???
I had a problem that the python 1.3.8 SDK was unable to write in a 1.3.7 SDK datastore. They must have changed something because SDK 1.4.1 was able to read/write a 1.3.7 SDK datastore. 2011/2/11 Matija Jerković matija.jerko...@gmail.com: I am using java version. I remember that python version didn't break datastore file on sdk change, but for java version I am not sure if this happened before. -- 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.
Re: [google-appengine] Re: Can't attach error messages to individual fields in clean()
I just found out that they had removed the 0.96 documentation. The documentation can be found here http://web.archive.org/web/*/http://www.djangoproject.com/documentation/0.96/ Instead you can redefine the full_clean() method of the Form and return different data in the exception and set multiple error fields. Or let the clean methods return a dictionary with clean data and errors. Based on the return type do different things. And in the errors part specify for which fields you want to set which errors. You can use the original method as a template. 2011/2/3 Jachin Rupe jachin.r...@gmail.com: It worked great with one caveat. When I raise an error I can only attach it to one form field. Say I wanted to attach the error message to both the start and end date field. Is there a way to do that? It looks like one of the fields gets cleaned before the other one, so what ever one gets cleaned second will have the error message attached to it, better then what I had before, but maybe that just doesn't work in 0.96. -- 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. -- 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.
Re: [google-appengine] Re: Can't attach error messages to individual fields in clean()
You don't tell which version of the django forms you use. You link to a django 1.0 form page but django 0.96 does it a bit different. In your form subclass define the following functions and raise the same raise forms.ValidationError(uYou need to pick a start date and time in the future.) if needed class MyForm(Form): def clean_startdate(self): # return cleaned version of start date or raise Validation error pass def clean_enddate(self): # return cleaned version of end date or raise Validation error pass 2011/2/2 Jachin Rupe jachin.r...@gmail.com: One more thing, if I just throw a validation error, that works fine, but it doesn't put the error message on both of the fields. raise forms.ValidationError(uYou need to pick a start date and time in the future.) -- 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.
Re: [google-appengine] Large scale database
You can save yourself appending to the updated list. updated = MyModel.all().filter(color =, old_favorite).fetch(100) for entity in updated: entity.color = new_favorite db.put(updated) 2011/1/27 Wim den Ouden wdenou...@gmail.com: Hi Michael, With small entities and without transactions, groups, high replication etc. you can save much more entities p/s from Nick Johnson (google) batch put, also delete updated = [] for entity in MyModel.all().filter(color =, old_favorite).fetch(100): entity.color = new_favorite updated.append(entity) db.put(updated) gr wim -- 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.
Re: [google-appengine] Re: Cron job Failure
And you have the advantage of a retry in case of a failure, like no writes during maintenance, task are suspended until the maintenance is complete. You can add new tasks but they are put on hold for a while. 2011/1/26 Kaan Soral kaanso...@gmail.com: Add the job to a queue instead of running it directly in cron that way it can run for 10 minutes -- 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.
Re: [google-appengine] Re: choice internationalization
Then you have to build a class with a __str__() and a __unicode__() method. The __unicode__() method should return the string that is displayed in the combobox and the __str__() returns the value that is put in the field of the form at the time of submit. class MyChoice(object): def __init__(self,val): self.val = unicode(val,'latin_1') self.valstr = self.val.encode('ascii','ignore') def __str__(self): return self.valstr def __unicode__(self): return self.val _CHOICES_FORMATION = ( MyChoice('Administração'), MyChoice('Design Gráfico'), MyChoice('Jornalismo'), MyChoice('Marketing'), MyChoice('Outras'), ) 2011/1/26 Josir josi...@gmail.com: I got an error: File /home/josir/sist/google_appengine/google/appengine/ext/db/ djangoforms.py, line 170, in get_form_field choices.append((str(choice), unicode(choice))) UnicodeEncodeError: 'ascii' codec can't encode characters in position 10-13: ordinal not in range(128) What I understand is function get_form_field try to convert choice to a python string str(choice), where choice is each item of _CHOICES_FORMATION Any ideas on how to fix it ? Josir -- 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.
Re: [google-appengine] uppercase and lowercase url handler in app.yaml.
- url: /(?i)app script: handler.py or - url: (?i)/app script: handler.py 2011/1/24 Albert albertpa...@gmail.com: Hi! In my app.yaml, I have the following handler: - url: /app script: handler.py I also want /App and /ApP to resolve to my handler, and all other uppercase and lowercase variations of app to work. Any ideas? Thanks! Albert -- 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.
Re: [google-appengine] Appstats throws a warning during loading
Star this issue http://code.google.com/p/googleappengine/issues/detail?id=4236 -- 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.
Re: [google-appengine] Re: How to use the same variable in two handlers?
With what you want to do there IS NO difference in doing it in Django templates then in Mako templates. That will result in a hatred awards Mako too. 2011/1/23 Zeynel azeyn...@gmail.com: Unfortunately, I have an irrational hatred for Django templates so I am trying to do this with Mako templates. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: How to handle form submit with 1 handler only?
This is not true. They are equivalent. They modify the query IN-PLACE. They do not return a new one. All the db.Query methods return self. You can choose to chain them all in one line or in separate lines. No need to assign to the items variable after the create call [ Item.all() ]. 2011/1/23 Claude Vedovini cla...@vedovini.net: I also noticed that your code to retrieve the records from the DB is wrong, this won't work as you expect: items = Item.all() items.filter(type =, merchandise_type) items.order(-points) because filter and order methods do not modify the query, they return a new one, so your code be: items = Item.all() items = items.filter(type =, merchandise_type) items = items.order(-points) or the shorter items = Item.all().filter(type =, merchandise_type).order(-points) -- 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.
Re: [google-appengine] How to use the same variable in two handlers?
Make merchandise_type a hidden input field of the form generated by Directory() and get the value in the DirectorySubmitHandler(). -- 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.
Re: [google-appengine] Re: How to use the same variable in two handlers?
input type=hidden name=dir_type value=### instead of ### print the value of the variable merchandise_type 2011/1/22 Zeynel azeyn...@gmail.com: On Jan 22, 12:07 pm, djidjadji djidja...@gmail.com wrote: Make merchandise_type a hidden input field of the form generated by Directory() and get the value in the DirectorySubmitHandler(). Ok. I have the hidden field in the form in Directory like this: input type=hidden name=dir_type value=merchandise_type but how do I get that the value of the merchandise_type in the DirectorySubmitHandler? self.request.get(dir_type) is merchandise_type not the url parameter? 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. -- 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.
Re: [google-appengine] Re: How to use the same variable in two handlers?
urllib.urlencode() should be used to quote the parameter If Directory() is processed after DirectorySubmitHandler() you can NEVER get the merchandise_type variable. And it is possibly handled in another app instance. dir_type = merchandise_type # remove this line dir_type is never used in DirectorySubmitHandler() import urllib self.redirect(/dir?%s % urllib.urlencode({ 'type' : self.request.get(dir_type) } ) -- 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.
Re: [google-appengine] Re: How to use the same variable in two handlers?
'type' is between quotes == a string. Has nothing to do with a variable or a function object. -- 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.
Re: [google-appengine] Re: choice internationalization
In the unicode() call you must specify the encoding used, to decode the string to a unicode one. Or pass it a unicode string. example unicode(s,'utf-8') The Django code uses the default encoding string ascii. Or make a list of objects with a __unicode__() method that returns the unicode version of the string. You could build your choices list with unicode strings _CHOICES_FORMATION = ( unicode('Administração','latin_1'), unicode('Design Gráfico','latin_1'), unicode('Jornalismo','latin_1'), unicode('Marketing','latin_1'), unicode('Outras','latin_1'), ) Or use the encoding name that is used to edit the file. 2011/1/18 Josir josi...@gmail.com: Thanks for replying Zeynel. I've read this article before but I could not understand how can it help me because it does not have any citation on Django or GA. Usually, in pure Python/Django, I use the u' notation and forms and templates understand that the string is unicode. But on GA, it's not working. Do you have any specific suggestion/tip on the above code ? Josir Gomes On Jan 18, 2:23 am, Zeynel azeyn...@gmail.com wrote: Can this be helpful to youhttp://www.stereoplex.com/blog/python-unicode-and-unicodedecodeerror On Jan 17, 10:53 pm, Josir josi...@gmail.com wrote: Hi folks, I have the following code: _CHOICES_FORMATION = ( 'Administração', 'Design Gráfico', 'Jornalismo', 'Marketing', 'Outras', ) class Contact(db.Model): name = db.StringProperty(verbose_name='Nome', required=True) email = db.EmailProperty(verbose_name='E-mail', required=True) phone = db.StringProperty(verbose_name='Telefone') formation = db.StringProperty( verbose_name=u'Formação', choices=_CHOICES_FORMATION, default=_CHOICES_FORMATION[0]) When I try to run it, I got File /home/josir/sist/google_appengine/google/appengine/ext/db/ djangoforms.py, line 170, in get_form_field choices.append((str(choice), unicode(choice))) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(128) To fix it, I tried: 1) u'Administração', 2) insert the header: #!/usr/bin/env python # -*- coding: utf-8 -*- # coding=utf-8 But both solution didn't work. How can I use latin (portuguese) characters on choice field ? Thanks in advance, Josir. -- 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.
Re: [google-appengine] Re: Configuration webapp_add_wsgi_middleware not recognized error
http://www.downforeveryoneorjustme.com/ does a HEAD request. If you don't implement that the site is reported as down also. -- 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.
Re: [google-appengine] Re: Configuration webapp_add_wsgi_middleware not recognized error
A HEAD request is like a GET or POST request. The request handler must have a def head(self) method. The responds should be the result of a GET request but without the body. I don't know how webapp or another framework handles it after the return of the head() function. http://code.google.com/appengine/docs/python/tools/webapp/requesthandlerclass.html 2011/1/16 Tom Critchlow tjcritch...@gmail.com: Hi djidjadji, I'm pretty now to coding and python - could you please give me a pointer as to how I add HEAD information? Is this something I need to do within GAEsessions? Is this related to the missing middleware error or unrelated? Thanks Tom On Sun, Jan 16, 2011 at 8:44 AM, djidjadji djidja...@gmail.com wrote: http://www.downforeveryoneorjustme.com/ does a HEAD request. If you don't implement that the site is reported as down also. -- 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. -- Tom Critchlow twitter.com/tomcritchlow www.fuckyeahspotify.com www.7bks.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. -- 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.
Re: [google-appengine] Re: users.create_logout_url(/) not working
Try to find out why this is double in the URL http://sarah-for-president.appspot.com/http://sarah-for-president.appspot.com/ try this code snippet url = users.create_logout_url(/) logging.info(URL:+url) 2011/1/16 Zeynel azeyn...@gmail.com: On Jan 16, 1:11 am, Robert Kluin robert.kl...@gmail.com wrote: What kind of auth does your app use, Google, Apps Domain, Federated? You might also want to explain the actual problem in more detail. What are the links produced, etc... Hi Robert, The app is using Google Accounts API as Authentication Option; and I am testing this in Chrome. When I click on the sign out link created by the app I get broken link warning and this link: http://sarah-for-president.appspot.com/http://sarah-for-president.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttp://sarah-for-president.appspot.com/%26service%3Dah -- 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.
Re: [google-appengine] Re: users.create_logout_url(/) not working
According to the manual http://code.google.com/appengine/docs/python/users/functions.html 2011/1/16 Zeynel azeyn...@gmail.com: Can you explain what users.create_login_url(/) does? -- 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.
Re: [google-appengine] How does get_by_key_name work?
http://code.google.com/appengine/docs/python/datastore/modelclass.html#Model_get_by_key_name 2011/1/16 Zeynel azeyn...@gmail.com: Hello, I am reading this sample app called overheard http://code.google.com/appengine/articles/overheard.html to add ranking functionality to my app. His models.set_vote() function has a line vote = Vote.get_by_key_name(key_names = user.email(), parent = quote) and his Vote model is class Vote(db.Model): Storage for a single vote by a single user on a single quote. Index key_name: The email address of the user that voted. parent: The quote this is a vote for. Properties vote: The value of 1 for like, -1 for dislike. vote = db.IntegerProperty(default=0) Where does he get the key_names? They are not included in the Vote? models.py is here: http://code.google.com/p/google-app-engine-samples/source/browse/trunk/overheard/models.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. -- 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.
Re: [google-appengine] Entity groups - does work on a child lock the parent, and vice versa?
From the Python documentation: When you use the App Engine datastore, every attempt to create, update, or delete an entity happens in a transaction. This means, I think, that GAE will perform/create a transaction for you, in the API, if the put() code is not already inside a transaction. So you don't need to code a transaction to create a child object, GAE will do that for you. # no need for a transaction here. Grok(parent=myFoo).put() # python syntax Code the transaction yourself if you need to modify multiple objects in the entity group. 2011/1/13 Stephen Johnson onepagewo...@gmail.com: From the documentation: While an app is applying changes to entities in an entity group, all other attempts to update any entity in the group fail at commit time. Because of this design, using entity groups limits the number of concurrent writes you can do on any entity in that group. When a transaction starts, App Engine uses optimistic concurrency control by checking the last update time for the entity group. Upon commiting a transaction for an entity group, App Engine again checks the last update time for the entity group. If it has changed since our initial check, we throw an exception. For an explanation of entity groups, see Entity Groups. On Thu, Jan 13, 2011 at 10:48 AM, Mark mar...@gmail.com wrote: Hi, Let's say we have an entity group hierarchy like this: Foo | --- Grok Foo is the entity parent. Any time I add a Grok instance to the datastore, does the parent Foo instance have to be locked? Example: Transaction tx = pm.currentTransaction(); try { tx.begin(); Grok grok = new Grok(); pm.makePersistent(grok); tx.commit(); // will a parent Foo get locked now? } finally { if (tx.isActive()) { tx.rollback(); } I guess the same question then - if I'm performing a transaction on the parent Foo, will all its Grok instances be locked? 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.
Re: [google-appengine] Re: Forming url with id number
You could use the URL dispatcher to check for validity of the passed id by making the id part of the URL http://me-for-president.appspot.com/item/1 in the code class ItemPage(webapp.RequestHandler): def get(self, id): id = int(id) # rest of the handler application = webapp.WSGIApplication([('/item/(\d+)', ItemPage)], debug=True) def main(): run_wsgi_app(application) Use some sort of template engine. Much easier if the site or pages gets bigger. -- 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.
Re: [google-appengine] Re: Forming url with id number
First you make an index page containing all the items you want to show based on a filtering, maybe date. class ItemIndexPage(webapp.RequestHandler): def get(self): items = Item.all().filter(...some filter...).fetch(1000) self.response.out.write(ol) for item in items: self.response.out.write(lia href=%s%s/abr / a href=/item/%scomments/a/li % (cgi.escape(item.url), cgi.escape(item.title), cgi.escape(item.key().id( self.response.out.write(/ol) And deal with the individual item in the next handler class ItemPage(webapp.RequestHandler): def get(self, id): id = int(id) item = Item.get_by_id(id) # rest of the handler application = webapp.WSGIApplication([('/items', ItemIndexPage)],('/item/(\d+)', ItemPage)], debug=True) -- 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.
Re: [google-appengine] How to launch 100K+ recurring task every 5 min
If you want to use GWT for the frontend you can use Python for the backend. 2011/1/14 supercobra superco...@gmail.com: Hi Eli, Thanks for the great feedback. If Task Queue Java is as evolved as Phyton that maybe the way to go. -- superco...@gmail.com http://supercobrablogger.blogspot.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.
Re: [google-appengine] Re: Update about the App Engine issues tracker
I'm unable to add a label component-docs to a new issue, or add it after submitting it, for http://code.google.com/p/googleappengine/issues/list. For a project on http://code.google.com where i'm a developer I can add the labels. 2011/1/13 Ikai Lan (Google) ikai.l+gro...@google.com: 3. The goal is to improve our documentation. Working in the groups teaches us where our documentation is deficient. I agree that sometimes the articles are hard to find. If you have any documentation suggestions, feel free to open an issue with the label component-docs - though small fixes are much more likely to make it in than large or unspecific fixes. -- 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.
Re: [google-appengine] CSS
Run your page through http://validator.w3.org/ Add a DOCTYPE to your page. Do you still use the font and center tags? center is not allowed inside a a tag. Why do you have a CSS file if you add style directly in the HTML? You don't close the font and span tags? The p that Fabrizio mentioned is a real beauty, ellipses (...) instead of : p style=cut ... img src=/static/squadra.gif/ width=250px What is the / doing inside the img tag? And the px is not allowed in the with attribute, it is not a style specification. Three div id=box tags? Looks more like a class. In the CSS file all tags specify to use font-family:Arial, Helvetica,'Liberation Sans', FreeSans, sans-serif; Move this to the body CSS specification with a default size and specify size differences at the other CSS specs. If you have a group of CSS specs that show up multiple times group them in a separate CSS class and use multiple css classes to a tag or an id and class attribute. Example: CSS .grey-border { -moz-box-shadow: 1px 0px 6px #00; -webkit-box-shadow: 1px 0px 6px #00; box-shadow: 1px 0px 6px #00; background: #CC; background: -moz-linear-gradient(left, #CC 0%, #DD 4%, #DD 96%, #CC 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%,#CC), color-stop(4%,#DD), color-stop(96%,#DD), color-stop(100%,#CC)); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#CC', endColorstr='#CC',GradientType=1 ); } /* div#box is now class .box */ .box { margin:3px; padding-top:1px; padding-left:2px; padding-right:2px; -moz-border-radius: 2px; border-radius: 2px; font: 15px/1.5 Arial, Helvetica,'Liberation Sans', FreeSans, sans-serif; height:150px; width:190px; float:left; position:relative; } div#img { margin: 0; font: 15px/1.5 Arial, Helvetica,'Liberation Sans', FreeSans, sans-serif; float:left; position:relative; } In your HTML div id=img class=grey-border img src=static/squadra.gif width=250 /div div class=box grey-border Prova br klfjlkfjldfjglkdfnbn x.,nb,cbv, /div 2011/1/14 Fabrizio Accatino fht...@gmail.com: Your issue is not a GAE issue. The CSS is the same. Check your HTML. It's invalid. Look at the end of lorem ipsum block and the adv java-script block. Fabrizio -- 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.
Re: [google-appengine] Can i influence the number of instances?
They will be created automatic when the request counts goes up. 2011/1/12 willtenner gim...@gmail.com: Hey, can i increase the number of instances? The more the better :/ At the moment my app uses no more than 9 instances. -- 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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] app.yaml differente handlers by subdomains...
If all versions have the SAME code why direct different host names to different versions. GAE will create multiple instances of the same code to service simultaneous requests, up to hundreds of requests a second. 2011/1/11 Sahid Orentino Ferdjaoui sahid.ferdja...@gmail.com: Hello All, I have a app with different versions. All versions use the same code but i would like configure my app.yaml to use differente script by versions. hum... i don't know if i'm understable :) An example (app.yaml): handlers: - url: server1.APPID.appspot.com/.* - script: servers/server1/main.py - url: server2.APPID.appspot.com/.* - script: servers/server2/main.py - url: /.* script: main.py How do that? or something like... Thank a lot! --sahid -- 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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Need help downloading java version from gae Newbie
To my knowledge there is no source code for Java apps on GAE servers. Use some sort of Version Control software. CVS, SVN, GIT,... 2011/1/11 Dave Allen david.michael.al...@gmail.com: I cannot find anything on the net, so I am requesting assistance downloading a previous version of my gae, gwt app. I am using Ubuntu Linux. Also, if it does not come down to Eclipse directly, kindly instruct me how to unpack it, get it into eclipse. 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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Re: Taskqueue payload
If you use the deferred API from google.appengine.ext import deferred The storing of the task arguments in a datastore object is done by the API. -- 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-appeng...@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.
Re: [google-appengine] Re: This request used a high amount of CPU and may soon exceed its quota - 2010/2011
The text for this quota warning originated in 2008 or begin 2009. At that time there was a more strict quota on CPU usage. Now you use the warning to locate requests that might be up for an improvement. Inspect the request with app-stat and rethink the code used. 2010/12/23 Matija matija.jerko...@gmail.com: I understand quota system, but I don't know exact parameters that trigger additional latency in statement: 'Applications that are heavily CPU-bound may also incur some additional latency in order to efficiently share resources with other applications on the same servers.' Also I don't know how this latency is imposed. I would like to know them before they are imposed or if they will be imposed. -- 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-appeng...@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.
Re: [google-appengine] Enhancement/Concept for Foreign Property Synchronization within Models
What happens when a multiple put is performed? The Sync must be done before constructing the protocol buffer. Are the Author entities fetched in parallel or serial? And how to deal with it if the multiple put contains different types of objects where all or some have Sync properties? Nick Johnson has coded a few extra Property classes in aetycoon module. https://github.com/Arachnid/aetycoon Maybe you can use the DerivedProperty or the TransformedProperty to fill the Sync property. They use (lambda) functions to construct the property content. I don't know if these properties work when the field they depend on is a class instance. -- 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-appeng...@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.
Re: [google-appengine] Re: What's the red and blue bars in AppStats?
The usage of Appstats on the development environment is to determine if the request is not performing to many RPC calls. Doing transactions in a loop is a nice example that might be optimized. Don't compare the execution times of the development and production. They have very different implementations of the Datastore, and sometimes the production has to start a new app instance. For some RPC calls on the production server the API time (red bar) is larger then the wall-clock time (blue bar) because some queries/puts/get/fetch calls can be parallelized. The red bar is the sum of the processing cycles combined. The gaps in between the blue bars is the time spend in the code you have written that are not API calls. For example to construct a list of db.Key's you want to get. Those ms added together and converted to 1.2 GHz processor are the CPUms in the result. 2010/12/7 Fredrik Bonander carl.fredrik.bonan...@gmail.com: Thanks for your (both of you) info. In my mission to improve my application I'm on a constant hunt for milliseconds. But while improving on every request I find it kinda strange that the difference would be so huge from my development server. In appstats the trouble some request that show's 3275ms 9140cpu_ms 7296api_cpu_ms is 1 memcache call, 4 db.RunQuery and 5 db.Get and in my development it's about 400ms. When thinking about it I would think that the red bar (the longest one) is time spent waiting on the request to return. Especially since the red bar is not present in appstats on my development server. I think it would make sense or that for some odd reason my code is so bad that would run that much slower on the production servers. Another thing that bugs me a bit is that this is my third time asking about how CPU/API time is calculated in different contexts but never any answers from Santa's Elves (in sprit of keeping to the metaphor). If I'm right (about the red bars) why the long waiting times for some requests ? It would be great to get some clarification in how this works so we as developers can know how to proceed. I don't want to spend x amount of hours optimizing my code if I can't to anything to help improve the CPU/API times. ..fredrik -- 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-appeng...@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.
Re: [google-appengine] Re: Data inconsistency
What if you upload the same code to a different version and make that current? That should kill all the instances running the old version. 2010/11/19 Sanjay sjeyaku...@gmail.com: I'm pretty sure the data consistency is not in our application because of the characteristics of the problem. I do not use Memcache or a per- instance in-memory cache, and perform direct reads from the datastore as the application is high-write, low-read. I can reproduce this problem at will by just refreshing a page that reloads the data from the datastore. About 20% of the time I get an incorrect value. The data is being written using a cron that fires every 10 minutes, and there are no other writers to this entry. Thus I'm pretty sure that it's not being performed by an incorrect write. From the characteristics, it seems to me like there's an instance serving the application that is stale and serving bad data. Perhaps this instance is in a different datacenter than the main set of instances, and thus Megastore replication has fallen behind, or is in an inconsistent state? I've been working with AppEngine for nearly the last year, and haven't seen this bizarre behavior before. Is there a way to escalate such issues for someone in Google to have a look? 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-appeng...@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.
Re: [google-appengine] Tasks and GAE Maintenance
To my knowledge: Yes. The task queues execution is put on hold. When the read-only period is over the task queue will processes tasks. 2010/11/17 Matt mjwat...@gmail.com: Hi there, Very quick question: During GAE maintenance will my code be able to add tasks to queues? Thanks in advance, Matt -- 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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Can't move down then up the directory tree for inserting of html files with {% include %}
The template code between 0.96 and 1.1.2 is not changed (much). The include template node is looking relative to the directories in django.conf.settings.TEMPLATE_DIRS Find out what is in this list or tuple and write the include path relative to one of the given directories. 2010/11/14 Brian martinair.ameri...@gmail.com: Thanks for the help. I'm using Python 2.5 and Django Template 1.1 on app engine I can't seem to move down the dir tree for inserting of html files using {% include file %} statement Works just fine to any where up the tree, i can go up 3,4 levels just fine, but can not go down even 1 {% include ../LOGO.html %} Sample dir structure: root/lib/LOGO.html (1 level down then 1 level up ) root/LOGO.html (1 level down) root/main/home.html --tried: {% include ../LOGO.html %} ,{% include root/lib/LOGO.html %} , {% include /root/lib/logo.html %} root/main/start.py I changed TEMPLATE_DIRS setting 20 ways. 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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Re: How do you use the development server for testing
if you add a __str__() method to the class that returns a string you want to print instead of the default handle number class Rep(object): def __init__(self): self.sint = 5 # some other init stuff pass def __str__(self): return Rep: sint=%d % self.sint Maybe adding a __repr__(self) method would be needed (if you use %r in your print strings) 2010/11/14 Zeynel azeyn...@gmail.com: On Nov 13, 7:10 am, Wim den Ouden wdenou...@gmail.com wrote: why not simple results_type = results Yes, thanks, this self.response.out.write(C_RESULT: %s % (C_RESULT)) returns C_RESULT: [__main__.Rep object at 0x044F0630] Is there a way to print the contents of this object without iterating? -- 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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Re: Body of a GET request
A GET request has NO body. A POST request has a body. 2010/11/12 MasterGaurav gaurav.va...@gmail.com: Hi Anton, I do not see anything in the request that suggests it has a body! What makes you suspect that... -- Happy Hacking, Gaurav Vaish www.mastergaurav.com On Nov 12, 2:25 pm, anton.belyaev anton.bely...@gmail.com wrote: Hello all, Sometimes I see in the logs GET requests with body! Seems, certain browsers consider the url too long and put the parameters of GET request into body. -- 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-appeng...@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.
Re: [google-appengine] Re: Body of a GET request
I don't think that '/' and ':' are allowed characters in a GET parameter. You should try urllib.urlencode and see what it constructs and which chars are excaped with the given set of parameters. If this is an illegal GET request parameter list you might expect the parser to bail out and repost: NO parameter. api_url is not properly escaped, api_result has the chars '/:' escaped. Maybe pars the request string yourself. -- 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-appeng...@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.
Re: [google-appengine] Working with Query results
RESULTS = QUERY.fetch(10) RESULTS.sort(key=lambda x: x.mDATE.toordinal() * x.mCOUNT) What is a list of model instances? You can start by learning some basic python. Read the tutorial on the python.org website, or in the help file (on windows platform) 2010/11/10 Zeynel azeyn...@gmail.com: Can someone help me understand how to access the results of a query? This is my model: class Rep(db.Model): mAUTHOR = db.UserProperty(auto_current_user=True) mUNIQUE = db.StringProperty() mCOUNT = db.IntegerProperty() mDATE = db.DateTimeProperty(auto_now=True) mDATE0 = db.DateTimeProperty(auto_now_add=True) mWEIGHT = db.IntegerProperty() The app has a textarea form and user submits repetitions. mCOUNT is the number of repetitions. I use this query to display top ten reps: QUERY = Rep.all() QUERY.filter(mAUTHOR =, user) QUERY.order(-mCOUNT) RESULTS = QUERY.fetch(10) I display the results with Mako template: % for result in RESULTS: p${result.mUNIQUE} (${result.mCOUNT})/p % endfor Instead of sorting by mCOUNT I want to sort by mWEIGHT so that an old item with high count should be lower than a new item with lower count. But the precise weighing formula is not important at this point. For instance, it may be mWEIGHT = mDATE * mCOUNT What I do not understand is, how do I access mDATE and mCOUNT to put them in the formula? I am having difficulty, in general, visualizing the result of a query. The tutorial http://code.google.com/appengine/docs/python/datastore/creatinggettinganddeletingdata.html#Getting_Entities_Using_a_Query says that the query returns the requested results as a list of model instances. What is a list of model instances? And how to access them as a variables in this context. Thanks for your help. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Keys only queries do not support IN filters?
A query with 'IN' is translated behind the scene as separate queries. You can perform them yourself result = [] for kw in keywords: result.extend(Article.all(keys_only=True).filter('keywords =', kw).fetch(10)) if len(result)=10: break result = result[:10] 2010/11/9 风笑雪 kea...@gmail.com: When I run this query: Article.all(keys_only=True).filter('keywords IN', keywords).fetch(10) It raise a BadQueryError: Keys only queries do not support IN filters. http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/ext/db/__init__.py#2197 But I can't find this restriction in document: http://code.google.com/intl/en/appengine/docs/python/datastore/queriesandindexes.html#Restrictions_on_Queries -- keakon -- 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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Re: balancing traffic between multiple versions of an appengine application
Why not run each version for a couple of hours/days as default. Download the logs of both versions and perform your comparison statistics. 2010/11/4 Rohit rjenv...@gmail.com: A/B type testing. It'd be different versions/code. When I launch a new version, I want to be able to say 20% of traffic goes to this version etc., On Thu, Nov 4, 2010 at 3:22 PM, Tim Hoffman zutes...@gmail.com wrote: Why would you do this ? There is no value from a load balancing point of view. The only possible reason is you actually want different people to access different versions/code (ie you have both python and java apps installed on the same datastore, or you have users who are going to do UAT on the new version) Rgds T On Nov 5, 5:27 am, Rohit rjenv...@gmail.com wrote: I have a version 1 and version 2 of an appengine application. I want version 1 to be the primary server that my end users visit but I'd like to direct n% to version 2. Has anyone come up with a relatively clean way to do this? -- Rohit -- 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-appeng...@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. -- Rohit -- 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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Re: Reset memcache immediately after deployment?
But the previous version instances can create new memcache entries between the flush and the switching of default versions. If the new version can't handle old memcache entries... 2010/11/3 Remigius remigius.stal...@gmail.com: If you use a deployment script (ant, shell, whatever), you could just add a call to a URL (pointing to your app) that is executed after deployment instead of using cron. If not, this may be one more reason to create one. -- 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-appeng...@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.
Re: [google-appengine] Re: Reset memcache immediately after deployment?
This looks like you could use a template to construct the memcache content. If gathering the time for the template data is very easy, using a memchached version would slow you down. If you use Django templates, they are cached in the server instance. No need to read them again from file. You can even use the Django template cache to cache static files (no field substitutions) in the server instance. You can make a template loader that reads gzip files. 2010/11/3 pdknsk pdk...@googlemail.com: Sorry, I didn't mention that I also do a simple string replace where I insert time() and also two or three other string replacements based on user agent, so purely static files don't work. You're right, the performance difference is negligible, and reading from file might even be faster if I didn't use gzip to open them. I'll try with uncompressed files in the next update. I mostly used memcache because reading from memory should be more efficient and put less strain on the system than reading from disk. Is open() quota free? It seems to be. -- 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-appeng...@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.
Re: [google-appengine] how to upload a csv file, parse it, and save in the data model
You forgot the enctype attribute of the form tag form name=uploadform enctype=multipart/form-data 2010/10/31 He Jibo hej...@gmail.com: Hi, Can someone teach me how to parse a file uploaded to GAE? I am writing a feature that users can upload a .csv file, and save data into the data model. I have already implemented the uploading, see the link below: http://gae-hejibo.appspot.com/TestUpload But I do not know how to parse it, and save in my data model. Below is my html and processing code. I can upload a csv file, but the data in the csv is not saved into the data model. Can someone teach me what's wrong with my code, and how should I do? Thanks! --html file code form name=uploadform div /pCSV File(Comma Separated Value) File*: /p input type=file name=uploadfilename/ input type=submit value=Upload/div /form --processing code class TestUpload(webapp.RequestHandler): '''add item using .csv file''' def get(self): path = os.path.join(os.path.dirname(__file__),'template','TestUpload.html') self.response.out.write(template.render(path, {})) def post(self): fileReader = open(self.request.get('uploadfilename')) csv_file=self.request.get('uploadfilename') fileReader = csv.reader(csv_file.split(\n)) for row in fileReader: cell = row.split('\t') fourchoice = FourChoices() fourchoice.description = cell[0] fourchoice.choiceA = cell[1] fourchoice.choiceB = cell[2] fourchoice.choiceC = cell[3] fourchoice.choiceD = cell[4] fourchoice.a = cell[5] fourchoice.b = cell[6] fourchoice.c = cell[7] fourchoice.answer = cell[8] fourchoice.put() path = os.path.join(os.path.dirname(__file__),'template','debug.html') self.response.out.write(template.render(path, {'description':'fileupload'})) -- 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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Re: Development server hangs
Both sides of a TCP/IP connection can decide to close a connection. The other side has to deal with it. Or maybe an intermediate router decides to terminate it for some reason. It should be possible to rewrite the dev-server to close the connection once it has sent the responds. Maybe the dev-server should do this if it can't serve a second request on the same connection. 2010/11/1 Bemmu bemmu@gmail.com: Thanks. Decided to move small images to another server, that seems to make it much less likely that Chrome would try to keep the connection open. -- 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-appeng...@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.
Re: [google-appengine] Newbie-static files links
- url: /(.*\.html) static_files: \1 upload: (.*\.html) Ditch the '/' in the upload attribute 2010/11/1 Maria-Carey webfo...@gmail.com: I have three static (html) files. Local links: http://localhost:8080/index.html http://localhost:8080/1.html http://localhost:8080/2.html Locally links of other static files, in these, are working fine. But when I upload it on GAE, these links don't work. Remote link: http://www.codeknock.com/ // My app.yaml is as follows: application: codeknock version: 1 runtime: python api_version: 1 handlers: - url: /stylesheets static_dir: stylesheets - url: /(.*\.html) static_files: \1 upload: /(.*\.html) - url: /.* script: helloworld.py /***/ Helloworld.py file is as follows: import cgi import os from google.appengine.ext.webapp import template from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.api import users class MainPage(webapp.RequestHandler): def get(self): template_values = { 'greetings': 'Greetings Variables', 'url': 'Url Variables', 'url_linktext': 'Url_linktext Variables', } path = os.path.join(os.path.dirname(__file__), 'index.html') self.response.out.write(template.render(path, template_values)) def main(): application = webapp.WSGIApplication([('/', MainPage)], debug=True) run_wsgi_app(application) if __name__ == '__main__': main() Can some one guide me, where and what Iam doing wrong. And how to rectify it. Thanks in advance -- 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-appeng...@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.
Re: [google-appengine] Daemon service
Every request should finish within 30 seconds. You can setup a cron job and/or task queue chain to simulate a continuous processing. You have to keep state information in the datastore or part of the task arguments. 2010/10/31 SombraX sombr...@gmail.com: Hello everyone. I try to build a program that works non-stop, is an infinite while that collects information from different Web sites and record the information in the database. The problem is that at startup is interpreted as a request and get the timeout error. Is it possible to build a service daemon with python and boot from the console app enginne? (my english is terrible , sorrycago en die). -- 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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] GQL range query not working in production
Both your inequality long values are the same timeRange1279593000 timeRange = 1279593000 No timeRange value will ever match these two criteria 2010/10/31 johnterran johnter...@gmail.com: Hi, I am using this GQL range query and it works for me in the development. But once i deployed it to production, the query is not working, even from the admin console. And i can see the data, and it is within range.. ie. SELECT * from Event WHERE timeRange 1279593000 AND timeRange = 1279593000 class Event(db.Model): name = db.StringProperty(required=True) timeRange = db.ListProperty(long) one sample data Event.name Test Event.timeRange [1279591200L, 1279594800L] Why does this work in development but not in production? I am running 1.3.7 in development due to datastore error in 1.3.8 on win7 thanks John -- 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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Re: datastore advice?
No. You just create 1 million Entity Groups. Resulting in 1 million instances of customer records. Reread the answer from Robert. You can view the Bigtable DATASTORE (notice the absence of database, usually associated with tables) as one big hashtable. You have a key that designates an object instance and the datastore retrieves the object and uses the model definition to convert the stored data (pbuffer) to an instance of the Model class. Part of the datastore you have index lists that sort keys based on some property of the object instances. 2010/10/29 sodso sodhisoluti...@gmail.com: my apologies for the word typo, i meant the same but my question still remains - if we have to store 1 million customer records, do we create 100 different Kinds ~= Entity Groups ~= db.Model and distribute those 1 million records among those entity groups ? then what about scalability ? does this mean === more records = mroe entity groups to be created ? isnt this an awkward of doing simple things ? thanks. On Oct 28, 10:51 am, Robert Kluin robert.kl...@gmail.com wrote: There are no tables on App Engine, only Kinds which are arbitrary collections of properties. In fact, all applications' entities are stored in a single bigtable table. Entity groups refers to a logical group of entities that are physically stored together; this allows that group of entities to be updated in a transaction. If you make entity groups with lots and lots of entities in them your data can not be sharded across bigtable tablets. That means if you are try to write 5 entities in that group the writes are done serially. Fetches will also be less efficient for the same reasons. You can read all about these topics:http://code.google.com/appengine/articles/datastore/overview.html Robert On Wed, Oct 27, 2010 at 21:40, sodso sodhisoluti...@gmail.com wrote: Hi Ikan Lan, I have seen this on so many discussions here in the forums - A best practice, however, is to keep entity groups as small as possible As far as I understand it, one Model class should not have too many records i.e. one table should not have many records Isn't this strange ? When we talk of GAE, we talk of scalability but if the best practice says to limit ther records to only a few in a Model class, what use is the scalability for ? If we store millions fo records (for eg- customer records) in one db.Model table, are you saying it would really impact the performance. Please correct me if I am wrong. I am unclear if my app can survive on GAE if its working with millions of records in one db.Model table ?? Thanks, Sodso On Oct 27, 11:27 pm, Ikai Lan (Google) ikai.l+gro...@google.com wrote: Generally speaking: no. Entity groups will guarantee a stronger chance of data locality, but this should not affect index traversal or batch reads. A best practice, however, is to keep entity groups as small as possible. There aren't many compelling reasons to not use root entities if you don't need transactions, as working with root entities is generally simpler. -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger:http://googleappengine.blogspot.com Reddit:http://www.reddit.com/r/appengine Twitter:http://twitter.com/app_engine On Tue, Oct 26, 2010 at 3:26 PM, djidjadji djidja...@gmail.com wrote: Parent and child objects are stored in the same Bigtable node. This is done for the transactions. A transaction works on a single entity-group. If you perform a query you use an index to find the objects needed. At this point there is no performance penalty for parent or child objects that match the query. The query results in a number of keys of objects that need to be retrieved. The best query responds time is when the objects to fetch are stored in as many Bigtable nodes as possible (parallel fetch). Why do you need so many child objects? Can you implement it with adding a Parent Reference Property to the child object and thus remove the need to store the entity group all in one Bigtable node? The parent-child objects are needed 1) if you need transactions on them or 2) if you want to extract the parent key given a child key Perform a keys_only query on child objects and from these keys get the set of parent keys of objects that you need to fetch complete. Brett Slatkin uses this technique in a number of Google IO talks, the child object has a ListProperty that is used in the keys_only query. Most other applications can be implemented without the explicit parent object. 2010/10/26 Charles char...@whoischarles.com: Hi all, I'm wondering, since the datastore is hierarchical, does the number of children an entity has affect the performance on querying on the parents themselves? For example, if I have a set of parents, say... Jane Margaret Graham Arthur ...and I have
Re: [google-appengine] mapreduce and cron job
You must use the control module from the mapreduce module One line in the doc tells you to chain MR tasks use a done callback and start a new one with the control submodule. Use this method to start a task from inside a cron handler Have a look at mapreduce/control.py and the test code for control.py from mapreduce import control as mr_control class MRCronHandler(webapp.RequestHandler): def get(self): mr_control.start_map( Name of the task, mymr.sometask, mapreduce.input_readers.DatastoreInputReader, {entity_kind: models.SomeModel, }, mapreduce_parameters={done_callback: /mr-end-task}, ) self.response.headers['Content-Type'] = 'text/plain' self.response.out.write('MR Cron Started') 2010/10/24 slash ewan...@gmail.com: Hi, everybody I learned a lot from this group and Nick's blog. Thanks. I want to combine mapreduce and cron job in order to run mapping automatically. I did lots of search in this group and from other resource but I got nothing. I'm able to run cron job and mapreduce separately. But I really don't know how to combine them. Maybe I missed something really basic. Could anyone tell me how to run mapreduce with cron job? I didn't find the corresponding url to trigger mapreduce. Thank you. PS: I know that it's possible to do this and I subscribe issue 41 in appengine-mapreduce project. Here is the link: http://code.google.com/p/appengine-mapreduce/issues/detail?id=41. -- 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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] datastore advice?
Parent and child objects are stored in the same Bigtable node. This is done for the transactions. A transaction works on a single entity-group. If you perform a query you use an index to find the objects needed. At this point there is no performance penalty for parent or child objects that match the query. The query results in a number of keys of objects that need to be retrieved. The best query responds time is when the objects to fetch are stored in as many Bigtable nodes as possible (parallel fetch). Why do you need so many child objects? Can you implement it with adding a Parent Reference Property to the child object and thus remove the need to store the entity group all in one Bigtable node? The parent-child objects are needed 1) if you need transactions on them or 2) if you want to extract the parent key given a child key Perform a keys_only query on child objects and from these keys get the set of parent keys of objects that you need to fetch complete. Brett Slatkin uses this technique in a number of Google IO talks, the child object has a ListProperty that is used in the keys_only query. Most other applications can be implemented without the explicit parent object. 2010/10/26 Charles char...@whoischarles.com: Hi all, I'm wondering, since the datastore is hierarchical, does the number of children an entity has affect the performance on querying on the parents themselves? For example, if I have a set of parents, say... Jane Margaret Graham Arthur ...and I have a set of children associated with those parents... Jane -Sam -Robert Margaret -Lisa Graham Arthur -Rowen -Jerry ...will the number of children for each parent affect the performance of querying the parents themselves? For instance, if I wanted to select all of the parents (SELECT * FROM parents), that would be easy with the data above. But, since the datastore is hierarchical, does the performance get hampered if say the parents have many thousands or even millions of children? Say, like... Jane -Sam -Robert ...1 million more Margaret ... If so, I'm just wondering if it would make more sense to make the children root entities too, so as not to affect the performance of querying on the parents. Anyways, hope I've explained my question well enough. Thanks in advance! Charles -- 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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] app-id
You must use the specific email address to create the GAE app. If you own the gmail address you can create an app with the same name. If you delete the gmail account the name will be blocked forever. After you create the app you can add new administrators and delete the original one if you want. 2010/10/25 ach-nein robertwald...@gmail.com: i'd like to set up an appspot app with a specific app-id which is to be visible to end users. for that purpose i need to have a certain id but GAE is telling me it's not available. I own this app-id as an gmail address, is it possible to verify that it's mine, and be allowed to create such an app? if not, is it possible to delete the email address and free up the name for the app? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Updating static files
I don't know if this is still sometimes happening with uploading, but in the early days of GAE the new static files where always visible when you upload to a NON-default version. After uploading change the default version. I still use this method. 2010/10/21 Rafael Sierra rafaeljs...@gmail.com: Hi, I made an update which changed only 1 static file (js), after 3 updates, nothing had changed, then I tried change something in some python file, after that the static file was updated too. Is this a bug? -- Rafael Sierra http://blog.rafaelsdm.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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Sending mail on DEV server - not working at all
Have you tried running sendmail with cygwin? It might already be ported to cygwin. 2010/10/21 sodso sodhisoluti...@gmail.com: i am using the following application settings for sending mail in local DEV server --use_sqlite --smtp_host=smtp.gmail.com --smtp_port=465 --smtp_user=...@gmail.com --smtp_password=*** --require_indexes --show_mail_body --debug the webpage gets stuck at Sending Mail Message and never stops and never sends the email i have checked the smtp settings, they look fine. is anyone sending mails on DEV local server using the above option ?? does it work on Windows ?? i was trying to find the sendmail package for Windows but could not find it, its only available for linux unix as a tar.gz pls help ! -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Re: Memcache capacity
If you do this many request to memcache you have a couple of hot instances of your app. Maybe if your memory footprint will allow you can cache some of them in memory first and use memcache as an L2 cache. This will reduce the calls and data transfer. Only cache stuff in memory that is somewhat 'static' in content. 2010/10/18 Felippe Bueno felippe.bu...@gmail.com: Hello All, I'd like to ask, what can I do if I reach the memcache quota limit? Specifically the Data Received from API and Memcache API Calls. Right now I have 57% used of Data Received from API. My next reset is 10h. I have about 500 req/sec, and I do intensive use of memcache. Also, is there any easy way to know how much memcache stored data my application is using ? Thanks. On Tue, Oct 5, 2010 at 4:12 PM, Ikai Lan (Google) ikai.l+gro...@google.com wrote: You can read our program policies here: http://code.google.com/appengine/program_policies.html There is a list of the type of content you can and cannot store on our servers. -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger: http://googleappengine.blogspot.com Reddit: http://www.reddit.com/r/appengine Twitter: http://twitter.com/app_engine On Mon, Oct 4, 2010 at 9:38 PM, SivaTumma sivatu...@gmail.com wrote: Ikai, Can We build applications those serve religions or Porn on appengine ? -- 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-appeng...@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. -- 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-appeng...@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. -- 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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] SDK 1.3.8 released!
When I want to delete the MapReduce objects from the *local* datastore with the admin interface I get the following error when I use v1.3.8 SDK. Any datastore manipulation like adding a new object or running a MapReduce Job fails with a similar error. Using the same datastore with 1.3.7 enables me to delete or create these objects. I use Windows-XP-SP3 (NL) === Traceback (most recent call last): File C:\\google_appengine\google\appengine\ext\webapp\__init__.py, line 513, in __call__ handler.post(*groups) File C:\\google_appengine\google\appengine\ext\admin\__init__.py, line 787, in post datastore.Delete(datastore.Key(key)) File C:\\google_appengine\google\appengine\api\datastore.py, line 395, in Delete 'datastore_v3', 'Delete', req, datastore_pb.DeleteResponse(), rpc) File C:\\google_appengine\google\appengine\api\datastore.py, line 195, in _MakeSyncCall rpc.check_success() File C:\\google_appengine\google\appengine\api\apiproxy_stub_map.py, line 499, in check_success self.__rpc.CheckSuccess() File C:\\google_appengine\google\appengine\api\apiproxy_rpc.py, line 149, in _WaitImpl self.request, self.response) File C:\\google_appengine\google\appengine\api\datastore_file_stub.py, line 863, in MakeSyncCall response) File C:\\google_appengine\google\appengine\api\apiproxy_stub.py, line 80, in MakeSyncCall method(request, response) File C:\\google_appengine\google\appengine\api\datastore_file_stub.py, line 980, in _Dynamic_Delete self.__WriteDatastore() File C:\\google_appengine\google\appengine\api\datastore_file_stub.py, line 806, in __WriteDatastore self.__WritePickled(encoded, self.__datastore_file) File C:\\google_appengine\google\appengine\api\datastore_file_stub.py, line 852, in __WritePickled os.rename(tmp_filename, filename) WindowsError: [Error 32] The process has no access to the file because the file is used by another process Djidjadji -- 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-appeng...@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.
Re: [google-appengine] Cron and App Versions
The cron jobs are uploaded separate from the source code. I think there is only one version of cron jobs, the last one uploaded. If you switch default application you only switch source code. 2010/10/7 Remigius remigius.stal...@gmail.com: In the documentation of cron jobs (see http://code.google.com/intl/de-CH/appengine/docs/java/config/cron.html#Cron_and_App_Versions) it says that Cron requests are always sent to the default version of the application. This may be correct, but is a very short statement of what actually happens, leaving imho some questions unanswered. We have uploaded a new version of an app, which was the first version that contained a cron.xml. Therefore we saw only an error in the log saying No handlers matched this URL.. After some thinking, we came to the obvious conclusion that cron jobs go to the default version (see above). So far, so good. But what happens now of there are several versions of cron.xml deployed with different app versions? Is each of the cron jobs of possibly multiple versions executed? Or is cron.xml a singleton? Does it make sense to execute cron.xml from other versions than the default version (in our case it did not do any harm, as the handler was not present, but this may well happen in other cases)? At least I would appreciate to see some documentation about which cron.xml is/are active at a given time, to be able to exercise the necessary control over cron.xml deployment. -- 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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Easy way to delete unowned (child) entities in same entity group ?
No. You need to do a (kindless) ancestor query and delete all entities found before you delete the parent Test. If you know the child is only of one type you can do a normal ancestor query. You could subclass the delete() method of the Test class to do this, but I don't know if it will work if you use db.delete( list of keys or instances ) 2010/10/6 Prashant nextprash...@gmail.com: Hi, Suppose, I have two types of Entities Test and TestChild. For all TestChild entities i have set key as child of some Test entity (because i want both entities in same entity group to support transaction) but i haven't mapped TestChild entity to any variable in Test entity. Now, i am wondering if there is any way, such that, if i delete Test entity then all corresponding child TestChild entitie(s) should also get deleted ? -- Prashant www.claymus.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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Re: Prerelease SDK 1.3.8 is out!
+1 2010/10/6 Greg g.fawc...@gmail.com: On Oct 6, 1:28 pm, Ikai Lan (Google) ikai.l+gro...@google.com wrote: - The developer who uploaded an app version can download that version's code using the appcfg.py download_app command. I'm not at all happy about this. I know how frequent plaintive I lost my code how can I get it back? messages are in this group, but the write-only nature of appengine gave me a lot of confidence that our source code is safe. Now a single password is all that stands between our competitors and our IP. Why expose ALL users to risk (and open Google to lawsuits) for the sake of a few inexperienced developers? Star this post if you agree. I guess one solution would be to make downloading optional. A setting to disable source downloading in app.yaml would be safe, because uploading a new version would destroy the existing code. Greg. -- 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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Easy way to delete unowned (child) entities in same entity group ?
http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Kindless_Ancestor_Queries a normal ancestor query uses an ancestor() filter for GQL have a look at its manual page 2010/10/6 Prashant nextprash...@gmail.com: Hi djidjadji, can you tell me, with an example, how to write a kind-less/normal ancestor query? thanks in advance :) On 6 October 2010 16:02, djidjadji djidja...@gmail.com wrote: No. You need to do a (kindless) ancestor query and delete all entities found before you delete the parent Test. If you know the child is only of one type you can do a normal ancestor query. You could subclass the delete() method of the Test class to do this, but I don't know if it will work if you use db.delete( list of keys or instances ) 2010/10/6 Prashant nextprash...@gmail.com: Hi, Suppose, I have two types of Entities Test and TestChild. For all TestChild entities i have set key as child of some Test entity (because i want both entities in same entity group to support transaction) but i haven't mapped TestChild entity to any variable in Test entity. Now, i am wondering if there is any way, such that, if i delete Test entity then all corresponding child TestChild entitie(s) should also get deleted ? -- Prashant www.claymus.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-appeng...@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. -- 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-appeng...@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. -- Prashant www.claymus.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-appeng...@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. -- 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-appeng...@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.
Re: [google-appengine] Re: Prerelease SDK 1.3.8 is out!
Not a good choice because the one that pays the bill is not the one that writes the source code. I'm not paying for the storage requirement and bandwidth of my client who has bought a use right of my software. I'm an advocate of NO Download allowed. But in case it will be allowed make it OFF by default. You MUST turn it ON in your app.yaml. This way the behavior is compatible with previous versions. And there is no action needed by the people who don't want it. There is always a gap between the time you roll it out and you announce the availability of a new release on the production servers. During this time it would be possible to download the source code if you tried regularly. And I could be away at the moment of the announcement and leave a door wide open for quite some time. 2010/10/6 alf alberto@gmail.com: +1 only can download code administrator who pay 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-appeng...@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.