[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] quick look at html progress notes
From: |
Horst Herb |
Subject: |
Re: [Gnumed-devel] quick look at html progress notes |
Date: |
Fri, 9 Sep 2005 12:10:53 +0000 |
User-agent: |
KMail/1.7.2 |
On Fri, 9 Sep 2005 11:29, Sebastian Hilbert wrote:
> I might be well out of bounds here but this cries for some templating
> system. Ok.Ok maybe in version 2.5 :-)
Tempate is easy:
--- file mytemplate.html ---
<html>
<body>
<h1> Welcome, %(user)s</h1>
<hr>
This is a simple example how to use string substitution in %(language)s
for %(purpose)s
</body>
--- file template.py ---
params = {'user':'Willy Looser', 'language':'python', 'purpose':'templating'}
html = open('mytemplate.html').read() % params
Should work, from memory.
Just publish a list of key words you will provide, and let the user then
provide the html template for it.
Horst