Show full Blog

  • Steps to run Google AppEngine with Django in Windows

    Update: this post was written when the Google app engine didn’t have native django template support. Now it’s much easier. See the vogella.de app engine tutorial for current info.

    This post outlines the steps necessary to setup google’s app engine and the following contributing software to start developing applications on windows. First you need the Google App Engine to see what versions of other software will be necessary:

    Google App Engine:

    http://code.google.com/appengine/

    Currently, Google App Engine requires Python:

    http://python.org
    Current best version required by App Engine is 2.5.4 (not the latest!) found here:
    http://python.org/download/releases/

    To also use Django it is best to use the Google App Engine Helper for Django:

    http://code.google.com/p/google-app-engine-django/
    Current best version (latest) is r90 found here:
    http://code.google.com/p/google-app-engine-django/downloads/list

    Then you’ll need Django:

    http://www.djangoproject.com
    Current best version required by Google App Engine Helper for Django is v1.0.3 (not the latest!) found here:
    http://www.djangoproject.com/download/

    For development I tried PythonWin, IDLE, Komodo, Wing, Eric, and Pydev. Pydev is the best in my opinion. If you don’t really like eclipse, then Wing would be my second choice.

    To use PyDev plugin for eclipse, follow the installation instructions at:

    http://pydev.org/manual_101_root.html

    Main points of the pydev instructions are:

    Download and unzip eclipse 3.5, classic is good enough or get the Java Developers version to start:
    http://www.eclipse.org/downloads/
    Use the “Install new software” option under the help menu of eclipse.
    Click the Add button and enter the following in the location textbox and click ok to get Pydev:
    http://pydev.org/updates

    Once Pydev is setup, create a new project of type: Pydev Google App Engine Project.
    Add the files from Google App Engine Helper for Django
    Modify to suit using the following as a guideline:

    http://code.google.com/appengine/articles/appengine_helper_for_django.html

    Main point is to create a django.zip file in the root of your project.
    Create a run configuration for PyDev Google App Run

    Copy the path to the google dev_appserver.py file as the Main Module, my machine looks like this:
    c:\Program Files (x86)\Google\google_appengine\dev_appserver.py
    Under the arguments tab in the Run Configurations dialog, set to:
    ${workspace_loc:AppName/src}
    Replace AppName with your eclipse application name and src is the path to your main.py module.

    You should now be able to run and debug your application from here.

    leave a comment