`document.content` unused

Issue #2 duplicate
nomeata created an issue

Hi,

the test.py passes the content as part of the document, and then again to template.build. It seems that it is never used as part of the document value, so this is slightly confusing. Maybe you want to change the example code to pass it only to template.build?

Thanks, Joachim

Comments (4)

  1. Michael P. Jung

    When designing the API I wanted to make it a really thin wrapper around reportlab and platypus. Since reportlab has some rough edges I ended up with a rather ugly API which does not have a clean model (Document) and template (BriefTemplate).

    FWIW: BriefTemplate should contain all the constants cluttered directly in "dinbrief.template" and thus making it subclassable and provide a render method which takes the file handle and the Document object as parameters. This will break code already using dinbrief, but would be a lot more logical.

    Example usage:

    template = BriefTemplate()
    template.render(document, fh)
    
  2. Log in to comment