switch create missing articles default

This commit is contained in:
James Turk 2010-04-06 18:14:41 -04:00
parent 18c1dae495
commit 3354d151cc
2 changed files with 4 additions and 2 deletions

View File

@ -27,7 +27,7 @@ write lock (default: 300)
``MARKUPWIKI_CREATE_MISSING_ARTICLES`` - if True when attempting to go to an ``MARKUPWIKI_CREATE_MISSING_ARTICLES`` - if True when attempting to go to an
article that doesn't exist, user will be redirected to the /edit/ page. If article that doesn't exist, user will be redirected to the /edit/ page. If
False user will get a 404. False user will get a 404. (default: True)
``MARKUPWIKI_DEFAULT_MARKUP_TYPE`` - default markup type to use ``MARKUPWIKI_DEFAULT_MARKUP_TYPE`` - default markup type to use
(default: markdown) (default: markdown)
@ -49,3 +49,5 @@ callable is used to 'render' a markup type. Example::
('markdown', markdown.markdown), ('markdown', markdown.markdown),
('ReST', render_rest) ('ReST', render_rest)
) )
Defaults to ``django-markupfield``'s detected markup types.

View File

@ -11,7 +11,7 @@ from django.utils.functional import wraps
from markupwiki.models import Article, PUBLIC, DELETED, LOCKED from markupwiki.models import Article, PUBLIC, DELETED, LOCKED
from markupwiki.forms import ArticleForm, StaffModerationForm, ArticleRenameForm from markupwiki.forms import ArticleForm, StaffModerationForm, ArticleRenameForm
CREATE_MISSING_ARTICLE = getattr(settings, 'MARKUPWIKI_CREATE_MISSING_ARTICLES', False) CREATE_MISSING_ARTICLE = getattr(settings, 'MARKUPWIKI_CREATE_MISSING_ARTICLES', True)
def title_check(view): def title_check(view):
def new_view(request, title, *args, **kwargs): def new_view(request, title, *args, **kwargs):