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
t
Thanks Jose,
i will try that out and see how it goes.
Cheers,
Sum
On Mon, Jun 1, 2015 at 9:44 AM, Jose Aguirre
wrote:
>
> *You need to add the get method this:*
>>
>
> def get(self, request, *args, **kwargs):
>
> """
> Handles GET request and returns HTTP response.
> """
> cont
> *You need to add the get method this:*
>
def get(self, request, *args, **kwargs):
"""
Handles GET request and returns HTTP response.
"""
context = self.get_context_data(**kwargs)
#data: dic, array, etc.
values = [1,2,3,4,5]
# add the data in the context
conte
How are you adding the govstaff variable in the get_contexr_data method?
Can you post what you tried? You shouldn't be getting an error like that.
Are you trying to do it as part of the super() call?
As far as alternatives go, ReportLab is pretty popular with Django, to the
point where it is on th
Hi James,
Yes i have validated that there is data in the govstaff variable. when i
add govstaff to context within the get_context_data() i am getting the
error non-keyword arg after keyword arg. Is there are other ways to
generated pdf reports on Django?
Cheers,
On Thu, Apr 23, 2015 at 12:34 PM,
Have you validated that there is actual data in the govstaff variable
within your template? Nothing is going to show up if it is an empty
variable or doesn't exist in your template context.
While I'm not familiar with the package you're using, I suspect you need to
add the govstaff variable to you
6 matches
Mail list logo