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
335b4edd
Commit
335b4edd
authored
Feb 26, 1999
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
e82c919e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
lib/python/OFS/PropertySheets.py
lib/python/OFS/PropertySheets.py
+13
-10
No files found.
lib/python/OFS/PropertySheets.py
View file @
335b4edd
...
...
@@ -84,7 +84,7 @@
##############################################################################
"""Property sheets"""
__version__
=
'$Revision: 1.
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
import
time
,
string
from
ZPublisher.Converters
import
type_converters
...
...
@@ -182,14 +182,12 @@ class PropertySheet(Persistent, Implicit):
def
propertyValues
(
self
):
# Return a list of property values.
vself
=
self
.
v_self
()
return
map
(
lambda
i
,
s
=
vself
:
s
.
getProperty
(
i
[
'id'
]),
return
map
(
lambda
i
,
s
=
self
:
s
.
getProperty
(
i
[
'id'
]),
self
.
propertyMap
())
def
propertyItems
(
self
):
# Return a list of (id, property) tuples.
vself
=
self
.
v_self
()
return
map
(
lambda
i
,
s
=
vself
:
(
i
[
'id'
],
s
.
getProperty
(
i
[
'id'
])),
return
map
(
lambda
i
,
s
=
self
:
(
i
[
'id'
],
s
.
getProperty
(
i
[
'id'
])),
self
.
propertyMap
())
def
propertyInfo
(
self
,
id
):
...
...
@@ -211,14 +209,19 @@ class PropertySheet(Persistent, Implicit):
def
dav__propstat
(
self
,
url
,
allprop
,
vals
,
join
=
string
.
join
):
# The dav__propstat method returns a chunk of xml containing
# one or more propstat elements indicating property names,
# values, errors and status codes.
# values, errors and status codes. This is called by some
# of the WebDAV support machinery. If a property set does
# not support WebDAV, just override this method to return
# an empty string.
propstat
=
'<d:propstat%s>
\
n
'
\
' <d:prop>
\
n
'
\
'%s
\
n
'
\
' </d:prop>
\
n
'
\
' <d:status>HTTP/1.1 %s</d:status>
\
n
'
\
'</d:propstat>'
'</d:propstat>'
result
=
[]
if
not
self
.
propertyMap
():
return
''
if
not
allprop
and
not
vals
:
# propname request
for
name
in
self
.
propertyIds
():
...
...
@@ -454,7 +457,7 @@ class PropertySheets(Implicit):
for
propset
in
self
.
__propsets__
():
if
propset
.
id
==
name
:
return
propset
.
__of__
(
self
)
r
aise
'Not Found'
,
name
r
eturn
getattr
(
self
,
name
)
def
__getitem__
(
self
,
n
):
return
self
.
__propsets__
()[
n
].
__of__
(
self
)
...
...
@@ -468,8 +471,8 @@ class PropertySheets(Implicit):
def
manage_addPropertySheet
(
self
,
id
,
ns
):
""" """
md
=
{
'xmlns'
:
ns
}
ps
=
PropertySet
(
id
,
md
)
self
.
addPropertySet
(
ps
)
ps
=
PropertyS
he
et
(
id
,
md
)
self
.
addPropertyS
he
et
(
ps
)
return
'OK'
def
addPropertySheet
(
self
,
propset
):
...
...
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