Setting up the web app

From OpenHatch wiki


After going through this setup document, you will have a Python, git, and Django environment that lets you write Python code locally. You will be able to use and git to track changes to the code you write.

This document is available on the web; if you have a printed copy, you can see the URL on the last page. You can always refer back to it, or show it to other people.

Section 1: Accounts on the web

Time: 15 minutes, hopefully.

You're going to need accounts on:

  • This is a French web hosting company. Their free account level has Django support, so you'll use it to run your code and let other people access it over the web.
  • This is the most popular hosting company for git, a popular version control system. You will use them to store versions of your code.

Alwaysdata account lets you create a free hosting account. You'll give them your name and email address and set a password that you'll use to log into the account.

Note! alwaysdata won't work with Internet Explorer 6. If you use IE6, let a staff member know.

  • Go to
  • Click Sign up now
  • Choose the "Pack gratuit (10 Mo)". It means "Free account (10 megabytes of storage)".
  • Choose the monthly payment plan.

On the back of this piece of paper, take a moment to write down the username, email address, and maybe password that you used to sign up for the account. is the most popular git-based service you can use to store files.

Go to and create an account. You can choose whatever username you want. For now, just create an account, and then you can continue on through these setup instructions.


You might be itching to make sure you created these accounts properly. We'll test that later.

Section 2: Installing software

Now we're going to install Django, Python, git, and a text editor.

Click the link that matches your operating system.

Section 3: Configuring your accounts on the web

Alwaysdata: Enable SSH

  • Log into your Alwaysdata account at
  • In the left-hand side, underneath Remote access, click SSH
  • Click the gear icon for your user
  • Click the "Enabled" checkbox to enable ssh access. [hint: you can use a different passphrase than the SSH-key on localhost]
  • Click Submit!

Put your SSH key on Github

Follow Github's instructions:

To find your public key on Windows, type this from a GitBash:

notepad .ssh/

If you need help finding your SSH key, ask a volunteer. You're looking for a file called

Make sure Git and Github are working together

Follow the instructions carefully; for example, do call your repository Hello World as they suggest.

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

Section 4: Deploying your first web application

Remember how you made a Django site earlier in the directions? The volunteers made a site like, too, and we added some special configuration to make it work well with

You're going to fork this git repository so that when make your own changes to it, you can push those changes to your personal Github account. (You have to fork the repository because otherwise Github won't let you make changes to "my" project!)

Fork our project on Github

Clone it to

  • Copy the "Git Read-Only" version of the repository URL to the clipboard (this is probably not the default, so be sure to click the "Git Read-Only" tab)
  • In your SSH client (PuTTY or ssh), connect to this host:
  • Enter this command into the terminal, but don't press enter yet:
git clone

Configure to serve your site

This is the last step: Tell how to serve up your site to the world.

  • Go to the Domains administration page:
  • Find your domain, and click the gear to edit.
  • Enter /workshop_mysite/public/ into the form as the Root directory:

Make sure is set up properly to serve your site

  • On the domain configuration page, grab the 'name' which is your personal web address.
  • Enter that into your browser's address bar (type or copy/paste). You should see the Django welcome page message congratulating you.

Almost Done!

Go to Web App Section of Friday's installation page and finish up!