[Plone Scandinavia] A couple of questions
erik at cederstrand.dk
Thu May 10 23:29:36 UTC 2007
Malthe Borch wrote:
>> I've used ArgoUML /ArchGenXML to create two custom content types:
>> "payment" and "reminder" to be placed in membership folders. This
>> would allow memers to see their payments, and it would link a
>> payment to a member.
> You might want to consider if having paid is "content" or if it's
> actually metadata. That said, the remember-product [...]
I need to store multiple paments for one member, and each payment has
some metadata attached - netbank id, registration date, amount paid etc.
It's more than just a has_payed boolean, so I think a payment should be
an object in itself.
> Note that you probably don't want to create a reminder-object. Why
> would you? You can send out a reminder without creating an object and
> you don't have to remember that you did since the rule is that you
> always send out reminders (you state it should be automatic).
I want to store the fact that a reminder has been sent, so the member
desn't get multiple reminders, and so members with unanswered reminders
can be deleted at some point. I'd like the payment system to be somewhat
independent on the member objects, so it can more easily be changed.
>> Is it possible to generate an RTF or PDF file using Plone?
> If you're on linux then there should be plenty of tools that can
> convert HTML-documents into PDF. That's probably the easiest. You
> could create a Zope 3 view, connect it to a template and in the
> __call__-method, put something like:
> def __call__(self): mime_type = 'application/pdf' my_template_result
> = self.index() pdf_data = my_html2pdf_function(my_template) return
> or you could skip some steps and just attach the generated pdf to the
> e-mail using some Python-library.
Thanks for the ideas. Googling around I found CMFReportTool and the
ReportLab PDF library which look promising.
More information about the Plone-Scandinavia