From 510dd854e638df8eda7857a90c9e5d79cfca3d4a Mon Sep 17 00:00:00 2001 From: Piotr Mitros Date: Tue, 3 Jan 2012 20:23:09 -0500 Subject: [PATCH] Inline math now works in wiki --- simplewiki/settings.py | 5 +++-- simplewiki/templates/simplewiki_base.html | 6 ++++++ simplewiki/views.py | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/simplewiki/settings.py b/simplewiki/settings.py index 9a2f35c0eb..d0c6a9e945 100644 --- a/simplewiki/settings.py +++ b/simplewiki/settings.py @@ -17,7 +17,7 @@ WIKI_USE_MARKUP_WIDGET = True # Adds standard django login protection for viewing WIKI_REQUIRE_LOGIN_VIEW = getattr(settings, 'SIMPLE_WIKI_REQUIRE_LOGIN_VIEW', - False) + True) # Adds standard django login protection for editing WIKI_REQUIRE_LOGIN_EDIT = getattr(settings, 'SIMPLE_WIKI_REQUIRE_LOGIN_EDIT', @@ -34,7 +34,7 @@ WIKI_ATTACHMENTS = getattr(settings, 'SIMPLE_WIKI_ATTACHMENTS', # If false, attachments will completely disappear WIKI_ALLOW_ATTACHMENTS = getattr(settings, 'SIMPLE_WIKI_ALLOW_ATTACHMENTS', - True) + False) # If WIKI_REQUIRE_LOGIN_EDIT is False, then attachments can still be disallowed WIKI_ALLOW_ANON_ATTACHMENTS = getattr(settings, 'SIMPLE_WIKI_ALLOW_ANON_ATTACHMENTS', False) @@ -88,6 +88,7 @@ WIKI_MARKDOWN_EXTENSIONS = getattr(settings, 'SIMPLE_WIKI_MARKDOWN_EXTENSIONS', 'codehilite', 'abbr', 'toc', + 'mathjax', 'camelcase', # CamelCase-style wikilinks 'video', # In-line embedding for YouTube, etc. #'image' # In-line embedding for images - too many bugs. It has a failed REG EXP. diff --git a/simplewiki/templates/simplewiki_base.html b/simplewiki/templates/simplewiki_base.html index 3e65b20c1c..ff01848a51 100644 --- a/simplewiki/templates/simplewiki_base.html +++ b/simplewiki/templates/simplewiki_base.html @@ -29,6 +29,12 @@ x(); } + {% block wiki_head %} {% endblock %} diff --git a/simplewiki/views.py b/simplewiki/views.py index 2a06dc464f..e4fb0da664 100644 --- a/simplewiki/views.py +++ b/simplewiki/views.py @@ -411,8 +411,8 @@ def check_permissions(request, article, check_read=False, check_write=False, che if WIKI_REQUIRE_LOGIN_VIEW: view = login_required(view) history = login_required(history) - search_related = login_required(search_related) - wiki_encode_err = login_required(wiki_encode_err) +# search_related = login_required(search_related) +# wiki_encode_err = login_required(wiki_encode_err) if WIKI_REQUIRE_LOGIN_EDIT: create = login_required(create)