[google-appengine] Re: Registration Problem

2008-12-12 Thread Alexander Kojevnikov
> What To Do?? http://knol.google.com/k/marce/app-engine-community-faqs/vkzeph4si12v/1# --~--~-~--~~~---~--~~ 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-appengin

[google-appengine] Re: Formating floating point numbers in a template

2008-12-12 Thread Alexander Kojevnikov
Just a small correction, the documentation for template engine built into GAE is located at: http://www.djangoproject.com/documentation/0.96/templates/ On Dec 13, 4:44 am, Marzia Niccolai wrote: > Hi, > > You are looking for Django Templates > (http://docs.djangoproject.com/en/dev/ref/template

[google-appengine] Re: Efficient paging using __key__ instead of a dedicated unique property

2008-12-12 Thread Alexander Kojevnikov
> Still, we've come up with some interesting ideas, and I'd like to > share one of them here. > Brilliant, thanks Ryan! Is there a chance that this will be integrated into the Datastore Viewer? --~--~-~--~~~---~--~~ You received this message because you are subsc

[google-appengine] Re: model reference problem

2008-12-15 Thread Alexander Kojevnikov
> now if i want to list all the children of a particular parent how do i > do that? parent_entity.childmodel_set You can customise the name of the collectio: parent = db.ReferenceProperty(ParentModel, collection_name='children') ... then call: parent_entity.children Docs: http://

[google-appengine] Re: The same here

2008-12-15 Thread Alexander Kojevnikov
Fill out the SMS issues form: http://appengine.google.com/waitlist/sms_issues There's a community FAQ that covers this and other common issues: http://knol.google.com/k/marce/app-engine-community-faqs/vkzeph4si12v/1# -- www.muspy.com On Dec 16, 4:34 am, Dave wrote: > Hi there, > I got this err

[google-appengine] Re: Django+Appengine vs Appengine

2008-12-15 Thread Alexander Kojevnikov
The problem with built-in djangoforms and templates is that they are from Django 0.96. Django 1.0 has a lot of new useful functionality, it really worth the trouble installing it with your app. Another advantage of Django is that it allows to implement custom user authentication, this is especial

[google-appengine] Re: Django+Appengine vs Appengine

2008-12-15 Thread Alexander Kojevnikov
> This is using the AppEngine helper (not the patch you linked to). I > thought the AppEngine helper would make sure that the Django model > methods would delegate to the AppEngine's version transparently but > some seem to be missing - why is this? > app-engine-patch does not try to replace appen

[google-appengine] Re: how to submit form from static index.html

2008-12-15 Thread Alexander Kojevnikov
> I'm not starting the page using template.render (), so I cannot > implement the way in the tutorials, i'm using static index.html... is > it supposed to work if i have the sendmail in form action, like this: > ---?? > > ... > No, but you can write your own handler. Use the code from the tutoria

[google-appengine] Re: Unable to import non-root modules; works fine in dev_appserver

2008-12-15 Thread Alexander Kojevnikov
> Say I create a directory called "code" in the app root.   I had exactly the same problem a couple of months ago, took me quite a few hours to find a solution. Apparently the "code" name conflicts with some internal modules or packages. I ended up renaming it to "app", this fixed the problem.

[google-appengine] Re: Any updates on deleting all entities in the production datastore?

2008-12-15 Thread Alexander Kojevnikov
Related issues: http://code.google.com/p/googleappengine/issues/detail?id=793 http://code.google.com/p/googleappengine/issues/detail?id=169 On Dec 16, 11:50 am, "Jyoti Shete-Javadekar" wrote: > Hi, > I want to delete all my data models in production environment and upload new > set of entities

[google-appengine] Re: how to submit form from static index.html

2008-12-16 Thread Alexander Kojevnikov
> here is how i have setup the app.yaml, email.py and form.html, let me > know whats wrong ??, how should i setup handler for email.py in > app.yaml ?? OK, here's how you can do it. app.yaml: - handlers: - url: /send-email script: email.py - url: (.*)/ static_files: static\1/index.ht

[google-appengine] Re: Updates to Dashboard and other problems

2008-12-16 Thread Alexander Kojevnikov
Me too, please fix this! On Dec 16, 9:29 pm, Sylvain wrote: > Yes, same issue with the DataViewer > > On 16 déc, 11:01, "Paul Kinlan" wrote: > > > Hi, > > > I really like the Quota Details page, it gives some really good insight. > > > I am having an issue with the Data Viewer page.  I have an

[google-appengine] Re: Unable to import non-root modules; works fine in dev_appserver

