Commit 5f5577cf authored by Evan Simpson's avatar Evan Simpson

Make standard properties undeletable

parent 64a6ba68
......@@ -11,3 +11,11 @@ Page Template changes
- Error reporting is improved, with line numbers added.
- In the ZMI, errors are separated from the text and highlighted.
- A template can be marked explicitly as XML or HTML by giving
it a boolean 'is_html' property.
Bugs Fixed
- The starting properties could be deleted. This is only
fixed for new templates.
......@@ -87,7 +87,7 @@
Zope object encapsulating a Page Template.
"""
__version__='$Revision: 1.24 $'[11:-2]
__version__='$Revision: 1.25 $'[11:-2]
import os, AccessControl, Acquisition, sys
from Globals import DTMLFile, ImageFile, MessageDialog, package_home
......@@ -139,9 +139,9 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
+ SimpleItem.manage_options \
+ Cacheable.manage_options
_properties=({'id':'title', 'type': 'string'},
{'id':'content_type', 'type':'string'},
{'id':'expand', 'type':'boolean'},
_properties=({'id':'title', 'type': 'string', 'mode': 'w'},
{'id':'content_type', 'type':'string', 'mode': 'w'},
{'id':'expand', 'type':'boolean', 'mode': 'w'},
)
def __init__(self, id, text=None, content_type=None):
......@@ -355,8 +355,8 @@ d = ZopePageTemplate.__dict__
d['source.xml'] = d['source.html'] = Src()
# Product registration and Add support
manage_addPageTemplateForm = PageTemplateFile('www/ptAdd', globals())
manage_addPageTemplateForm.__name__ = 'manage_addPageTemplateForm'
manage_addPageTemplateForm = PageTemplateFile(
'www/ptAdd', globals(), __name__='manage_addPageTemplateForm')
from urllib import quote
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment