On Friday, August 1, 2003, at 12:36 am, Ron Brogden wrote:


On July 31, 2003 04:03 pm, you wrote:
mailmanctl restart after making the code change. The cache is in
process memory and is freshly created on demand within each process
each time the mailman daemons or scripts are started. You will also
need to rebuild existing mail archives using bin/arch to get the
revised templates to affect existing HTML archive pages.

Howdy. Ok, I now understand a bit more as to what is going on. I had
forgotten that Mailman is now effectively resident and that these details
would be sitting internally in the queue runner process. When stuff lingered
around I figured there was a disk cache involved somewhere buried in the
code. My bad.


I think that the previous "fix" actually did work but I inadvertently came
across a separate issue which obscured the real problem. The mangled
template was a separate issue altogether (removing all language files would
have made this a moot point anyway).


Here goes. . .

I have edited archtoc.html (as well as the other templates) to give the
archive a unified look. After doing so, the archive templates no longer get
parsed properly (i.e. none of the placeholders get replaced). Looking at the
source, the only immediate candidate is the "%" symbol in some of the table
tags (i.e. "width=100%") but I am not clear yet on how the conversions are
done. I know that a dictionary is passed to maketext() which is used but
what character exactly is screwing up the tag parsing I am unsure.



To get a single % use %%. For example, running python from the command line this fails:


>>> t = '%(fred)s:%(bert)s x="100%"'
>>> v = {'fred': 'abc', 'bert': 'xyz'}
>>> t % v
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: not enough arguments for format string

but this succeeds:

>>> t = '%(fred)s:%(bert)s x="100%%"'
>>> v = {'fred': 'abc', 'bert': 'xyz'}
>>> t % v
'abc:xyz x="100%"'

I have now restored the stock templates while I troubleshoot but does anyone
have any tips for trouble shooting a template that no longer parses?


Thanks again for any help you can provide.

Cheers,

Ron


_______________________________________________ Mailman-Developers mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-developers


-----------------------------------------------------------------------
Richard Barrett                               http://www.openinfo.co.uk


_______________________________________________ Mailman-Developers mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-developers

Reply via email to