Opened 13 years ago
Closed 12 years ago
#465 closed defect (wontfix)
Load template relative to ...
Reported by: | MikeP | Owned by: | hodgestar |
---|---|---|---|
Priority: | critical | Milestone: | 0.7 |
Component: | Template processing | Version: | 0.6 |
Keywords: | TemplateLoader | Cc: |
Description
In genshi/template/loader.py is wery annoying :-) error which make loading template on path relative to ... allmost impossible (in case non-unique template name).
Line 181 is:
if relative_to and (not search_path or not os.path.isabs(relative_to)): filename = os.path.join(os.path.dirname(relative_to), filename) filename = os.path.normpath(filename) cachekey = filename
but correct is:
if relative_to and (not search_path or not os.path.isabs(filename)): filename = os.path.join(os.path.dirname(relative_to), filename) filename = os.path.normpath(filename) cachekey = filename
Attachments (1)
Change History (7)
comment:1 Changed 13 years ago by anonymous
- Owner changed from cmlenz to anonymous
comment:2 Changed 13 years ago by anonymous
- Owner changed from anonymous to MikeP
comment:3 Changed 13 years ago by Davian
comment:4 Changed 13 years ago by anonymous
- Owner changed from MikeP to anonymous
comment:5 Changed 12 years ago by hodgestar
- Owner changed from anonymous to hodgestar
- Status changed from new to assigned
Thanks! Would be good to have a test to go with the patch if possible.
comment:6 Changed 12 years ago by hodgestar
- Resolution set to wontfix
- Status changed from assigned to closed
I no longer think this patch is correct. The comment above the lines you change seems to make it clear that the current behaviour was the intention and applying your patch breaks an existing test that checks explicitly for the current behaviour.
I'm happy to re-open this but I'll need a bit of a better description of your use-case and what needs to be supported.
Thought it woudln't to give it a shot. I was right.