Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx
edx-platform
Commits
510dd854
Commit
510dd854
authored
Jan 03, 2012
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inline math now works in wiki
parent
737cdb37
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
simplewiki/settings.py
+3
-2
simplewiki/templates/simplewiki_base.html
+6
-0
simplewiki/views.py
+2
-2
No files found.
simplewiki/settings.py
View file @
510dd854
...
...
@@ -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'
,
Fals
e
)
Tru
e
)
# 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'
,
Tru
e
)
Fals
e
)
# 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.
...
...
simplewiki/templates/simplewiki_base.html
View file @
510dd854
...
...
@@ -29,6 +29,12 @@
x
();
}
</script>
<script
type=
"text/x-mathjax-config"
>
MathJax
.
Hub
.
Config
({
tex2jax
:
{
inlineMath
:
[
[
'$'
,
'$'
],
[
"
\\
("
,
"
\\
)"
]],
displayMath
:
[
[
'$$'
,
'$$'
],
[
"
\\
["
,
"
\\
]"
]]}
});
</script>
<script
type=
"text/javascript"
src=
"/static/lib/mathjax/MathJax.js?config=TeX-AMS_HTML-full"
></script>
{% block wiki_head %}
{% endblock %}
</head>
...
...
simplewiki/views.py
View file @
510dd854
...
...
@@ -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
)
...
...
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