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

In Section: Displaying the comment form #155

Open Xotor opened 9 years ago

Xotor commented 9 years ago

In the section Displaying the comment form there is an error in the example code:

def get_form_kwargs(self): kwargs = super().get_form_kwargs() kwargs['entry'] = self.entry return kwargs

self.entry is not available in there and should be self.get_object() like in get_context_data