2008-12-16 Thread Alexander Kojevnikov
> Probably this issue should be documented somewhere, or at least the > odd behaviors of the server should be duplicated by the > dev_appserver.  ( Similar to this > note:http://code.google.com/appengine/docs/configuringanapp.html#Reserved_... > ) > Add an issue to the tracker and post the link h

[google-appengine] Re: reading line from request.get instead of byte at a time

2008-12-16 Thread Alexander Kojevnikov
> I have an app where I need to parse and process text file via POST > method. > > When I use webapp.RequestHandler's request.get method, it returns the > content a byte a time.  I was hoping it could return a line (ie: UNIX > or Windows/DOS line).  Is there another flag/method that does this > al

[google-appengine] Re: Updates to Dashboard and other problems

2008-12-16 Thread Alexander Kojevnikov
> I am not specifying no-cache. I will try it out tonight, I suspect   > that will fix the problem. Not sure why I have not seen it before, but   > I suspect I just never noticed. > Paul, could you post here the result of your investigation? I somehow overlooked the urlfetch()'s header parameter t

[google-appengine] CPU Time calculation

2008-12-16 Thread Alexander Kojevnikov
Has the algorithm calculating the CPU Time been changed with the recent Dashboard update? I hardly ever reached 1% of the CPU quota, and most of the time it was at 0%. But now I'm at 4% and the number increases rapidly. If things continue like this I will reach the free quota before the next rese

[google-appengine] Re: how to submit form from static index.html

2008-12-16 Thread Alexander Kojevnikov
> thanks Alexander, > > the setup and code worked, > > one more help, - how do i unescape string in python that was escaped > in javascript and submitted?? > > I'm submitting html that is escaped from the form - escape(data) > How do I unescape the self.request.get('data') in python and then mail

[google-appengine] Re: Send and receive mail with embedded images

2008-12-16 Thread Alexander Kojevnikov
> When you say embedded images, do you mean as attachments, or an HTML > email with image tags? I guess Dani means something else: http://www.systemnetmail.com/faq/4.4.aspx This method allows to refer to an inline attachment using . This is the only way to be sure the recipient actually sees th

[google-appengine] Re: CPU Time calculation

2008-12-16 Thread Alexander Kojevnikov
ec 17, 11:41 am, Alexander Kojevnikov wrote: > Has the algorithm calculating the CPU Time been changed with the > recent Dashboard update? > > I hardly ever reached 1% of the CPU quota, and most of the time it was > at 0%. But now I'm at 4% and the number increases rapidly. If thing

[google-appengine] Re: how to submit form from static index.html

2008-12-16 Thread Alexander Kojevnikov
> I'm trying to email content that is in a container on the > webpage, so i'm submitting using a hidden input tag with value=escape > (div.innerHTML) > Discard my second comment then and use the unescape() function from the link above. -- www.muspy.com --~--~-~--~~~--

[google-appengine] Re: Django Head Scratching...

2008-12-16 Thread Alexander Kojevnikov
>       transx = db.GqlQuery("SELECT * FROM Transaction WHERE Key = : > 1" , transx_key) transx is an instance of a GqlQuery object. To get the actual entity you should call the get() method: transx = db.GqlQuery("SELECT * FROM Transaction WHERE Key = :1" , transx_key).get() or transx = Tr

[google-appengine] Re: Unicode problem with GAE datastore

2008-12-17 Thread Alexander Kojevnikov
> I use Django to develop my GAE application. > The problem is I can't put my unicode data to datastore. Here is a bit > of my view.py: > > # -*- coding: utf8 -*- > from myproject.myapp.models import * > c = Clients() > c.Name = "Иванов" #Here is some text in Russian > c. put() > > This code calls

[google-appengine] Re: Python basic error why

2008-12-17 Thread Alexander Kojevnikov
Try replacing: - url: /import/.* script: homepage.py with: - url: /import/.* script: import/homepage.py On Dec 18, 9:21 am, "aviza...@gmail.com" wrote: > I am navigating to / that uses /homepage/homepage.py it works fine > When I am navigating to /import/ that uses /import/homepage.py I

[google-appengine] Re: SMS Issues + Form Broken

2008-12-18 Thread Alexander Kojevnikov
> I just tried to submit an issue regarding SMS verification, however it > appears that form is also broken, so I'll reproduce it here: > > Telstra is listed as one of your supported carriers, however if I > input my phone number (after selecting "Other (Not Listed)"), I get a > message saying: >

[google-appengine] Re: djangoforms unicode error

2008-12-18 Thread Alexander Kojevnikov
> Is this a bug or a limitation of Django version in GAE? You should prefix Unicode strings with 'u': tipo=db.StringProperty(multiline=False,choices=set([u"Pessoa Física",u"Pessoa Jurídica"])) -- www.muspy.com --~--~-~--~~~---~--~~ You received this message becau

[google-appengine] Re: Sending same email to about 200 different TO adresses fails

2008-12-18 Thread Alexander Kojevnikov
send_mail() takes good amount of time to execute. Call it repeatedly in a loop and your request will soon time out: http://code.google.com/status/appengine/detail/mail/2008/12/18#ae-trust-detail-mail-send-mail-latency In my app I send one e-mail per request (triggered from an external box) and al

[google-appengine] Re: Best way to mass mail

2008-12-18 Thread Alexander Kojevnikov
> Suppose one of the features I have on the App I'm creating, is the > ability for users to subscribe for certain "alerts." > > 1. What would be the best way to implement this considering the > current features available on google app engine (and possibly other > free services)? > There are two is

[google-appengine] Re: Best way to mass mail

2008-12-18 Thread Alexander Kojevnikov
> That would work well for a small amount of users. But what if my app > grows to like 5,000 emails? Your solution would definitely not work > well at that point! > I agree that it's far from being perfect, but I don't see why it wouldn't scale. I currently send about 100 emails a day, if this num

[google-appengine] Re: Best way to mass mail

2008-12-18 Thread Alexander Kojevnikov
> Well another point is that if I want to send time-sensitive info, it > would be impossible (i.e. with your method, you are running the > sending throughout the entire day, but in some cases almost-instant > sending is required). > If you need to notify a lot of users on the same event instantly,

[google-appengine] Re: Sudden jump in CPU time

2008-12-18 Thread Alexander Kojevnikov
> I've had a very steady increase in the number of users and number of > requests to all my URL, everything looks the same as it did a few days > ago, but now i've jumped from using 0% of my cpu quota to 48%?  What's > going on?  I don't see any spikes in any of the data in the dashboard. The CPU

[google-appengine] Re: Django+Appengine vs Appengine

2008-12-19 Thread Alexander Kojevnikov
> Like I said, it's been hard enough getting up and going with just > GAE.  Every additional piece is more configurations, more > documentation, more forums, more possible bugs, more possible > constraints, etc.  It looks like the app-engine-patch developers > (you?) did a good job bringing newer

[google-appengine] Re: Mail Quota Exceeded by just sending 14 mails

2008-12-20 Thread Alexander Kojevnikov
See this thread for possible workarounds: http://groups.google.com/group/google-appengine/browse_thread/thread/12d823a18bddd53b On Dec 21, 6:07 am, Arun Shanker Prasad wrote: > Hi All, > >     I got the following error in my log when I tried to send an > invitation mail to around 14 people, > >

[google-appengine] Re: Can't manage applications, just keep getting put back on the start page.

2008-12-20 Thread Alexander Kojevnikov
Do you use a Google Apps email account? In this case you need to go to this URL: http://appengine.google.com/a// On Dec 21, 5:22 am, Josh wrote: > Every time I create an application, I just end up back on the create > application page. I create an application successfully, then boom, > back toht

[google-appengine] Re: Can't manage applications, just keep getting put back on the start page.

2008-12-20 Thread Alexander Kojevnikov
> This is supposedly beta software, but I can't find any place to > actually post bugs about it. Ridiculous. You can post (or vote for) bugs here: http://code.google.com/p/googleappengine/issues/list --~--~-~--~~~---~--~~ You received this message because you are

[google-appengine] Re: script handler issues

2008-12-20 Thread Alexander Kojevnikov
Replace - url: /finance/worksheet/.* with - url: /finance/worksheet.* The URL you are trying to access doesn't have the trailing slash, but your script handler requires it. -- www.muspy.com On Dec 21, 3:14 pm, Vince wrote: > Having a hard time with wrapping my head around the script handler

[google-appengine] Re: are numeric ids of deleted entities reused?

2008-12-20 Thread Alexander Kojevnikov
> Can we ever experience inserting a record that will > have a lower ID than the previous? You can, at least that's what I'm seeing in my app. As far as I understand, the IDs are pre-allocated in batches, and if your app actually runs on different boxes, they will use IDs from different batches.

[google-appengine] Re: Could you please provide issue tracking?

2008-12-21 Thread Alexander Kojevnikov
http://code.google.com/p/googleappengine/issues/list On Dec 22, 5:56 am, Amir Michail wrote: > Hi, > > Why is it that Google only offers issue tracking for open source apps? > > Amir --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

[google-appengine] Re: Could you please provide issue tracking?

2008-12-21 Thread Alexander Kojevnikov
> How is this different from allowing closed source companies to use > Google Groups though?  As long as Google puts ads in the service, then > it should be fine. > I belive Google Code was created with a different goal. From their FAQ: > Why open source projects only? > Most proprietary software

[google-appengine] Paging vs. crawlers

2008-12-21 Thread Alexander Kojevnikov
Currently the only efficient way to implement paging is to pass parameters uniquely identifying the page's last entity to the next page handler and use it there as a starting point. See for example Brett Slatkin's talk (slides 34-37): http://sites.google.com/site/io/building-scalable-web-applicat

[google-appengine] Re: dev_appserver.py GET requests are taking 0.5s or more on local system

2008-12-21 Thread Alexander Kojevnikov
See the last question in the Community FAQ: http://knol.google.com/k/marce/app-engine-community-faqs/vkzeph4si12v/1# On Dec 22, 5:57 pm, Jonathan B wrote: > Hi, > > I'm wondering if anyone else has run into this problem and has some > advice for me. > > I've noticed that the GAE Development Serv

[google-appengine] Re: Paging vs. crawlers

2008-12-21 Thread Alexander Kojevnikov
> But, once a new comment is posted, the value if X on every page is > changed as well. Eventually, search engines will index O(C * P) URLs, > where C is the number of comments, and P is the number of pages. > After a second thought, the number of indexed URLs is O(C), not O (C*P). Which is still

[google-appengine] Re: Send and receive mail with embedded images

2008-12-22 Thread Alexander Kojevnikov
Daniel, please post here the link when you submit it, I will definitely star the issue. On Dec 23, 4:13 am, Marzia Niccolai wrote: > Hi, > > Feature requests can be filed > here:http://code.google.com/p/googleappengine/issues/list > > -Marzia > > On Mon, Dec 22, 2008 at 4:43 AM, Daniel Levin w

[google-appengine] Re: Lost access to my app's Dashboard

2008-12-22 Thread Alexander Kojevnikov
Marzia, this issue comes up at least a few times a week. Would it be possible for the dashboard to detect what kind of account is used and either redirect to appengine.google.com/a/YOURDOMAIN.COM or just warn the user if it's a Google Apps email? That message on the bottom of the sign in page is

[google-appengine] Re: Problem: Mobile Authentication Code not received

2008-12-22 Thread Alexander Kojevnikov
http://code.google.com/appengine/kb/sms.html On Dec 23, 2:55 am, Sunil Bishnoi wrote: > I was to registering my self to use Google app engine. But i haven't > received any mobile authentication code on my mobile. > > Any solution for this problem. > > Thanks & Regards > Sunil Bishnoi --~--~-

[google-appengine] Re: Filtering Using the IN Keyword

2008-12-22 Thread Alexander Kojevnikov
Query.filter() does not support the 'IN' operator: http://code.google.com/appengine/docs/datastore/queryclass.html#Query_filter You need to use GQL if you want to have 'IN' in your queries. On Dec 23, 6:51 am, Chris wrote: > How do you use the IN keyword? The datastore query API makes a few > m

[google-appengine] Re: Lost access to my app's Dashboard

2008-12-22 Thread Alexander Kojevnikov
ow that it is on our radar. > > -Marzia > > On Mon, Dec 22, 2008 at 3:36 PM, Alexander Kojevnikov < > > alexan...@kojevnikov.com> wrote: > > > Marzia, this issue comes up at least a few times a week. Would it be > > possible for the dashboard to detect what kind of

[google-appengine] Re: Paging vs. crawlers

2008-12-22 Thread Alexander Kojevnikov
> I think you'll find that any good search engine will be able to cope > just fine with that. > > The best solution, though, is to implement a permalink-like setup, and > encourage people to use permalinks when they link to your > application's content. Thanks Dave! Unfortunately search engines

[google-appengine] Re: Use AppEngine on Vista x64

2008-12-22 Thread Alexander Kojevnikov
I have no problems running the SDK on Vista x64 with Python 2.5.2 x64. To troubleshot the problem, you can insert print/assert statements into the appcfg.py/dev_appserver.py to see which execution path is taken. On Dec 23, 9:36 am, Chen Harel wrote: > I'm not sure it's the python that is making

[google-appengine] Re: use stored string key to get an entity

2008-12-22 Thread Alexander Kojevnikov
In your module definition you should use a property class, that is instead of: class Tag(db.Model): transaction = db.Key(encoded=None) ... you should use: class Tag(db.Model): transaction = db.StringProperty(required=True) ... ...if you want to store the string representati

[google-appengine] Re: Multithreading in Python/AppEngine

2008-12-23 Thread Alexander Kojevnikov
>From http://code.google.com/appengine/docs/python/sandbox.html : An App Engine application cannot spawn a sub-process or thread. A web request to an application must be handled in a single process within a few seconds. Processes that take a very long time to respond are terminated to avoid overl

[google-appengine] Re: Paging vs. crawlers

2008-12-23 Thread Alexander Kojevnikov
> For AppEngine I would recommend to store all comment ids in a text > field. > > When request coming you load it to array and find min/max id's to > show. > > I myself ended up with storing latest comments for an article/post in > a text field of the article entry and as seprate "Comments" entrie

[google-appengine] Re: Hooks for custom serialization/deserialization? (e.g. JSON/deJSON)

2008-12-23 Thread Alexander Kojevnikov
http://is.gd/dgBK On Dec 24, 5:38 pm, boson wrote: > Is there a good way (any way) to hook a db.Model subclass so that it > does some magic right before being written to the Datastore, and some > reverse magic right when it's read back? > > E.g. Say you want to have a big JSON object stored in a

[google-appengine] Re: Money sum formating

2008-12-24 Thread Alexander Kojevnikov
You can also use the standard locale module: >>> import locale >>> locale.setlocale(locale.LC_ALL, '') >>> locale.format('%.2f', 1234.5678, True) '1,234.57' http://www.python.org/doc/2.5.2/lib/module-locale.html --~--~-~--~~~---~--~~ You received this message beca

[google-appengine] Re: AppEngine says my model key is invalid

2008-12-25 Thread Alexander Kojevnikov
You need to use Key.from_path() to construct your keys from model name and key name: keys = [db.Key.from_path('MyModel', row["first_column"]) for row in data] result = MyModel.get(keys) -- www.muspy.com On Dec 26, 8:25 am, gmalquestion wrote: > Hi, > > Here's the scen

[google-appengine] Re: Indexes not deleting

2008-12-25 Thread Alexander Kojevnikov
You need to vacuum your indices manually: appcfg.py vacuum_indexes http://code.google.com/appengine/docs/appcfgpy.html On Dec 26, 6:05 am, dloomer wrote: > I have several indexes on the Google server that are not only no > longer in my local index.yaml, but reference properties that no long

[google-appengine] Re: Money sum formating

2008-12-25 Thread Alexander Kojevnikov
sn't work. > > I'm new to GAE stuff and it seems to me a lot of trouble to format for > currency. > > we should have a filter like {{sum|currency}} where we can change the > currency symbol like it is done in other languages. > > or in short how I use you tip. > > Happ

[google-appengine] Re: Deploying gdata services

2008-12-26 Thread Alexander Kojevnikov
> I have added gdata modules to the engine app directory for the > development. Now, I upload them to the google server. Is it the > supposed way? I think it is too redundant to have the gdata copy > everywhere if google could just link it available to the apps. This has been discussed quite a fe

[google-appengine] Re: Model field value choices - can the list be generated dynamically?

2008-12-27 Thread Alexander Kojevnikov
> thank you very much for your suggestion to use the RefrenceProperty. I > am halfway there now. The Product form now displays a dropdown. > However, I am not really clear on how to specify what will be > displayed in that dropdown. Here is what it is displaying currently > when you open a dropdow

[google-appengine] Re: HELP A GQL exception "AttributeError: 'GqlQuery' object has no attribute 'has_key'"

2008-12-27 Thread Alexander Kojevnikov
Could you post here your code (both the querying part and the model definition)? On Dec 28, 2:59 am, Pikaurd wrote: > Hi guys. I got a error "AttributeError: 'GqlQuery' object has no > attribute 'has_key'" when I executing the GQL and my statement is > "SELECT * FROM Lists ORDER BY date LIMIT 10

[google-appengine] Re: retrieve instance name

2008-12-27 Thread Alexander Kojevnikov
> Can anyone tell me how to retrieve the name of an instance? > > puzzle = models.Puzzle( key_name='my_new_puzzle' ) > puzzle.title = 'My puzzle' > puzzle.put() > > This works fine, i see the ID/Name in the data viewer > > then I try to retrieve the name > > puzzle.id_or_name() > > I get the error

[google-appengine] Re: Good for a background task?

2008-12-27 Thread Alexander Kojevnikov
App Engine cannot spawn threads or start processes. It also has zero built-in support for background processing, though Google is going to implement something in the future. There are a few workarounds, search this group for "background". Cheers, Alex -- www.muspy.com On Dec 28, 2:22 am, agartl

[google-appengine] Re: application wont write to file system. am i reading this right

2008-12-27 Thread Alexander Kojevnikov
You are reading it right, apps are not allowed to write to the file system. To add attachments you don't need to create temporary files, the Mail API accepts in-memory data: http://code.google.com/appengine/docs/mail/attachments.html Cheers, Alex -- www.muspy.com On Dec 28, 9:22 am, "gom...@gma

[google-appengine] Re: HELP A GQL exception "AttributeError: 'GqlQuery' object has no attribute 'has_key'"

2008-12-27 Thread Alexander Kojevnikov
rname(__file__), 'main.html') >      self.response.out.write(template.render(path, lists_query)) > > On Dec 28, 2008, at 7:46 AM, Alexander Kojevnikov wrote: > > > > > Could you post here your code (both the querying part and the model > > definition)? > &

