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
6f0c00f3
Commit
6f0c00f3
authored
May 18, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added relative keyword argument (option) to absolute URL
to get a URL relative to installation.
parent
a18b4c2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/python/OFS/SimpleItem.py
lib/python/OFS/SimpleItem.py
+4
-4
No files found.
lib/python/OFS/SimpleItem.py
View file @
6f0c00f3
...
...
@@ -89,8 +89,8 @@ Aqueduct database adapters, etc.
This module can also be used as a simple template for implementing new
item types.
$Id: SimpleItem.py,v 1.5
1 1999/05/10 16:32:04
jim Exp $'''
__version__
=
'$Revision: 1.5
1
$'
[
11
:
-
2
]
$Id: SimpleItem.py,v 1.5
2 1999/05/18 15:47:03
jim Exp $'''
__version__
=
'$Revision: 1.5
2
$'
[
11
:
-
2
]
import
regex
,
sys
,
Globals
,
App
.
Management
,
Acquisition
from
webdav.Resource
import
Resource
...
...
@@ -290,7 +290,7 @@ class Item(Base, Resource, CopySource, App.Management.Tabs):
else
:
id
=
self
.
id
return
marshal
.
dumps
((
id
,
stat
))
def
absolute_url
(
self
):
def
absolute_url
(
self
,
relative
=
0
):
"""Return an absolute url to the object. Note that the url
will reflect the acquisition path of the object if the object
has been acquired."""
...
...
@@ -300,7 +300,7 @@ class Item(Base, Resource, CopySource, App.Management.Tabs):
id
=
callable
(
obj
.
id
)
and
obj
.
id
()
or
str
(
obj
.
id
)
url
.
append
(
id
)
obj
=
obj
.
aq_parent
url
.
append
(
self
.
aq_acquire
(
'REQUEST'
).
script
)
if
not
relative
:
url
.
append
(
self
.
aq_acquire
(
'REQUEST'
).
script
)
url
.
reverse
()
return
join
(
url
,
'/'
)
...
...
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