I have been learning how to write Django code for Google App Engine. (Django is a Python framework, which Google chose to incorporate into Google App Engine. Django is cool.)
Google has a few Django customizations, which they package in “google-app-engine-django“. For example, the base class that your Django models use is supposed to change to BaseModel, a django helper front-end to “db.Model”, a Google Bigtable database model.
Today I wanted to implement search for one of my Django models. Google has an article about setting up search using SearchableQuery, and some discussion posts about how to use ext.search and search.searchableModel, but nothing about how to use search.searchableModel with BaseModel.
The solution (which I probably shouldn’t be happy with):
This allows you to say YourModel.all().search( ‘x’ ). w00t.
I’m trying to figure out how to make Django 0.96 work with Google App Engine. Here are the resources I’ve found so far:
I’ve found a few issues so far, that weren’t explicitly mentioned in these notes…
I’m sure there’s a bunch more to learn, but I’ve finally gotten the Django tutorial example to work.