Commit 0b0ce8a6 authored by Jim Fulton's avatar Jim Fulton

Added Virtual.

parent 1f2d45db
......@@ -84,7 +84,7 @@
##############################################################################
"""Property sheets"""
__version__='$Revision: 1.3 $'[11:-2]
__version__='$Revision: 1.4 $'[11:-2]
import time, string, App.Management
from ZPublisher.Converters import type_converters
......@@ -342,9 +342,15 @@ class PropertySheet(Persistent, Implicit):
return self.manage_propertiesForm(self, REQUEST)
class Virtual:
def __init__(self):
pass
def v_self(self):
return self.aq_parent.aq_parent
class DefaultProperties(PropertySheet):
class DefaultProperties(Virtual, PropertySheet):
"""The default property set mimics the behavior of old-style Zope
properties -- it stores its property values in the instance of
its owner."""
......@@ -352,14 +358,8 @@ class DefaultProperties(PropertySheet):
id='default'
md={'xmlns': 'http://www.zope.org/propsets/default'}
def __init__(self):
pass
def v_self(self):
return self.aq_parent.aq_parent
class DAVProperties(PropertySheet):
class DAVProperties(Virtual, PropertySheet):
"""WebDAV properties"""
id='webdav'
......@@ -373,12 +373,6 @@ class DAVProperties(PropertySheet):
{'id':'source', 'mode':'r'},
)
def __init__(self):
pass
def v_self(self):
return self.aq_parent.aq_parent
def hasProperty(self, id):
return self.dav__propmap.has_key(id)
......
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