pagination is haulted if response is not a TemplateResponse

I also removed your hideous indentation... 75 lines?