[google-appengine] Re: Importing data into DATASTORE

2008-12-27 Thread Alexander Kojevnikov
> Is it possible to load data into my datastore from a spreadsheet > (google spreadsheet or an excel file) or a text file? > You can use the bulk data uploader: http://code.google.com/appengine/articles/bulkload.html Cheers, Alex -- www.muspy.com --~--~-~--~~~---~--~--

[google-appengine] Re: Model field value choices - can the list be generated dynamically?

2008-12-28 Thread Alexander Kojevnikov
> > your suggestions to override methods worked a treat. Overriding at the > > Model level suits me very well as it gives me flexibility. One final > > question (I hope): what is the difference in overriding the > > __unicode__ and __str__ methods? > > Unless you're actually dealing with Unicode t

[google-appengine] Re: Money sum formating

2008-12-28 Thread Alexander Kojevnikov
'Environment variable DJANGO_SETTINGS_MODULE is > undefined.',) >       errno = None >       filename = None >       message = 'Environment variable DJANGO_SETTINGS_MODULE is > undefined.' >       strerror = None > > Every help is necessary. > > Thanks,

[google-appengine] Re: Money sum formating

2008-12-28 Thread Alexander Kojevnikov
> Forget currency > > How I inset comma in: > > {{ total_in|floatformat:2 }} > > to get : 32,525.75 for example > You can use this filter: @register.filter() def comma(value): locale.setlocale(locale.LC_ALL, '') return locale.format('%.2f', 1234.5678, True) --~--~-~--~~--

