Adding a field to the profile: Difference between revisions

From OpenHatch wiki
Content added Content deleted
No edit summary
Line 9: Line 9:
== Skills you need ==
== Skills you need ==


In order to do this tutorial, you need to be comfortable at a terminal and willing to learn some programming.
In order to do this tutorial, you need to be willing to use a terminal and willing to learn some programming. The instructions are written for GNU/Linux systems, but Mac OS users will probably find the instructions work okay. (Windows users, I'm not sure.)


== Getting help ==
== Getting help ==

Revision as of 00:15, 18 November 2010

This is a page about improving or modifying OpenHatch.

We call that "Hacking OpenHatch," and there is a whole category of pages about that.


Introduction and prerequisites

In this walkthrough, we will explore the process of adding a new feature to the OpenHatch website. The change we will make will be done directly in the OpenHatch Django code. In so doing, we'll learn how to go from an idea for a top-level UI feature change, to searching and studying the code, to making and testing this change.

The goal of this exercise is to expose you to the techniques used by OpenHatch developers when changing the website, give you confidence in order to try similar things on your own, and expose you to some helpful techniques that you might not know about.

Skills you need

In order to do this tutorial, you need to be willing to use a terminal and willing to learn some programming. The instructions are written for GNU/Linux systems, but Mac OS users will probably find the instructions work okay. (Windows users, I'm not sure.)

Getting help

If you try this and you get stuck, come come chat with us on IRC. Explain what you're doing, and what's not working, and we'll try to get you un-stuck. The same goes for if you can do the exercises but don't understand what they mean.

Getting the source

All the sample code in this walkthrough refers to version f69d180 of the OpenHatch source. To make sure the code is in line with what you expect, follow the instructions on the getting started with the OpenHatch code page. But right after you do the "git clone", do these commands:

$ git checkout f69d180 # Switch to that revision
$ git branch tutorial # Create a branch called tutorial that points at that revision
$ git checkout tutorial # Switch into that branch.

Here's how you can check that it worked:

$ git log -1
commit f69d1801bad777b8bd495d166433879c21500069
Author: Asheesh Laroia <asheesh@openhatch.org>
Date:   Wed Nov 17 17:26:44 2010 -0500

    profile/models.py: Remove unused field.
$ git branch
master
* tutorial
$

So far, so good? Let's dive in. (If not, chat with us on IRC!)