On Thu, Nov 17, 2011 at 7:03 AM, kracekumar ramaraju
<kracethekingma...@gmail.com> wrote:
[...]
> One advice is use css to set colors.In your template check for color value
> ="red" and then render css for that colour, else if you are using only 2
> colour you can  even and odd property.
[...]

Reportlab generates PDF, which is presumably served to the user from
a Django view. I do not think that CSS can be used here.

Asif, have you looked at the reportlab documentation? You should be
able to use BACKGROUND, and TEXTCOLOR to set the colours,
choosing the appropriate colour from a model field. Please see
chapter 7 of the Reportlab user guide:
http://www.reportlab.com/docs/reportlab-userguide.pdf

This blog might also help:
http://www.blog.pythonlibrary.org/2010/09/21/reportlab-tables-creating-tables-in-pdfs-with-python/
It is the first result from searching Google for +reportlab +tables.

Regards,
Gora
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to