hursday, November 18, 2010 4:14 AM
To: django-users@googlegroups.com
Subject: Re: ReportLab and Django - templates? ; FK object has no
attribute split
Hi Victor,
It really depends on complexity of your PDF. I needed to do
something similar some time ago and used ReportLab addon called "pisa
There is also template2pdf which is basically and RML subset
interpreter, you write your RML from a django template and pass it to
a function from template2pdf which will generate a PDF from it.
http://code.google.com/p/template2pdf/
That is what we are using, I have even contributed a few patche
On Thu, Nov 18, 2010 at 6:08 PM, Victor Hooi wrote:
> But yeah, I'd still love if there was a separate template I could use
> to generate the PDF. It just feels very weird building up the PDF line
> by line in views.py.
the obvious answer is "write your own"; but it doesn't have to be a
full-fle
Hi:
natebeacham: Yup, using item.category.name works fine =).
Using string interpolation on item.category also works - I was silly,
forgot to restart the gunicorn process (I suppose you have to restart
it after any changes to views.py, right? Or does it pick it up
automatically after a while?).
Hi Victor,
It really depends on complexity of your PDF. I needed to do
something similar some time ago and used ReportLab addon called "pisa"
and used standard Django template language to define the PDF contents.
You might want to take a look, it worked well enough for simple PDF pages.
Ch
Try using:
text = item.category.name
and
text = '%s' % item.subject.name
Rather than sending the entire FK field to ReportLab.
I don't necessarily see a problem with this logic in your view, as
you're just generating a file response. If it doesn't feel right, you
can throw this logic into a ut
Hi,
I'm trying to use ReportLab to produce a PDF output for one of my
views.
My first question is - at the moment, I'm building up the PDF inside
my view. Is this really the recommended way of doing it? It's like
I've got presentation code inside my view (controller). Isn't there a
cleaner way of
7 matches
Mail list logo