[google-appengine] Re: Access entity properties dynamically (like introspection)

2008-12-28 Thread Alexander Kojevnikov
You should not rely on the implementation details, they can change and break your code. The Model class has a properties() method: http://code.google.com/appengine/docs/datastore/modelclass.html#Model_properties To access the values of the properties you can use this code: for prop in obj.prope

[google-appengine] Re: Using other python files with my app; importing

2008-12-28 Thread Alexander Kojevnikov
I suggest you to skim through the part of the tutorial that explains modules and packages: http://www.python.org/doc/2.5.2/tut/node8.html On Dec 29, 9:18 am, MajorProgamming wrote: > This may be more of a general python question, but what's the best way > of using many different .py files and im

[google-appengine] Re: AppEngine GET response headers

2008-12-28 Thread Alexander Kojevnikov
You should use the response object: def get(self): self.response.headers['Content-Type'] = 'text/plain' self.response.out.write('your json') Cheers, Alex -- www.muspy.com On Dec 29, 9:19 am, Chen Harel wrote: > I'm trying to create a data table in an appengine, and send it back to >

[google-appengine] Re: Newbie - Lost my code question

2009-01-01 Thread Alexander Kojevnikov
> I only just started with this last night and wrote a small amount of > code and then lost my hard-disk! > > Is there a way that I can get back the code that I have deployed to > google apps? I can't see anything in the admin console. > See the first question in the App Engine Community FAQ: http

