Extend base template to make generating pages easy

See [Template inheritance][1] in Django documentation.

[1]: https://docs.djangoproject.com/en/1.4/topics/templates/#id1
Use context dictionary to add titles to pages

See template variables and template context in [The Django template
language: For Python programmers][1].

[1]: https://docs.djangoproject.com/en/1.4/ref/templates/api/
Convert functional views to class-based views

See documentation on [class-based generic views][1] and reference for
[TemplateView][2] specifically.

[1]: https://docs.djangoproject.com/en/1.4/topics/class-based-views/
[2]: https://docs.djangoproject.com/en/1.4/ref/class-based-views/#templateview
Add Restaurant model
Use sqlite3 for database

Now we will want to:

- Run syncdb and optionally create a superuser
- Use shell to inspect Restaurant model and create a Restaurant
Add sensible __unicode__ method to Restaurant

See [__unicode__][1] in Django model instance methods documentation.

[1]: https://docs.djangoproject.com/en/1.4/ref/models/instances/#unicode
Enable admin and register Restaurant model

See [documentation on admin site][1].

[1]: https://docs.djangoproject.com/en/1.4/ref/contrib/admin/
Allow all fields to be blank except `name`

See documentation for [`Field.blank` option][1].

[1]: https://docs.djangoproject.com/en/1.4/ref/models/fields/#django.db.models.Field.blank
Use USStateField so state uses dropdown in admin

USStateField uses a dropdown form field for states instead of the
default text input field.  See documentation for us.models.USStateField
and us.models.USStateField in [localflavor documentation][1].

[1]: https://docs.djangoproject.com/en/1.4/ref/contrib/localflavor/
Add page to display list of restaurants

See documentation on [making queries][1]

[1]: https://docs.djangoproject.com/en/1.4/topics/db/queries/
Add template for loop on restaurant list page

See documentation for Django's built-in [for template tag][1].

[1]: https://docs.djangoproject.com/en/1.4/ref/templates/builtins/#for
Show restaurant addresses using if statements

See documentation for Django's built-in [if template tag][1].

[1]: https://docs.djangoproject.com/en/1.4/ref/templates/builtins/#if
Abstract template logic into address model method

Business logic doesn't belong in templates.  This method is easier to
read and more easily reusable (see [Don't Repeat Yourself][1]).

See documentation on built-in [linebreaksbr][2] template filter.  For
information on why the address method is called when used as a template
variable see [rendering a context][3] in the template documentation.

[1]: http://c2.com/cgi/wiki?DontRepeatYourself
[2]: https://docs.djangoproject.com/en/1.4/ref/templates/builtins/#std:templatefilter-linebreaksbr
[3]: https://docs.djangoproject.com/en/1.4/ref/templates/api/#rendering-a-context

Demonstrates:
* First filter (linebreaksbr)
* Principle of keeping tricky logic out of templates
Add page to view details for a single restaurant

RestaurantDetailView.get is called when an [HTTP GET][1] request is
processed by the RestaurantDetailView class view.

To understand the call to Restaurant.objects.get see the documentation
for [get() queryset method][2].  See [named capture groups][3] in the
URL dispatcher documentation to understand the url module change.

[1]: http://www.cs.tut.fi/~jkorpela/forms/methods.html
[2]: https://docs.djangoproject.com/en/1.4/ref/models/querysets/#get
[3]: https://docs.djangoproject.com/en/1.4/topics/http/urls/#named-groups
Use get_object_or_404 shortcut function

See documentation for [get_object_or_404][1] Django shortcut function.

[1]: https://docs.djangoproject.com/en/1.4/topics/http/shortcuts/#django.shortcuts.get_object_or_404
Use DetailView to generate restaurant detail page

See [DetailView][1] documentation.

[1]: https://docs.djangoproject.com/en/1.4/ref/class-based-views/#django.views.generic.detail.DetailView
Use ListView for generating restaurant list page

See [ListView][1] documentation.

[1]: https://docs.djangoproject.com/en/1.4/ref/class-based-views/#django.views.generic.list.ListView
Add hard coded links to restaurant pages
Use URL template tag for restaurant links

See documentation on Django's built-in [url template tag][1].

[1]: https://docs.djangoproject.com/en/1.4/ref/templates/builtins/#std:templatetag-url
Use url tag for base nav and add Restaurants link