Issue 1163629
Created on 2005-03-15 11:00 by micktwomey, last changed 2005-04-13 06:12 by richard.
File name |
Uploaded |
Description |
Edit |
Remove |
templating.patch
|
micktwomey,
2005-03-15 11:00
|
Patch against roundup/cgi/templating.py for find_template |
|
|
msg1896 |
Author: [hidden] (micktwomey) |
Date: 2005-03-15 11:00 |
|
I've been using XML templates (e.g. home.atom.xml and
xmlwidgets.xml) with roundup 0.8 and I'm encountering
issues with it not being able to find them. I think the
problem is in the code in
roundup.cgi.templating.find_template which tries to
look for html and xml files:
# try with a .html or .xml extension (new-style)
for extension in '.html', '.xml':
filename = filename + extension
src = os.path.join(dir, filename)
if os.path.exists(src):
return (src, filename)
On the first pass it will look for foo.html but on the
second pass it will look for foo.html.xml since
filename has been clobbered. Changing the code to this
fixes it:
# try with a .html or .xml extension (new-style)
for extension in '.html', '.xml':
f = filename + extension
src = os.path.join(dir, f)
if os.path.exists(src):
return (src, f)
I've attached a diff against CVS HEAD too. Applying
this patch to my copy of roundup lets it find my xml
templates. Without this change my roundup instance
won't even start as it has a fit over xmlwidgets.xml.
|
msg1897 |
Author: [hidden] (richard) |
Date: 2005-04-13 06:12 |
|
Logged In: YES
user_id=6405
Applied, thanks!
|
|
Date |
User |
Action |
Args |
2005-03-15 11:00:35 | micktwomey | create | |
|