[google-appengine] Re: How to query through multiple models?

2009-01-01 Thread Alexander Kojevnikov
> What query would return all parents with children named 'Joe'? De-normalise! Add a StringListProperty to the Parent, and update it with all children of that parent. You can then query the parents directly. --~--~-~--~~~---~--~~ You received this message because

[google-appengine] Re: How to query through multiple models?

2009-01-01 Thread Alexander Kojevnikov
It will certainly work though it's not as efficient as querying de- normalised parents. You can try this approach first and if it's not fast enough for your app, you can always de-normalise later. On Jan 2, 2:59 pm, "Tiago S." wrote: > I´m facing the exactly same problem. I thought about queryin

[google-appengine] Re: Newbie Help needed - Administration Interface broken?

2009-01-02 Thread Alexander Kojevnikov
Do you use a Google Apps email? Try logging in with this URL: http://appengine.google.com/a// On Jan 2, 2:04 pm, fiXedd wrote: > I created a new app and it isn't showing up. Every time I go to > appengine.google.com it asks me to create a new project... even after > I've created several. Howeve

[google-appengine] Re: Timeouts

2009-01-02 Thread Alexander Kojevnikov
> My application is getting a very high number of data store timeouts. > > Is there an unreported issue going on right now? > The status monitor doesn't show anything unusual: http://code.google.com/status/appengine/detail/datastore/2009/01/02 --~--~-~--~~~---~--~~

