sandiegopython / test-driven-django-development

This repository contains materials for a San Diego Python workshop on learning Django with test inspired development
http://test-driven-django-development.readthedocs.org/
Other
102 stars 35 forks source link

Step 3 (Views and Templates) inconsistent code snippets #96

Closed macro1 closed 10 years ago

macro1 commented 10 years ago

We have conflicting view declarations in the code snippets.

from django.http import HttpResponse

def entry_detail(request, pk):
    return HttpResponse('empty')

And then later:

from django.views.generic import DetailView
from .models import Entry

class EntryDetail(DetailView):
    model = Entry
entry_detail = EntryDetail.as_view()