torchbox/django-nginx-memcache — pull request #2 by krak3n (2012-02-05 14:39:11+00:00)
Title: Fix for class based view decoration

Hi Steve.

This ended up being fairly simple in the end. The issue was not with decoration itself but with the actual cache function. With Class based views the response object that gets passed back is a TemplateResponse object, the render() method is not automatically called resulting in this error: The response content must be rendered before it can be accessed.

All i've done is add a check into see if the the object is a TemplateResponse object and if so call the render function. This seems to have resolved the issue.

All tests passed.

Hope this is cool,

Thanks,

Chris

(p.s, also added .egg / .egg-info lines into the git ignore file).