[google-appengine] Re: Adding property to a Model

2009-01-02 Thread Alexander Kojevnikov
> I can insert new rows fine, and see them in the Development server > datastore viewer. But when I try to access the new property contains > "NoneType: None". > You can assign a default value to the property, it will be used when an entity has no value for the property: boat = db.StringPropert

[google-appengine] Re: Does SDK datastore data upload with appcfg.py?

2009-01-02 Thread Alexander Kojevnikov
> Pardon what should be an obvious question, but I have been unable to > find a simple declarative answer.  Is the development data in the dev > server datastore uploaded by appcfg.py? > No, to upload the data you will need to use the bulk data uploader or Gaebar: * http://code.google.com/appengi

[google-appengine] Re: 500 Error on deploy

2009-01-03 Thread Alexander Kojevnikov
There's a limit on the number of app updates per day: http://is.gd/ew6Q On Jan 4, 5:48 pm, Bobby wrote: > In the app's dashboard it tells me that i'm exceeding a quota: > "Your application is exceeding a quota: App Config Service Config App > Call Count" > > But on the quota details page it show

[google-appengine] Re: Not able to signup for appengine

2009-01-05 Thread Alexander Kojevnikov
Fill out the SMS issues form: http://appengine.google.com/waitlist/sms_issues On Jan 6, 4:31 am, "manish deora" wrote: > Hi guys, > > I am trying to create a sample application using google app engine.but it > seems i just got stuck at a point, where i am not able to verify my account > since i

