GitXplorerGitXplorer
d

django-tutorial

public
1 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
5d7fc00c5039f25bc10c087c50caa09cd7033fda

Adds slides

ddstanek committed 11 years ago
Unverified
0ab2abeb488fb65a65e4a350c58a3e79d0f038c7

Ex 19: Creating a custom template filter

mmpirnat committed 11 years ago
Unverified
1934ee5513fd170025e5832433a7080319a2e60c

Ex 18: Requiring login

mmpirnat committed 11 years ago
Unverified
52739a54ee3ea9058485ea3c4e9f1d0ce55de7d2

Ex 17: Showing read-only data in a generic UpdateView

mmpirnat committed 11 years ago
Unverified
d2997852303afb6881df5c33f80880fd79ba2ae7

Ex 16: Restricting object access

mmpirnat committed 11 years ago
Unverified
a45fe76c2499a544c9df18df6b690138f456b068

Ex 15: Using a generic UpdateView

mmpirnat committed 11 years ago

README

The README file for this repository.

django-tutorial

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

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 form the previous step:

  $ git reset --hard ex00

You should now be ready for the tutorial!

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.

Credits

This tutorial was created by:

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