Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-wiki
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-wiki
Commits
0106b6fe
Commit
0106b6fe
authored
Feb 03, 2013
by
benjaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python 2.5 support
parent
b86be8c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
wiki/models/urlpath.py
+7
-5
No files found.
wiki/models/urlpath.py
View file @
0106b6fe
...
...
@@ -52,8 +52,7 @@ class URLPath(MPTTModel):
#self._tree_manager = URLPath.objects
return
super
(
URLPath
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
@property
def
cached_ancestors
(
self
):
def
__cached_ancestors
(
self
):
"""
This returns the ancestors of this urlpath. These ancestors are hopefully
cached from the article path lookup. Accessing a foreign key included in
...
...
@@ -70,10 +69,13 @@ class URLPath(MPTTModel):
return
self
.
_cached_ancestors
@cached_ancestors.setter
def
cached_ancestors
(
self
,
ancestors
):
def
__cached_ancestors_setter
(
self
,
ancestors
):
self
.
_cached_ancestors
=
ancestors
# Python 2.5 compatible property constructor
cached_ancestors
=
property
(
__cached_ancestors
,
__cached_ancestors_setter
)
def
set_cached_ancestors_from_parent
(
self
,
parent
):
self
.
cached_ancestors
=
parent
.
cached_ancestors
+
[
parent
]
...
...
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