Skip to content

Tutorial presented by Mike Pirnat and David Stanek at CodeMash 2014 about web development with Python and Django

Notifications You must be signed in to change notification settings

mpirnat/django-tutorial

Repository files navigation

django-tutorial

This repository contains the code for the "Web Development with Python and Django" tutorial session run by Mike Pirnat and David Stanek at CodeMash 2013 and 2014.

This is NOT the CodeMash 2015 version.

In this tutorial we'll build a full-featured website step by step using the Django web framework.

Getting Started

If you're attending the tutorial in person, please make sure you install these prerequisites before the class begins so that we can make the most of our time together in the session. You and your fellow attendees will thank you for your preparedness!

You'll need to install:

  1. Python

Django is written in the Python programming language; you'll need to install Python in order to make anything work.

You should install either Python 2.7 or Python 3.3.

  1. Git

You will need the Git version control system in order to work with the exercises in this repository. If you're new to Git, don't panic--we won't be doing anything too weird, and we'll walk through all of it in the session.

  1. Pip

Pip is a tool for installing Python packages. You will need it to install the Python dependencies for this tutorial.

  1. Virtualenv

Virutalenv is a tool for creating isolated Python environments on your system. This allows you to work on multiple projects that might have conflicts in the versions of libraries they depend on. It also keeps your base system installation of Python nice and clean.

Setting Your Path (Windows)

If you're on Windows, we recommend following these instructions to get Python, Pip, and Virtualenv going.

Be sure to update your PATH! This varies a bit between different versions of Windows so use the method that's right for your OS.

If you installed Python 2.7, add:

C:\Python27\;C:\Python27\Scripts\

If you installed Python 3.3, add:

C:\Python33\;C:\Python33\Scripts\

Setting up the Project

Once you have installed these basics, let's get the working environment set up for the project. Time to open up a command line! (Terminal in Mac OS X, good ol' "cmd" in Windows.)

  1. Create a new virtual environment ("virtualenv") and activate it

On Linux or Mac OS X:

  $ virtualenv django-precompiler
  $ cd django-precompiler
  $ source bin/activate

On Windows:

  > virtualenv django-precompiler
  > cd django-precompiler
  > Scripts/activate.bat
  1. Clone this repository

In the django-precompiler directory from the previous step:

  $ git clone https://github.com/mpirnat/django-tutorial.git ./src
  1. Install Django and any other Python dependencies

In the django-precompiler directory from the previous step:

  $ cd src
  $ pip install -r requirements.txt
  1. Check to make sure everything's in good shape

In the src directory from the previous step:

  $ python prerequisites.py

On Windows, that looks like:

  > python.exe prerequisites.py
  1. Rewind the repository to the start of our exercises

In the src directory from the previous step:

  $ git reset --hard ex00

You should now be ready for the tutorial!

Slides

The current slides that accompany this tutorial are available for viewing and downloading.

Help!

If you need help getting set up, please contact Mike Pirnat (mpirnat@gmail.com) and David Stanek (dstanek@dstanek.com). Please make sure to copy both of us so that we can make sure you get the best answer as soon as possible.

Other Versions

Looking for a different version?

Credits

This tutorial was created by:

With gratitude to the Python and Django communities for their accomplishments.

About

Tutorial presented by Mike Pirnat and David Stanek at CodeMash 2014 about web development with Python and Django

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages