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
2d7c9870
Commit
2d7c9870
authored
Aug 19, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
children_slice is no longer queried when SHOW_MAX_CHILDREN=0
parent
55469f7b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
+2
-1
wiki/models/urlpath.py
+1
-1
wiki/views/mixins.py
+1
-0
No files found.
wiki/models/urlpath.py
View file @
2d7c9870
...
@@ -15,7 +15,7 @@ from wiki.core.exceptions import NoRootURL, MultipleRootURLs
...
@@ -15,7 +15,7 @@ from wiki.core.exceptions import NoRootURL, MultipleRootURLs
from
wiki.models.article
import
ArticleRevision
,
ArticleForObject
,
Article
from
wiki.models.article
import
ArticleRevision
,
ArticleForObject
,
Article
from
django.contrib.contenttypes.models
import
ContentType
from
django.contrib.contenttypes.models
import
ContentType
URLPATH_PREFECTED_PROPERTIES
=
[
"parent"
,
"article__current_revision"
]
URLPATH_PREFECTED_PROPERTIES
=
[
"parent"
,
"article__current_revision"
,
"article__owner"
]
class
URLPath
(
MPTTModel
):
class
URLPath
(
MPTTModel
):
"""
"""
...
...
wiki/views/mixins.py
View file @
2d7c9870
...
@@ -12,6 +12,7 @@ class ArticleMixin(TemplateResponseMixin):
...
@@ -12,6 +12,7 @@ class ArticleMixin(TemplateResponseMixin):
self
.
urlpath
=
kwargs
.
pop
(
'urlpath'
,
None
)
self
.
urlpath
=
kwargs
.
pop
(
'urlpath'
,
None
)
self
.
article
=
article
self
.
article
=
article
self
.
children_slice
=
[]
self
.
children_slice
=
[]
if
settings
.
SHOW_MAX_CHILDREN
>
0
:
for
child
in
self
.
article
.
get_children
(
max_num
=
settings
.
SHOW_MAX_CHILDREN
+
1
,
for
child
in
self
.
article
.
get_children
(
max_num
=
settings
.
SHOW_MAX_CHILDREN
+
1
,
articles__article__current_revision__deleted
=
False
):
articles__article__current_revision__deleted
=
False
):
self
.
children_slice
.
append
(
child
)
self
.
children_slice
.
append
(
child
)
...
...
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