Permalink
Browse files

Merge branch 'master' into s3-storage-fix

  • Loading branch information...
superandrew committed Aug 29, 2018
2 parents 42d51e9 + 60c0589 commit e18ef7e57368b5645ef1b63810e7e16b65a91d38
Showing with 945 additions and 937 deletions.
  1. +0 −2 .travis.yml
  2. +3 −1 Makefile
  3. +1 −1 README.rst
  4. +0 −1 docs/development/testing.rst
  5. +0 −1 docs/development/testproject.rst
  6. +0 −1 docs/index.rst
  7. +4 −1 docs/release_notes.rst
  8. +0 −1 docs/settings.rst
  9. +5 −2 setup.py
  10. +1 −2 src/wiki/__init__.py
  11. +22 −8 src/wiki/conf/settings.py
  12. +3 −6 src/wiki/core/markdown/__init__.py
  13. +5 −0 src/wiki/core/markdown/mdx/codehilite.py
  14. +5 −0 src/wiki/core/markdown/mdx/previewlinks.py
  15. +5 −0 src/wiki/core/markdown/mdx/responsivetable.py
  16. BIN src/wiki/locale/cs/LC_MESSAGES/django.mo
  17. BIN src/wiki/locale/da/LC_MESSAGES/django.mo
  18. BIN src/wiki/locale/de/LC_MESSAGES/django.mo
  19. BIN src/wiki/locale/en/LC_MESSAGES/django.mo
  20. +323 −316 src/wiki/locale/en/LC_MESSAGES/django.po
  21. BIN src/wiki/locale/es/LC_MESSAGES/django.mo
  22. BIN src/wiki/locale/fi/LC_MESSAGES/django.mo
  23. BIN src/wiki/locale/fr/LC_MESSAGES/django.mo
  24. BIN src/wiki/locale/it/LC_MESSAGES/django.mo
  25. BIN src/wiki/locale/ja/LC_MESSAGES/django.mo
  26. BIN src/wiki/locale/ko_KR/LC_MESSAGES/django.mo
  27. BIN src/wiki/locale/nb_NO/LC_MESSAGES/django.mo
  28. BIN src/wiki/locale/nl/LC_MESSAGES/django.mo
  29. BIN src/wiki/locale/pl_PL/LC_MESSAGES/django.mo
  30. BIN src/wiki/locale/pt_BR/LC_MESSAGES/django.mo
  31. BIN src/wiki/locale/pt_PT/LC_MESSAGES/django.mo
  32. BIN src/wiki/locale/ru/LC_MESSAGES/django.mo
  33. BIN src/wiki/locale/sk/LC_MESSAGES/django.mo
  34. BIN src/wiki/locale/tr_TR/LC_MESSAGES/django.mo
  35. BIN src/wiki/locale/zh_CN/LC_MESSAGES/django.mo
  36. BIN src/wiki/locale/zh_TW/LC_MESSAGES/django.mo
  37. +7 −0 src/wiki/models/article.py
  38. +1 −1 src/wiki/plugins/attachments/templates/wiki/plugins/attachments/delete.html
  39. +1 −1 src/wiki/plugins/attachments/templates/wiki/plugins/attachments/index.html
  40. +3 −3 src/wiki/plugins/attachments/templates/wiki/plugins/attachments/replace.html
  41. +1 −1 src/wiki/plugins/globalhistory/templates/wiki/plugins/globalhistory/globalhistory.html
  42. +1 −1 src/wiki/plugins/images/apps.py
  43. +54 −76 src/wiki/plugins/images/markdown_extensions.py
  44. +8 −1 src/wiki/plugins/images/models.py
  45. +32 −39 src/wiki/plugins/macros/mdx/macro.py
  46. +17 −290 src/wiki/plugins/macros/mdx/toc.py
  47. +9 −7 src/wiki/plugins/macros/mdx/wikilinks.py
  48. +2 −2 src/wiki/plugins/macros/templatetags/wiki_macro_tags.py
  49. +4 −6 src/wiki/plugins/macros/wiki_plugin.py
  50. +1 −0 src/wiki/plugins/redlinks/__init__.py
  51. +8 −0 src/wiki/plugins/redlinks/apps.py
  52. 0 src/wiki/plugins/redlinks/mdx/__init__.py
  53. +114 −0 src/wiki/plugins/redlinks/mdx/redlinks.py
  54. +12 −0 src/wiki/plugins/redlinks/wiki_plugin.py
  55. +1 −1 src/wiki/sites.py
  56. +1 −1 src/wiki/static/wiki/bootstrap/LICENSE
  57. +3 −0 src/wiki/static/wiki/bootstrap/css/wiki-bootstrap.css
  58. +2 −2 src/wiki/static/wiki/bootstrap/css/wiki-bootstrap.min.css
  59. +1 −1 src/wiki/static/wiki/bootstrap/fonts/glyphicons-halflings-regular.svg
  60. +4 −0 src/wiki/static/wiki/bootstrap/less/wiki/wiki.less
  61. +0 −76 src/wiki/static/wiki/css/all.css
  62. +0 −14 src/wiki/static/wiki/css/print.css
  63. +1 −1 src/wiki/static/wiki/font-awesome/font/fontawesome-webfont.svg
  64. +1 −1 src/wiki/templates/wiki/dir.html
  65. +1 −1 src/wiki/templates/wiki/includes/anonymous_blocked.html
  66. +1 −1 src/wiki/templates/wiki/move.html
  67. +21 −19 src/wiki/templatetags/wiki_tags.py
  68. +1 −2 src/wiki/urls.py
  69. +2 −0 src/wiki/views/article.py
  70. BIN testproject/testproject/db/prepopulated.db
  71. +0 −1 testproject/testproject/settings/base.py
  72. +11 −1 tests/core/test_basic.py
  73. +1 −1 tests/core/test_checks.py
  74. +2 −1 tests/core/test_markdown.py
  75. +20 −26 tests/core/test_template_filters.py
  76. +38 −2 tests/core/test_views.py
  77. +1 −1 tests/plugins/attachments/test_models.py
  78. +14 −0 tests/plugins/globalhistory/test_globalhistory.py
  79. +0 −1 tests/plugins/images/test_forms.py
  80. +81 −0 tests/plugins/images/test_markdown.py
  81. +1 −4 tests/plugins/images/test_views.py
  82. +2 −4 tests/plugins/links/test_urlize.py
  83. +2 −3 tests/plugins/macros/test_links.py
  84. +16 −0 tests/plugins/macros/test_macro.py
  85. +63 −0 tests/plugins/redlinks/test_redlinks.py
  86. +1 −0 tests/settings.py
  87. +0 −1 tests/testdata/urls.py
