Project Setup

by byamabe on September 11, 2009

app-engine-patch

Let’s get down to some programming. First, I downloaded app-engine-patch 1.1RC. This gives me Django 1.1 with Google’s model classes instead of Django’s own Model. For those who don’t know, Google App Engine (GAE) uses BigTable instead of a relational database like SQL Server or MySQL. With BigTable you trade the data integrity of a relational database for performance and scalability. Because I’m using app-engine-switch, I’ve assumed that django-admin.py wouldn’t be of any use so my development cycle has been all manual. If anyone has used django-admin.py with app-engine-patch, please let me know. It certainly would be more convenient.

Changes

After downloading and unzipping the file, you are left with a directory name ‘app-engine-patch-sample’ which will be the basis for my application. I renamed it ‘law-and-gospel’. Then I deleted the ‘blueprintcss’ directory and renamed ‘myapp’ to ‘lawandgospel’. In app.yaml I changed the application attribute from ‘aep-sample’ to ‘law-and-gospel’. In settings.py I changed the DEFAULT_FROM_EMAIL attribute to use my email address. And in urls.py, I added (r’^lawandgospel/’, include(‘lawandgospel.urls’)) as the first of the urlpatterns after ”.

pyfacebook

Next, since I know I’m going to use pyfacebook so after I downloaded and unzipped the files. Then I copied the ‘facebook’ directory into the root of ‘law-and-gospel’.

changes

in settings.py I added ‘facebook.djangofb.FacebookMiddleware’ to the MIDDLEWARE_CLASSES attribute and added the FACEBOOK_API_KEY and FACEBOOK_SECRET_KEY attributes with the appropriate values from the Facebook application I registered.

LaG Changes

I started removing the models, forms, and view that came with the default app-engine-patch application and replaced them with some of the models, forms, and views that I will need for LaG. At this point, documenting every change would be excessive so from now on I will be documenting the more interesting aspects of the development.

Previous post:

Next post: