class HelloPDFView(PDFTemplateView):
    query_results = Contact.objects.all()
    print "DEBUG : ", query_results
    template_name = 'hello.html'

    def get(self,request, *args, **kwargs):
        context = self.get_context_data(**kwargs)
        print "DEBUG : ", self.query_results
        template_name = 'hello.html'
        context["query_results"] = self.query_results

        return self.render_to_response(context)


Try this one it working successfully

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e0463734-0735-476e-83ce-90c1e28a2444%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to