google-app-engine

Python: __debug__

I'd like a global variable to determine if I'm in debug mode or not. Is that what __debug__ is for? How do I set/read it on Google App Engine? If I use logging.debug(), will that automatically be turned off if I don't run the app with debug=True? application = webapp.WSGIApplication(# ... debug=T...

Google App Engine: Logging in dev console?

Does logging work on the dev server? This code doesn't raise an exception, but I can't see where to view the logs in the devserver console. Perhaps I'm looking in the wrong place? logging.error("error has occurred") ...

Google App Engine: Preferred/idiomatic way to "refresh" a model from the datastore?

I have observed the following: (Odp is a model) o = Odp.get(odpKey) o.foo = 0 foo() assert o.foo == 1 # fails def foo(): o = Odp.get(odpKey) o.foo += 1 o.put() It looks like the first copy of o isn't refreshed when it's underlying datastore representation is updated. So, what is the preferred way to refresh it? I was thi...

Google app engine bulkloader problem when using yaml autogenerated configuration and enities with numeric ID

QUESTION Please be kind I'm new to pytnon and appengine platform. Application uses django-norel, and I dont have access to model (and really I'm not that python proficient to backtrace how models are saved). I have my bulkloader.yaml file autogenerated by appcfg.py create_bulkloader_config. Problem is entities numeric ID's are be...

Google App Engine: Devserver is hideously slow

My devserver has become hideously slow for some reason. (Python, Windows 7, GAE 1.3.3) I'm not sure if I'm doing something wrong, or if it's just not meant to handle the load I'm putting on it. I have 1000 models of a certain type in the datastore. I am trying to delete them with this method: def _deleteType(type): results = type.al...

Counting Unique Users using Mapreduce for Java Appengine

I'm trying to count the number of unique users per day on my java appengine app. I have decided to use the mapreduce framework (mapreduce.appspot.com) for java appengine to do this calculation offline. I've managed to create a map reduce job that goes through all of my entities which represent a single users session event. I can use a si...

Python Google App Engine: Call specific method from yaml file?

I am new to database programming with Google App Engine and am programming in Python. I was wondering if I am allowed to have one Python file with several request handler classes, each of which has get and post methods. I know that the yaml file allows me to specify which scripts are run with specific urls, like the example below: hand...

401 and 403 Errors with google base API

I built a wiki using Google App engine and the Data APIs. The wiki pages are stored as Google Base 'Reference Articles.' I want users to be able to view, edit, and delete the items, so when a request is made to the server, client login uses my username and password, and retrieves or edits the data on the user's behalf. The login code:...

How do I make a tipfy app accept own-auth, OpenID, and more?

Tipfy's user-authentication tutorial advertises its unified system that accepts all of Google, own-auth, OpenID, OAuth, and Facebook authentication; but the examples so far show exclusively Google auth and exclusively own-auth. How do I make the other authentication options available? ...

Is it possible to create references in Google App Engine?

Let's say I have a datastore that contains mother, father, and child objects. Inside the Mother and Father objects I have a field called child which stores a reference to their child. Is it possible to reference this child from both mother and father without creating duplicate child instances for each (in the style of OOP). Is this how d...

How do I build a flexible counter with 1000+ rows but few reads in Google App Engine?

I have a list of users that only administrators can see (= few reads). This list also displays a count of the number of users in the datastore. Because the list could grow larger than 1000 my first thought was to avoid a normal count() and instead use a sharded counter. However, the problem is that the admins also have access to various...

bigtable springroo

i looked through the expense example, but it doesn't show how to use google'KEY' as primary key. Any example of open source project that using springroo to generate complex bigtable schemas? would be good reference for newcomer, on de-normalized table structure..etc . ...

Automating Google App Engine Uploads.

I'm trying to automate the upload of a google app engine (java) project, there's not problem using the ant macros to upload to a single user+password combination as after the first manual login through appcfg but when I want to switch to another account I need to re-input the password through the stdin in appcfg. I don't seem to be able...

Eclipse 3.5 Cache Problem

Hi, I am using eclipse 3.5 with google app engine + spring framework to develop application. My problem is when I change the code and build the project, the new code doesn't come in to effect. I even deleted the old file but at runtime, the old version gets display in the browser. Why? ...

Can Polymodel classes be used with Basemodel in the Google App Engine Django Helper?

The Django Helper for Google App Engine creates BaseModel to allow a model to exist both in Django and App Engine. Does the helper provide a way to use Polymodels with Django? ...

using Blobstore Python API with ajax

there is any sample showing how to use the blobstore api with ajax? when i use forms works fine, but if i use jquery i don't know how to send the file and i get this error: blob_info = upload_files[0] IndexError: list index out of range I have this code in javascript function TestAjax() { var nombre="Some random name"; aja...

How can I use google app engine?

I've begun planning a kind of web store interface that I want to work on soon. I'm starting to import products from China and want to have a completely unique feel for my site. Now I'm kinda a google fanboy and have heard alot about google app engine. Mostly I like the hosting available with google more then anything though. But I wanted...

simple fetch is really slow

I am fetching all the instances for a given linkname but I want to call all their values(rating2) to perform a calculation, I debugged and all my time is in the query and fetch lines, I only have a table with 100 items and it is taking 2 seconds!!!!! How can it be this slow to fetch a few items out of a 100 item table and how can I spee...

Querying google datastore by key and sorting by another property

I am using the low level datastore interface in java. I have an entity that stores a collection of Keys. I would like to query the datastore to get all of the entities in the collection. However, I'd also like to sort them on a created date property. So, I'd like to do something like this: Query query = new Query(EndeavorUpdate.ENDEAVOR...

Google App Engine DataStore Text UTF-8 Encoding Problem

I'm building a gwt app that stores the text of random webpages in a datastore text field. Often the text is formatted UTF-8. All the files of my app are stored as UTF-8 and when I run the application on my local machine the entire process works fine. UTF-8 text is stored as such and retrievable ftom the local version of the app engine ...