[google-appengine] Re: delete application in future?

2009-01-06 Thread Alexander Kojevnikov
Star this issue to follow it up: http://code.google.com/p/googleappengine/issues/detail?id=335 On Jan 7, 11:28 am, SM wrote: > I know there is currently no way to delete an application, but I am > wondering if this will be possible in the future. The reason to do > this would be to free up slots

[google-appengine] Re: Autogenerated indexes being cached?

2009-01-08 Thread Alexander Kojevnikov
Try removing the database access history file, then restarting the development server. The file is called dev_appserver.datastore.history and located in the tmp directory. The development server auto-generates the indices based on the history file, even if you don't run the corresponding queries

[google-appengine] Re: Is the Datastore just too slow for 100+ returned records?

2009-01-08 Thread Alexander Kojevnikov
> Looking at it more deeply every 20th one takes a long time. I assume > that's the data fetch. > I guess you are iterating over a Query or GqlQuery object to get the entities? This explains explain why every 20th iteration. From http://code.google.com/appengine/docs/datastore/queryclass.html :

[google-appengine] Re: Admin interface that let's me enter dummy data

2009-01-08 Thread Alexander Kojevnikov
You can include the 'shell' application from the official appengine samples with your app, and add/edit/delete the entities from Python shell. Source: http://code.google.com/p/google-app-engine-samples/downloads/list Demo: http://shell.appspot.com/ Don't forget to restrict access to shell, e.g.

[google-appengine] Re: Admin interface that let's me enter dummy data

2009-01-09 Thread Alexander Kojevnikov
> Thanks for the response. I just dont see a reason why Google can't > allow dummy data to be entered via the built in admin interface. If it > can create forms when there is data, why cant it create forms without > data? > I guess the main reason is that the datastore is schema-less, the models c

[google-appengine] Re: Google App Engine Platform

2009-01-09 Thread Alexander Kojevnikov
> What if I want to move away from GAE later.. can I host django, > web.py, or webapp frameworks myself? (Does my question make sense?) > Check out this article: http://code.google.com/appengine/articles/pure_django.html --~--~-~--~~~---~--~~ You received this messa

[google-appengine] Re: BadRequestError: offset may not be above 4000

2009-01-11 Thread Alexander Kojevnikov
The offset is applied _after_ the query is executed and the entities are fetched. Re-read the "Executing the Query and Accessing Results" section from http://code.google.com/appengine/docs/datastore/creatinggettinganddeletingdata.html So, using offset to go through all your entities is not a goo

[google-appengine] Re: How can I edit Entity by query use key.id?

2009-01-11 Thread Alexander Kojevnikov
Step 2: entity = Note.get_by_id(id) which is actually a shortcut for: entity = Note.get(db.Key.from_path('Note', id)) or, if you insist on using GQL: entity = Note.gql('WHERE __key__ = :1', db.Key.from_path('Note', id)).get() ...but it's less efficient. Ste

[google-appengine] Re: versions share db?

2009-01-11 Thread Alexander Kojevnikov
The entities in the datastore are shared, the code and static files are not. I don't think splitting the datastore per app version is such a good idea. What if the data is added to v1 of the datastore while you are testing v2? At the same time you are modifying your v2 datastore (otherwise, you w

