Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
e1d05930
Commit
e1d05930
authored
May 08, 2006
by
Philipp von Weitershausen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up, missing imports, missing logger
parent
46f71d61
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
17 deletions
+10
-17
lib/python/Products/PageTemplates/PageTemplateFile.py
lib/python/Products/PageTemplates/PageTemplateFile.py
+10
-17
No files found.
lib/python/Products/PageTemplates/PageTemplateFile.py
View file @
e1d05930
...
...
@@ -12,30 +12,27 @@
##############################################################################
import
os
from
logging
import
getLogger
from
Globals
import
package_home
,
InitializeClass
import
AccessControl
from
Globals
import
package_home
,
InitializeClass
,
DevelopmentMode
from
App.config
import
getConfiguration
from
Acquisition
import
aq_parent
,
aq_inner
from
ZopePageTemplate
import
ZopePageTemplate
from
zope.app.content_types
import
guess_content_type
import
AccessControl
from
ComputedAttribute
import
ComputedAttribute
from
OFS.SimpleItem
import
SimpleItem
from
Expressions
import
SecureModuleImporter
from
OFS.Traversable
import
Traversable
from
zope.pagetemplate.pagetemplatefile
import
PageTemplateFile
as
PTF
from
zope.pagetemplate.pagetemplate
import
PageTemplate
as
PT
from
Shared.DC.Scripts.Script
import
Script
from
OFS.SimpleItem
import
Item_w__name__
from
Shared.DC.Scripts.Signature
import
FuncCode
from
Products.PageTemplates.Engine
import
Engine
from
Products.PageTemplates.Expressions
import
SecureModuleImporter
from
Products.PageTemplates.ZopePageTemplate
import
guess_type
from
Engine
import
Engine
from
zope.contenttype
import
guess_content_type
from
zope.pagetemplate.pagetemplate
import
PageTemplate
LOG
=
getLogger
(
'PageTemplateFile'
)
class
PageTemplateFile
(
SimpleItem
,
Script
,
P
T
,
Traversable
):
class
PageTemplateFile
(
SimpleItem
,
Script
,
P
ageTemplate
,
Traversable
):
""" A Zope 2-aware wrapper class around the Zope 3 ZPT
PageTemplateFile implementation.
"""
...
...
@@ -56,9 +53,7 @@ class PageTemplateFile(SimpleItem, Script, PT, Traversable):
_default_bindings
=
{
'name_subpath'
:
'traverse_subpath'
}
def
__init__
(
self
,
filename
,
_prefix
=
None
,
**
kw
):
name
=
None
if
kw
.
has_key
(
'__name__'
):
name
=
kw
[
'__name__'
]
...
...
@@ -83,8 +78,6 @@ class PageTemplateFile(SimpleItem, Script, PT, Traversable):
self
.
filename
=
filename
content
=
open
(
filename
).
read
()
from
ZopePageTemplate
import
guess_type
self
.
pt_edit
(
content
,
guess_type
(
filename
,
content
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment