~netlandish/django-wiki

53205acabdafc350536bf301833ea19d9e0217c5 — benjaoming 11 years ago 7e6da88
fix setting article fk on reusable plugins for identifying permissions
2 files changed, 2 insertions(+), 2 deletions(-)

M wiki/conf/settings.py
M wiki/models/pluginbase.py
M wiki/conf/settings.py => wiki/conf/settings.py +1 -1
@@ 13,7 13,7 @@ WIKI_LANGUAGE = 'markdown'
# extend the built-in editor and customize it....
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', {} ))

# This slug is used in URLPath if an article has been deleted. The children of the

M wiki/models/pluginbase.py => wiki/models/pluginbase.py +1 -1
@@ 97,7 97,7 @@ class ReusablePlugin(ArticlePlugin):
        # Automatically make the original article the first one in the added set
        if not self.article:
            articles = self.articles.all()
            if articles.count() == 0:
            if articles.exists():
                self.article = articles[0]
            
        super(ReusablePlugin, self).save(*args, **kwargs)