[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Open Office templates
From: |
Jerzy Luszawski |
Subject: |
Re: [Gnumed-devel] Open Office templates |
Date: |
Tue, 2 Sep 2008 04:40:45 +0200 |
User-agent: |
KMail/1.9.9 |
Hello,
Funny, but it is easier to implement my idea of fixed data passed to template,
than I thought.
'gmForms.replace_placeholders' references data for a placeholder as a handler's
property. Exactly the same syntax is used to get data from a dictionary {}.
So I can simply do:
placeholders_data = {
'operation_diagnosis': node_data['operation_diagnosis'],
'lastname':
self.__patient.get_active_name()['lastnames'],
'firstname':
self.__patient.get_active_name()['firstnames']
}
doc.replace_placeholders(handler = placeholders_data)
Works like a charm :-)
Jerzy Luszawski