Boston Python Workshop/Friday handout/OS X 10.6 or 10.5

Install git
It's an insult in British English, but git is also an awesome version control tool. Here's how you install it:

Go to this page on google code and download the latest file ending in "-x86_64-leopard.dmg" (1.7.2.3 as of this writing). If you're at a workshop and you need this file, please ask a volunteer - we might have it on a thumb drive, and that'd save you a bunch of time downloading. Once it's downloaded, double click to open. You'll see something like this: Double-click the .pkg file to install. Once that's done, close all your open Terminal windows, and open a new one. Cut and paste the following into the new Terminal window: git --version It should respond with something like "git version 1.7.2.3".

Tell git who you are

 * Open up a new Terminal window.
 * (Must be same email you use to sign up for Heroku [see below]. Also must be accessible from the workshop.)
 * (Must be same email you use to sign up for Heroku [see below]. Also must be accessible from the workshop.)

If this doesn't produce an error, congratulations! You have a successful install of git and you can move on to the next section.

Django

 * Open a Terminal and type:

cd /tmp/ curl -L http://www.djangoproject.com/download/1.2.5/tarball/  -o Django-1.2.5.tar.gz tar zxvf Django-1.2.5.tar.gz cd Django-1.2.5 sudo python setup.py install

Make sure Django is working

 * Open a Python prompt, and type this in:

import django

If you get an error, get help! Otherwise, you're done.

Create an SSH public key
You'll need one of these to push your work to Github.
 * Open up a new Terminal window.
 * (email should match git config setting)
 * Hit enter to accept default location for ssh key.
 * Hit enter to accept blank passphrase (if computer is shared with other people, as in a work laptop, you should create a passphrase). Hit enter again to accept blank passphrase (or enter passphrase again).
 * Output of ssh-keygen command
 * Your brand-new public key is now stored at.

Put your SSH key on Github
Follow Github's instructions:


 * Go to http://help.github.com/key-setup-redirect
 * Look for the Adding the key to your GitHub account section
 * Follow just that section.

Install the KomodoEdit text editor
We'll be using the KomodoEdit text editor during the workshop, though you are free to use a different editor if you prefer. It must be a plain-text editor, such as vi or Textmate. Microsoft Word and other word processing programs won't work. If in doubt, use KomodoEdit.

Installation steps:
 * Download the KomodoEdit installer. If you're at a workshop and you need this file, ask a volunteer. We may have it on a thumb drive, which will save you a lot of download time.
 * Double-click the file once it's downloaded.
 * It will open an installer with a KomodoEdit icon and a picture of your Applications folder. Something like this:
 * Drag KomodoEdit into your Applications folder.
 * Unmount the installer disk image by dragging it from your desktop to the trash.

Verify you can create a new Django app
cd ~/Desktop/django_projects django-admin.py startproject myproject cd myproject python manage.py runserver
 * Create a folder on the desktop called
 * Open a new Terminal window and type the following:
 * Both commands should provide no output.
 * Once that's finished, type the following in the Terminal window:
 * The first command should produce no output. The second command will put out a bunch of output, then just sit there until you cancel it (2 steps from now).
 * In your browser, go to http://localhost:8000/
 * Back in the Terminal window where you ran, type control-c to kill the server.

Install SQLite Firefox add-on
SQLite Explorer is a piece of software that lets you browse SQLite databases. It's written as a Firefox add-on.

Even if you already have a browser like Chrome, you'll need the latest version of the Firefox web browser. (You may need to upgrade even if you already have Firefox installed.)

If you already have Firefox
Open it, and then go to the Firefox menu (top left of the screen). Select "About Mozilla Firefox."



You'll get a window, like the one below, that shows you what version of Firefox you have. Write down that number!



Now go to the Firefox homepage and see what the current version of Firefox is. If it's the same major version (such as 3.6 - you can ignore the third part of the number) then you're good. You don't need to upgrade.

If it's a different major version, then you need to upgrade. Download it from the Firefox homepage and double-click to install. '''If you're at a workshop and you need this file, please ask a volunteer. We may have it on a thumb drive and it'll save you a bunch of download time.'''

If you don't have Firefox yet
Go to the Firefox homepage and click the big download button. '''If you're at a workshop, please ask a volunteer to see if we have it on a thumb drive. It'll save you a bunch of download time.''' Once you have the file, double click and follow the instructions to install.

Install the SQLite Manager Firefox Plugin
Open Firefox, and then go to the Tools menu and select "Add-ons." Click the "Get Add-ons" button at the top. Enter "SQLite" where it says "Search all Add-ons." The first thing that comes up should be SQLite Manager. Click "Add to Firefox" and then follow the instructions to install it.

If you have trouble installing, double-check that your Firefox version is at least 3.6.

Make sure Git and Github are working together

 * First, load https://github.com/ in a new tab.


 * Then, open up http://help.github.com/create-a-repo/ and follow the instructions to create a repository.

This is just to make sure it's working, so you can call it whatever you want.

If it worked, you'll see a new repository listed in your Github.com account, and it will have a README file explaining what it is.