This work log follows on the tasks performed in the previous article, First Licks of Two Scoops of Django. Consider skimming it first to see from where we are picking up.

Lets bring into our ‘icratings’ project the ‘polls’ app created as part of the Django 4-part tutorial.

The onboarding procedure:

  1. add line to icratings/ and icratings/settings/
  2. disintegrate into tests/[forms,models,views].py
  3. put templates in project root’s templates/
  4. create database fields for model

Add new route to

Copy paste polls/ app to icratings/.

Add a line above the admin url section in icratings/

    url(r'^polls/', include('polls.urls')),

Open icratings/settings/ and add a line in LOCAL_APPS1:

# Apps specific for this project go here.

Disintegrate into tests/ folder

In polls/, delete Create folder tests/, containing new test files:


Move views to templates

Move the polls’ views from wherever they are to $SITE_URL/icratings/templates.

Create db tables

In shell, run:

$ python syncdb

You’ll see mentions of creating tables for ‘polls’ (and maybe ‘popsicles’).

Start the server:

$ python runserver

Point browser to

  1. If you’re following along from my previous work log, then be sure you also have the ‘popsicles’ line. []