Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
Strip off a leading 'file:' source file prefix.
Browse files Browse the repository at this point in the history
  • Loading branch information
malthe committed Oct 10, 2011
1 parent 981c07f commit 144ad36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Changelog

2.2 (unreleased)
~~~~~~~~~~~~~~~~

- Update implementation to use component-based template engine
configuration, plugging directly into the Zope Toolkit framework.

Expand Down
4 changes: 4 additions & 0 deletions src/five/pt/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ def cook(cls, source_file, text, engine, content_type):
else:
expression_types = cls.expression_types

# BBB: Support CMFCore's FSPagetemplateFile formatting
if source_file.startswith('file:'):
source_file = source_file[5:]

template = ChameleonPageTemplate(
text, filename=source_file, keep_body=True,
expression_types=expression_types,
Expand Down

0 comments on commit 144ad36

Please sign in to comment.