[google-appengine] Re: How to upload APP through an *proxy server with basic authentication* .

2009-01-12 Thread Alexander Kojevnikov
Try replacing SET HTTP_PROXY = 202:141:80:22:3128 with SET HTTP_PROXY=http://202.141.80.22:3128"; On Jan 12, 10:59 pm, ramu wrote: > No replies yet... > > On Jan 11, 5:45 am, ramu wrote: > > > Dear Google App Engine Developer , > > > I am halfway completing my real app but can't get a wa

[google-appengine] Re: typical scenario

2009-01-12 Thread Alexander Kojevnikov
Try adding an empty __init__.py file into your DB folder. This marks the DB folder as a 'package' and allows you to import modules from it. More info at: http://www.python.org/doc/2.5.2/tut/node8.html On Jan 13, 2:09 am, arnie wrote: > Hi all > I have three folders > BusinessList > Conversion >

[google-appengine] Re: Verification - what format will be accepted

2009-01-12 Thread Alexander Kojevnikov
This format worked for me: +61 4xx xxx xxx It looks like you are including a leading '0' after the country code, try removing it. See also this thread: http://is.gd/fBro On Jan 12, 10:02 pm, bannerdyne wrote: > Hi, > > I am using a supported carrier in Australia. I cannot get my mobile > numbe

[google-appengine] Re: Phone number verification error - Australia

2009-01-12 Thread Alexander Kojevnikov
See http://is.gd/fBsX On Jan 12, 11:58 pm, bannerdyne wrote: > Hi, > > I am using a supported Australian carrier but am getting the following > error when I try to verify. > > There were errors: * Mobile Number or Username > > I am using the following format 61 000 000. I have tried removin

[google-appengine] Re: What is the fastest way to check if an item is in the datastore?

2009-01-12 Thread Alexander Kojevnikov
> Is there a faster/better way? Do I need to do anything with indexes to > make this query better? > You can replace fetch(1) with get(), which is essentially the same. Other than that, if you know your entity's id/key_name, it's slightly faster to fetch it using get_by_id() or get_by_key_name().

[google-appengine] Re: Retrieving latest revision of a document

2009-01-12 Thread Alexander Kojevnikov
The first variant is faster while the second one requires less maintenance if you rename your documents a lot. Both will do the job. I'd use the first, de-normalised model unless you normally have a lot of revisions per document, modify the common document meta-data quite often, and the meta-data

[google-appengine] Re: How to print it?

2009-01-13 Thread Alexander Kojevnikov
> > Hi all > > For a data model class say > > Person with certain fields, > > how can i access the unique numeric ID field associated with each > > entity in query? > > I use > > persons=db.GqlQuery('SELECT __key__ FROM Person') > > for p in persons: > >   self.response.out.write(how to print the

[google-appengine] Re: Looking for help to finish a new model to catch datastore timeouts

2009-01-14 Thread Alexander Kojevnikov
Joseph, You can try this code: def put(self): count = 0 while True: try: return db.Model.put(self) except: count += 1 if count == 3: raise Cheers, Alex -- www.muspy.com On Jan 15, 4:

[google-appengine] Re: GAE + Facebook = DownloadError: ApplicationError: 2

2009-01-14 Thread Alexander Kojevnikov
> What would the try/catch look like to catch this specific error (and > not all errors)? > try: response = urlfetch.fetch(url) except urlfetch.DownloadError: # process the error pass --~--~-~--~~~---~--~~ You received this message because you are subscr

[google-appengine] Re: N x Model.get(key) vs. Model.get([key1, ... keyN])

2009-01-14 Thread Alexander Kojevnikov
> What is the performance difference we should expect (if any) between: > > 1. N x Model.get(key) > i.e. making N calls to Model.get with various keys > > vs. > > 2. Model.get([key1, ... keyN]) > i.e. making a single call to Model.get with an array of N keys > > I'm trying to optimize out some CPU

[google-appengine] Re: Looking for help to finish a new model to catch datastore timeouts

2009-01-14 Thread Alexander Kojevnikov
> Is there any way to catch the timeout error specifically? That way it > doesn't bother to retry if something else is the problem. > Sure, just replace "except" with "except db.Timeout" --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

[google-appengine] Re: WYSIWYG Editor for App Engine

2009-01-15 Thread Alexander Kojevnikov
The thing is, there's no substitute for a solid html/css knowledge. No visual html editor, and there are lots of them floating around, will produce a consistently valid and cross-browser compatible mark-up. Your best bet is to learn the basics, or to hire someone else to do the job. On Jan 15, 6

<    1   2   3   4   >