[Mailman-Developers] More help on the WebUI templating issue
Alvaro Uría
fermat at rigel.deusto.es
Mon Jun 4 04:27:07 CEST 2007
Hi all!
This is my first mail to the list so, let me greet all of you and just
say that I've been reading over here for quite a while now. BTW, with
pretty interesting threads.
I've been administering GNU Mailman since 2003 and a few months ago
started to dig into its design, in the aim of helping you, first with
the WebUI templating, and with the idea of continuing in a future with
other parts of Mailman.
As a way of helping me to understand Mailman, I've created a few UML
class diagrams based on MM2.1 (which I hope to improve),
http://csl-mmwebui.forja.rediris.es/uml/uml.html
...and I've generated the API with epydoc,
http://csl-mmwebui.forja.rediris.es/mailman-api/
In reference to the templating engine, I know you're thinking to use Kid
or Genshi... but I've started another approach with Cheetah
(http://www.cheetahtemplate.org/), which uses text-based templates.
Here you have a very simple test of how Cgi scripts could be rewritten
for the creation of web content,
http://csl-mmwebui.forja.rediris.es/auria-test.tgz
In this .tgz you have:
2 scripts:
* Test.py (the one to be run)
* TemplateController.py (the one that deals with Cheetah and the
templating files, and called by the Cgi scripts)
2 templates:
* if 'example.tpl' does not exist, 'error.tpl' is read (if not,
a string is returned).
BTW, I just wanted to clarify that I understand that only a templating
engine will be used for the whole project, but I wanted to give a try to
Cheetah and see if it matches in a better way all Mailman needs
(including email templates and archives, and making easier to integrate
the pages on "corporated sites", allowing to change pageheaders and
pagefoots).
I didn't say anything before on the list because I haven't been working
constantly on this, and because I don't like very much to talk with no
other purpose than talking (you know, "talk is cheap...", etc. :-)).
Comming back to the WebUI, maybe the most important thing is that most
of the i18n that is currently working should also work on any new
design.
In that sense, I've thought to migrate all to Unicode format (UTF-8) and
to join all HTML templates per language in a common one, and instead of
having contents like:
"""
<tr>
<td>Username:</td><td><input name="foo" ..../></td>
<td>Password:</td><td><input name="bar" ..../></td>
</tr>
"""
...we could have,
"""
<tr>
<td>$label_foo</td><td><input name="foo" ..../></td>
<td>$label_bar</td><td><input name="bar" ..../></td>
</tr>
"""
So, the thing would be to include all this i18n (labels, etc.) to the
.po files.
For ".txt" files, nothing would change.
In summary, only would change "templates/<lang>/*.html", joining them in
a common dir like "templates/common/<themeName>/*.html".
(Between those "themes", or styles, there could be ones using "<table>"
tags and others with "<div>" and using only CSS for the draw...)
So, as you can see, all CSS issues would be similar (if not the same)
with what you're working right now, what it reduces (or joins) efforts
:-)
And last (sorry to bother you O:-)), I've started to use bazaar a week
ago and I hope to push my work on this on launchpad. What I don't know
is if I should create a branch and create subdirectories for different
parts in there, or create those subdirectories as branches... :?
Thank you very much for reading till here, and hope to help you :-))
Best regards,
--
,____________,
.' '.
/~~~~^~~~^~^~~~\
/ _ /|| \ Alvaro Uría (0x3AD91E72)
; ( } \||D ; <fermat at rigel.deusto.es>
| | /\__,=[_] |
; ( |_\_ |---| ; It might look like I'm doing nothing, but
\ )| |/ | | / at the cellular level I'm really quite busy.
'. | /_ | |.'
'------------'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.python.org/pipermail/mailman-developers/attachments/20070604/1c6b462a/attachment.pgp
More information about the Mailman-Developers
mailing list