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
53205aca
Commit
53205aca
authored
Feb 07, 2013
by
benjaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix setting article fk on reusable plugins for identifying permissions
parent
7e6da88b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
wiki/conf/settings.py
+1
-1
wiki/models/pluginbase.py
+1
-1
No files found.
wiki/conf/settings.py
View file @
53205aca
...
@@ -13,7 +13,7 @@ WIKI_LANGUAGE = 'markdown'
...
@@ -13,7 +13,7 @@ WIKI_LANGUAGE = 'markdown'
# extend the built-in editor and customize it....
# extend the built-in editor and customize it....
EDITOR
=
getattr
(
django_settings
,
'WIKI_EDITOR'
,
'wiki.editors.markitup.MarkItUp'
)
EDITOR
=
getattr
(
django_settings
,
'WIKI_EDITOR'
,
'wiki.editors.markitup.MarkItUp'
)
MARKDOWN_KWARGS
=
{
'extensions'
:
[
'
footnotes'
,
'
headerid'
,
'extra'
,
'toc'
],
'safe_mode'
:
'replace'
}
MARKDOWN_KWARGS
=
{
'extensions'
:
[
'headerid'
,
'extra'
,
'toc'
],
'safe_mode'
:
'replace'
}
MARKDOWN_KWARGS
.
update
(
getattr
(
django_settings
,
'WIKI_MARKDOWN_KWARGS'
,
{}
))
MARKDOWN_KWARGS
.
update
(
getattr
(
django_settings
,
'WIKI_MARKDOWN_KWARGS'
,
{}
))
# This slug is used in URLPath if an article has been deleted. The children of the
# This slug is used in URLPath if an article has been deleted. The children of the
...
...
wiki/models/pluginbase.py
View file @
53205aca
...
@@ -97,7 +97,7 @@ class ReusablePlugin(ArticlePlugin):
...
@@ -97,7 +97,7 @@ class ReusablePlugin(ArticlePlugin):
# Automatically make the original article the first one in the added set
# Automatically make the original article the first one in the added set
if
not
self
.
article
:
if
not
self
.
article
:
articles
=
self
.
articles
.
all
()
articles
=
self
.
articles
.
all
()
if
articles
.
count
()
==
0
:
if
articles
.
exists
()
:
self
.
article
=
articles
[
0
]
self
.
article
=
articles
[
0
]
super
(
ReusablePlugin
,
self
)
.
save
(
*
args
,
**
kwargs
)
super
(
ReusablePlugin
,
self
)
.
save
(
*
args
,
**
kwargs
)
...
...
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