[google-appengine] Re: Datastore Entity

2008-10-25 Thread Koren
Thanks! so can i do soemthing like: Newkind = type("KindName", (db.expando,)) obj1 = KindName() ? On Oct 25, 12:14 am, yejun <[EMAIL PROTECTED]> wrote: > I think you mean kind. > > Newkind = type("KindName", (db.model,), dict(p1=db.Property(), p2...)) > > On Oct 24, 5:45 pm,Koren<[EMAIL PROTECT

[google-appengine] Re: Datastore Entity

2008-10-25 Thread yejun
I think this should work as well. I only tried db.Model though. On Oct 25, 3:36 am, Koren <[EMAIL PROTECTED]> wrote: > Thanks! > so can i do soemthing like: > Newkind = type("KindName", (db.expando,)) > > obj1 = KindName() > > ? > > On Oct 25, 12:14 am, yejun <[EMAIL PROTECTED]> wrote: > > > I th

[google-appengine] Re: Datastore Entity

2008-10-25 Thread yejun
Actually, you still need to supply a empty dict object anykind = type("KindName", (db.Expando,), dict()) obj1 = anykind() obj1.put() Here "anykind" is just a variable name, it is not necessary to match KindName, but KindName is the name used for datastore. On Oct 25, 3:36 am, Koren <[EMAIL PRO

[google-appengine] Re: Dynamic URLs with semicolons work with SDK but not on appspot.com

2008-10-25 Thread Casey Dwyer
Hi pr3d4t0r and Sylvain, Thanks for the info. I'm now using the urllib.quote/unquote functions as a workaround. I was just hoping I could having nice looking sentences in my URLs like those supported by Wikimedia software. Maybe someday. Thanks again, Casey On Oct 24, 2:19 am, pr3d4t0r <[EMAIL

[google-appengine] Re: Implement AJAX in App Engine

2008-10-25 Thread Shay Ben Dov
sorry in the example I made a mistake: It should be 1 new and not new new Ajax.Updater('div id', '/action_name', { now on IE 6 we don't get an error message but it is not doing the ajax stuff with the setInterval on Chrome Firefox and Flock it is working fine. On Oct 25, 3:08 am,

[google-appengine] Re: python / django templates and javascript

2008-10-25 Thread georgec
Sorry to have wased your time - your correct it does work. must have been doing something else wrong - doh! On Oct 24, 11:44 pm, Alexander Kojevnikov <[EMAIL PROTECTED]> wrote: > I don't see why this shouldn't work. Could you post here the > stacktrace of the error? > > On Oct 25, 9:22 am, geor

[google-appengine] Is appengine.google.com blocked from China

2008-10-25 Thread wei
I tried to access appengine.google.com form China, but failed. I read a post that it was blocked in Aug, I don't know if it is still true. If so, anyway to get around or fix this problem from Google? wei --~--~-~--~~~---~--~~ You received this message because you

[google-appengine] Complete Newb Question

2008-10-25 Thread fishfin
I'm coming over from php and am trying to figure out how to do something. In php you can put data in the user's address bar (index.php? data=somedata) and then get it from the address bar really easily (you just use $_GET and $_REQUEST), so I was wondering what the equivalent is in python? --~--

[google-appengine] Re: Implement AJAX in App Engine

2008-10-25 Thread Arun Shanker Prasad
Hi, Have you tried setTimeout()? It does the same thing and it works for me in most ie versions. On Oct 24, 11:58 pm, Shay Ben Dov <[EMAIL PROTECTED]> wrote: > sorry in the example I made a mistake: > > It should be 1 new and not > new  new Ajax.Updater('div id', '/action_name', { >

[google-appengine] Re: Dynamic URLs with semicolons work with SDK but not on appspot.com

2008-10-25 Thread Sylvain
But, i think, there is a bug here. >From there : http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.2.2 It is better to use ";" than "&" in the url in order to avoid escaping "&->"&" So if you write this : http://kc.appspot.com/bug/semi;colon == http://kc.appspot.com/bug/semi&colon to the

[google-appengine] Re: Tips on Optimizing Writes?

2008-10-25 Thread Waldemar Kornewald
Hi Jeff, On 25 Okt., 00:40, Jeff S <[EMAIL PROTECTED]> wrote: > The average CPU per request numbers on the dashboard are composed of > CPU used in executing your code (runtime) and API calls (datastore, > urlfetch, image API, etc). When these numbers are high it can indicate > that app resource u

[google-appengine] Re: Implement AJAX in App Engine

2008-10-25 Thread RIAgallery
I think the best way will be: "Google Web Toolkit 1.5" http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5 Enjoy ;-) On Oct 12, 10:06 am, Shay Ben Dov <[EMAIL PROTECTED]> wrote: > I wonder is there a way to implement AJAX in an application like the > easy way it is done in Rails: > >

[google-appengine] Re: Creating web forms in GAE

2008-10-25 Thread RIAgallery
Now I'm porting my Echo3 app to GWT :-) On Oct 24, 12:12 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Thanks, I need time to see. It's all new for me. > > On Oct 22, 12:22 am, RIAgallery <[EMAIL PROTECTED]> wrote: > > > and the back-end comunication is made with > > JSON:http://sourcefor

[google-appengine] Index stuck on building...

2008-10-25 Thread Gadi
One of the indexes in my app has been stuck on "building" for a long time. Vacuum_indexes doesn't work on it. There are some threads describing this problem and several "voodoo- like" solutions... Any new REAL solution to this problem ?? I really need this index, help much appreciated ! (app:h

[google-appengine] Re: Implement AJAX in App Engine

2008-10-25 Thread Shay Ben Dov
Thanks but to master GWT is not a joy. I think part of the problem is related to CSS compatibility issues in IE 6 you can spot that the program span wrote: > I think the best way will be: > > "Google Web Toolkit > 1.5"http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5 > > Enjoy ;-)

[google-appengine] File download from datastore

2008-10-25 Thread Sergey Klevtsov
Ok, first of all I've searched through the group, this issue has been raised several times, but no helpful answer given. I wrote a small file hosting service, and want its users to be able to upload and download files with non-ascii characters in names - and threrefore, I want the name suggested b

[google-appengine] Re: Complete Newb Question

2008-10-25 Thread loell
Typically, it should go something like this, class MainPage(webapp.RequestHandler): def get(self): data = cgi.escape(self.request.get('data')) fishfin wrote: > I'm coming over from php and am trying to figure out how to do > something. > > In php you can put data in the user's addre

[google-appengine] Uploaded file size

2008-10-25 Thread Sergey Klevtsov
I want my app to know the size of files (in bytes) that users upload. Can't find a way to do that (tried checking 'Content-Length' header in request, messing with javascript at client side, found no means in Python to check objects size). I am new to GAE, so I could use some help :) Thanks in adva

[google-appengine] What's the relationship between danga.com memcached and Memcache?

2008-10-25 Thread pr3d4t0r
Greetings. Is there any information regarding the history and overall implementation information of the App Engine Memcache and memcached? Google results are somewhat useless because some entries use "memcached" as a verb when trying to find out about both. It appears, after RTFMd, that App Engi

[google-appengine] Re: Uploaded file size

2008-10-25 Thread Sylvain
Check my litle project: http://simpleviewer4gae.appspot.com/ (source available) else you can simply use len(data) :) -- file_data = self.request.POST.get('file').file.read() image_length = len(file_data) if image_length > config.max_size: error = 'File is too large' else: file_content

[google-appengine] Open ID & yahoo login

2008-10-25 Thread gops
hi, I searched on the forum and found that even tho both openid provider and consumer both application in place working on local devserver but not working on production server. Any update on that ? or work around ( like meta refresh ?? ) . I atleast need yahoo or lj login ?? Thanks. --~--~

[google-appengine] Re: Open ID & yahoo login

2008-10-25 Thread ryan
hi gops! you're right, http://openid-consumer.appspot.com/ and http://openid-provider.appspot.com/ have been unhappy in prod for a long time, due to http://code.google.com/p/googleappengine/issues/detail?id=407 . the good news is we (finally!) expect that to be fixed in the next release. thanks f

[google-appengine] Re: Please don't repeat GWT's mistake!

2008-10-25 Thread Peter Recore
> Can't some of this optimization be done by the javascript JIT? > > Amir This would be less than optimal for 2 reasons - first, you would be sending much bigger javascript files than you might need to be, which is bad for response times. Second, not all javascript JIT's are created equal, and t

[google-appengine] Whoops, GAE Cookbook is broken.

2008-10-25 Thread James
Here's the traceback error I get when leaving a comment: Traceback (most recent call last): File "/base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py", line 501, in __call__ handler.post(*groups) File "/base/data/home/apps/appengine-cookbook/2.4/cookbook.py", line 373, i

[google-appengine] Re: time.time() across shards

2008-10-25 Thread Peter Recore
I have a clarification question. Does this time skew also apply to the datastore? In particular, if I have an entity with a DatetimeProperty using the "auto_now" feature, will the times in my property be potentially skewed? My guess is that since the datastore is so distributed, the same kind o

[google-appengine] inequality filter on string length

2008-10-25 Thread jeremy
"To get all results that match an inequality filter, a query scans the index table for the first matching row, then returns all consecutive results until it finds a row that doesn't match. For the consecutive rows to represent the complete results set, the rows must be ordered by the inequality fi

[google-appengine] Newbie: can't import from appengine_django.models

2008-10-25 Thread Giacecco
All, I have a very simple Django app I wrote to run on App Engine. It works, as long as I don't try using the database. I am using the stable django helper (r52) on MacOS 10.5.5 + GoogleAppEngineLauncher 1.1.5.151 . My application is called "giacecco_app". The file that ignites the problem is its

[google-appengine] Re: Newbie: can't import from appengine_django.models

2008-10-25 Thread Giacecco
It's always like that, isn't it? Half a hour after writing my previous message I found my mistake. I was trying to use Django's standard db libraries instead than Google App Engine's. models.py should have been: # -*- coding: utf-8 -*- from appengine_django.models import BaseModel from

[google-appengine] Re: Whoops, GAE Cookbook is broken.

2008-10-25 Thread David Symonds
On Sat, Oct 25, 2008 at 12:52 PM, James <[EMAIL PROTECTED]> wrote: > Here's the traceback error I get when leaving a comment: Which URL were you at? Dave. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google A

[google-appengine] Re: Complete Newb Question

2008-10-25 Thread fishfin
How would I get that data later on? 'print data' doesn't seem to work, 'print self.data' and 'print MainPage.data' don't seem to work either. On Oct 25, 11:16 pm, loell <[EMAIL PROTECTED]> wrote: > Typically, it should go something like this, > > class MainPage(webapp.RequestHandler): >     def g

[google-appengine] Re: counting

2008-10-25 Thread Peter Recore
I'll try to state a more formal version of the problem, then offer my suggestion. Problem: Assume that there is an entity type called Player, and each Player has a score. A score is an integer. For any given Player P with a score of X, we want to know how many other Players have scores that ar

[google-appengine] Re: Complete Newb Question

2008-10-25 Thread jeremy
When you say "later on", where exactly do you mean? If you want to access it from another handler you will probably want to datastore it. You can write to the output buffer by doing self.response.out.write(). On Oct 25, 5:20 pm, fishfin <[EMAIL PROTECTED]> wrote: > How would I get that data late

[google-appengine] Re: Complete Newb Question

2008-10-25 Thread fishfin
My guess is that the code snippet above gets the value of 'data' from the address bar, what I want to know how to do is to use the value of 'data' later on in my code. When I just try to use the variable 'data' I get a variable undefined error message. On Oct 26, 8:39 am, jeremy <[EMAIL PROTECTED

[google-appengine] Re: Dynamic URLs with semicolons work with SDK but not on appspot.com

2008-10-25 Thread Casey Dwyer
Hi Sylvain, thanks for pointing that out. I went ahead filed the following issue report and cited that link you gave me: http://code.google.com/p/googleappengine/issues/detail?id=816 Thanks again, Casey On Oct 25, 3:20 am, Sylvain <[EMAIL PROTECTED]> wrote: > But, i think, there is a bug here.

[google-appengine] Re: Is appengine.google.com blocked from China

2008-10-25 Thread fishfin
I'm in China right now and can access it. The access comes off-and-on, about 30 minutes off, hour on, back and forth. It might also depend on where you are in China seeing as some internet providers seem to block websites locally for various reasons. (It might also depend what gateway you're acces

[google-appengine] Re: What's the relationship between danga.com memcached and Memcache?

2008-10-25 Thread Casey Dwyer
Brad who created memcached works for Google now, including on Perl App Engine, so there's surely a connection there. Here's his Google Groups profile if you want to shoot him a personal message or post this to one of his groups: http://groups.google.com/groups/profile?enc_user=tB9Pbw4AAACsDAM5OK1

[google-appengine] My app is live.

2008-10-25 Thread Jarred Bishop
http://www.hypetape.com Let me know what you think. If you like it, vote for it here: http://appgallery.appspot.com/about_app?app_id=agphcHBnYWxsZXJ5chQLEgxBcHBsaWNhdGlvbnMY-KgBDA Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed t

[google-appengine] Are db.Key s and their str s cmp consistent?

2008-10-25 Thread Andy Freeman
For any two db.Key s k1 and k2, does cmp(k1, k2) always equal cmp(str(k1), str(k2)) ? (Assuming, of course, that cmp(k1,k2) is in (-1,0,1), that is, that str(k1) and str(k2) is defined.) --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[google-appengine] Re: time.time() across shards

2008-10-25 Thread ryan
good question! the timestamps for DatetimeProperties with auto_now and auto_now_add are calculated and populated by the app servers, not by the datastore. given that, the discussion here about clock synchronization applies to them too. --~--~-~--~~~---~--~~ You rece

[google-appengine] Re: Are db.Key s and their str s cmp consistent?

2008-10-25 Thread ryan
hi andy! the sort orders of Keys and their string encodings are very similar, but they're not guaranteed to be consistent, no. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this

[google-appengine] Re: My app is live.

2008-10-25 Thread fishfin
I like it! The site design is simple and easy to use. (On my screen resolution it also looks a little bit empty, you might consider adding something like 'most resent' or 'most popular' lists to flesh it out a bit) Some more nitpicks: It would be nice if there was a stop / pause button for the so

[google-appengine] can you help me?

2008-10-25 Thread fish
Hi,when I upload the file to server,the command display error after August 8, 2008 . Is Google App Engine not run in china?but I can explorer the site (http://appengine.google.com/ ) by firefox with tor. Can you help me? Can I upload file with tor? Thanks, -fishks L:\temp\google_appengine\google

[google-appengine] Re: Please don't repeat GWT's mistake!

2008-10-25 Thread Lex Spoon
On Oct 21, 3:59 pm, Peter Recore <[EMAIL PROTECTED]> wrote: > I don't think "mistake" is the right word there.  I'm not an expert on > Java Compilers and JVMs, but I'll go out on a limb here and risk > embarrassing myself - my gut feeling is that Java is much easier to > compile into javascript th

[google-appengine] Using Model.get_or_insert to create unique values for entities

2008-10-25 Thread Alexis Bellido
Hello everybody, I needed to store some information about my users (I don't need to use Google accounts) and created a model called FbUser, each entity in the model is a fbuser and each fbuser has a unique user uid, a field I call 'uid'. A uid can't appear more than once in the datastore but it c

[google-appengine] Re: Complete Newb Question

2008-10-25 Thread Hakayati
You can retrieve URL parameters from the request object like this: # e.g. www.mysite.com/?my_parameter=hello%20world class MainPage(webapp.RequestHandler): def get(self): my_parameter = '' for param in self.request.query.split('&'): if param.startswith('my_parameter'): my