View
@@ -16,8 +16,6 @@ env:
matrix:
exclude:
- python: "3.4"
env: LINT="yes"
- python: "3.5"
env: LINT="yes"
- python: "3.6"
View
@@ -60,7 +60,9 @@ coverage: ## Generate test coverage report
coverage run --source wiki setup.py test
coverage report -m
translation-push: ## Pushes translation sources
translation-push: ## Updates and pushes
cd src/wiki && django-admin makemessages -l en
cd ..
tx push -s
translation-pull: ## Pulls translation languages
View
@@ -26,7 +26,7 @@ The below table explains which Django versions are supported.
+------------------+----------------+--------------+
| Release | Django | Upgrade from |
+==================+================+==============+
| 0.4a5 | 1.11, 2.0 | 0.3 |
| 0.4b1 | 1.11, 2.0 | 0.3 |
+------------------+----------------+--------------+
| 0.3.x | 1.8, 1.9, | 0.2 |
| | 1.10, 1.11 | |
@@ -62,4 +62,3 @@ fixtures for tests e.g. a root article.
Javascript, and can be tested using the fast WebTest method, rather than
relying on the slow and fragile Selenium method. Selenium tests are not run by
default.
@@ -8,4 +8,3 @@ an sqlite database. Login for django admin is ``admin:admin``. This
project should always be maintained, but please do not commit changes to
the SQLite database as we only care about its contents in case data
models are changed.
View
@@ -26,4 +26,3 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
View
@@ -12,7 +12,7 @@ The next series **0.4** will support Django 1.11 and Django 2.x and be for
Python 3.4+.
django-wiki 0.4a5
django-wiki 0.4b1
-----------------
Added
@@ -21,6 +21,7 @@ Added
* Django 2 support :url-issue:`755` (Raffaele Salmaso & Mads Jensen)
* Added ``wiki.sites.WikiSite`` for easy customization :url-issue:`827`
* Automatic link highlighting of URLs handles lots of new patterns :url-issue:`816` (Branko Majic)
* Red links: Internal links turn red and link to Create Page (Mathias Rav) :url-issue:`889`
Changed
~~~~~~~
@@ -35,6 +36,7 @@ Changed
* Big cleanup: Deprecating lots of Python 2.7 specific code (Mads Jensen & Raffaele Salmaso) `See: >30 PRs <https://github.com/django-wiki/django-wiki/pulls?q=is%3Apr+is%3Aclosed+label%3Aclean-up>`__
* Languages: Merged ``pt`` and ``pt_PT``, then deleted ``pt`` and linked it to ``pt_PT`` :url-issue:`858`
* Languages: Linked ``zh_Hans`` to ``zh_CN`` :url-issue:`711`
* Languages: ``da`` translated 100%
Fixed
~~~~~
@@ -43,6 +45,7 @@ Fixed
* Use ``simple_tag`` for assignment tag :url-issue:`791` (Raffaele Salmaso)
* Direct invocation of ``pytest`` fixed (removing ``runtests.py``) :url-issue:`781` (Branko Majic)
* Line breaks in help texts for macros :url-issue:`851` (Mathias Dannesbo)
* Table of contents now has a header by default, and several built-in django-wiki extensions can be configured using ``WIKI_MARKDOWN_KWARGS`` :url-issue:`881` (Mathias Rav)
Deprecated/Removed
~~~~~~~~~~~~~~~~~~
View
@@ -33,4 +33,3 @@ Plugin macros
.. automodule:: wiki.plugins.macros.settings
:members:
View
@@ -27,7 +27,7 @@ def get_path(fname):
"Django>=1.11,<2.1",
"bleach>=2.1,<2.2",
"Pillow",
"django-nyt>=1.1b1,<1.2",
"django-nyt>=1.1.1,<1.2",
"django-mptt>=0.9,<0.10",
"django-sekizai>=0.10",
"sorl-thumbnail>=12,<13",
@@ -44,13 +44,16 @@ def get_path(fname):
test_lint_requirements = [
'flake8>=3.5,<3.6',
'flake8-isort',
]
setup_requirements = [
'pytest-runner',
]
development_requirements = test_requirements + test_lint_requirements
development_requirements = test_requirements + test_lint_requirements + [
'pre-commit',
]
extras_requirements = {
'devel': development_requirements,
View
@@ -17,8 +17,7 @@
from wiki.core.version import get_version
default_app_config = 'wiki.apps.WikiConfig'
VERSION = (0, 4, 0, 'alpha', 5)
VERSION = (0, 4, 0, 'beta', 1)
__version__ = get_version(VERSION)
View
@@ -1,5 +1,4 @@
import bleach
from django.apps import apps
from django.conf import settings as django_settings
from django.contrib.messages import constants as messages
from django.core.files.storage import default_storage
@@ -26,13 +25,28 @@
'WIKI_MARKDOWN_SANITIZE_HTML',
True)
#: Arguments for the Markdown instance, for instance a list of extensions to
#: use.
#: See: https://pythonhosted.org/Markdown/extensions/index.html
#: Arguments for the Markdown instance, as a dictionary. The "extensions" key
#: should be a list of extra extensions to use besides the built-in django-wiki
#: extensions, and the "extension_configs" should be a dictionary, specifying
#: the keyword-arguments to pass to each extension.
#:
#: To set a custom title for TOC's::
#: For a list of extensions officially supported by Python-Markdown, see:
#: https://python-markdown.github.io/extensions/
#:
#: WIKI_MARKDOWN_KWARGS = {'extension_configs': {'toc': _('Contents of this article')}}
#: To set a custom title for table of contents, specify the following in your
#: Django project settings::
#:
#: WIKI_MARKDOWN_KWARGS = {
#: 'extension_configs': {
#: 'wiki.plugins.macros.mdx.toc': {'title': 'Contents of this article'},
#: },
#: }
#:
#: Besides the extensions enabled by the "extensions" key, the following
#: built-in django-wiki extensions can be configured with "extension_configs":
#: "wiki.core.markdown.mdx.codehilite", "wiki.core.markdown.mdx.previewlinks",
#: "wiki.core.markdown.mdx.responsivetable", "wiki.plugins.macros.mdx.macro",
#: "wiki.plugins.macros.mdx.toc", "wiki.plugins.macros.mdx.wikilinks".
MARKDOWN_KWARGS = {
'extensions': [
'markdown.extensions.footnotes',
@@ -46,8 +60,8 @@
'markdown.extensions.sane_lists',
],
'extension_configs': {
'toc': {
'title': _('Table of Contents')}},
'wiki.plugins.macros.mdx.toc': {'title': _('Contents')},
},
}
MARKDOWN_KWARGS.update(getattr(django_settings, 'WIKI_MARKDOWN_KWARGS', {}))
@@ -1,9 +1,6 @@
import bleach
import markdown
from wiki.conf import settings
from wiki.core.markdown.mdx.codehilite import WikiCodeHiliteExtension
from wiki.core.markdown.mdx.previewlinks import PreviewLinksExtension
from wiki.core.markdown.mdx.responsivetable import ResponsiveTableExtension
from wiki.core.plugins import registry as plugin_registry
@@ -20,9 +17,9 @@ def __init__(self, article, preview=False, user=None, *args, **kwargs):
def core_extensions(self):
"""List of core extensions found in the mdx folder"""
return [
PreviewLinksExtension(),
ResponsiveTableExtension(),
WikiCodeHiliteExtension(),
'wiki.core.markdown.mdx.codehilite',
'wiki.core.markdown.mdx.previewlinks',
'wiki.core.markdown.mdx.responsivetable',
]
def get_markdown_extensions(self):
@@ -117,3 +117,8 @@ def extendMarkdown(self, md, md_globals):
">normalize_whitespace")
md.registerExtension(self)
def makeExtension(*args, **kwargs):
"""Return an instance of the extension."""
return WikiCodeHiliteExtension(*args, **kwargs)
@@ -19,3 +19,8 @@ def run(self, root):
if not a.get('href').startswith('#'):
a.set('target', '_blank')
return root
def makeExtension(*args, **kwargs):
"""Return an instance of the extension."""
return PreviewLinksExtension(*args, **kwargs)
@@ -37,3 +37,8 @@ def move_children(self, element1, element2):
def convert_to_wrapper(self, element):
element.tag = 'div'
element.set('class', 'table-responsive')
def makeExtension(*args, **kwargs):
"""Return an instance of the extension."""
return ResponsiveTableExtension(*args, **kwargs)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.

0 comments on commit e18ef7e

Please sign in to comment.