diff --git a/.travis.yml b/.travis.yml
index 50fea6d..60eafa3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,34 +1,41 @@
language: python
python:
- - "3.6"
+ - "3.7"
env:
- - WAGTAIL="wagtail>=2.4,<2.5" DB=sqlite
+ - WAGTAIL="wagtail>=2.6,<2.7" DB=sqlite
matrix:
include:
# Latest Wagtail version
- - env: WAGTAIL="wagtail>=2.4,<2.5" DB=sqlite
- - env: WAGTAIL="wagtail>=2.4,<2.5" DB=postgres
- - env: WAGTAIL="wagtail>=2.4,<2.5" DB=mysql
+ - env: WAGTAIL="wagtail>=2.6,<2.7" DB=postgres
+ - env: WAGTAIL="wagtail>=2.6,<2.7" DB=mysql
+ - python: "3.7"
- python: "3.6"
- python: "3.5"
- python: "3.4"
# Past Wagtail versions
- - python: "3.6"
+ - python: "3.7"
+ env: WAGTAIL="wagtail>=2.5,<2.6"
+ - python: "3.7"
+ env: WAGTAIL="wagtail>=2.4,<2.5"
+ - python: "3.7"
env: WAGTAIL="wagtail>=2.3,<2.4"
- - python: "3.6"
+ - python: "3.7"
env: WAGTAIL="wagtail>=2.2,<2.3"
- - python: "3.6"
+ - python: "3.7"
env: WAGTAIL="wagtail>=2.1,<2.2"
- - python: "3.6"
+ - python: "3.7"
env: WAGTAIL="wagtail>=2.0,<2.1"
- python: "2.7" # Wagtail 1.13 was the latest tested against 2.7
env: WAGTAIL="wagtail>=1.13,<1.14"
- - python: "3.6"
+ - python: "3.7"
env: WAGTAIL="wagtail>=1.13,<1.14"
- python: "2.7"
env: WAGTAIL="wagtail>=1.12,<1.13"
- - python: "3.6"
+ - python: "3.7"
env: WAGTAIL="wagtail>=1.12,<1.13"
+services:
+ - mysql
+ - postgresql
addons:
postgresql: "9.4"
before_script:
diff --git a/Pipfile b/Pipfile
index e8af0ec..bab7355 100644
--- a/Pipfile
+++ b/Pipfile
@@ -8,3 +8,4 @@ bumpversion = "*"
wheel = "*"
[dev-packages]
+twine = "*"
diff --git a/Pipfile.lock b/Pipfile.lock
index ce0a5c3..ead60ad 100644
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -1,12 +1,10 @@
{
"_meta": {
"hash": {
- "sha256": "8a50cf92fd274fbd58348130a7ab3568a8f694ad373cb5a67d45da7a46b96827"
+ "sha256": "191a6f860a13836c57a16587784ceca36f791bfae1270cf937286a496e891114"
},
"pipfile-spec": 6,
- "requires": {
- "python_version": "3.6"
- },
+ "requires": {},
"sources": [
{
"name": "pypi",
@@ -26,12 +24,120 @@
},
"wheel": {
"hashes": [
- "sha256:1ae8153bed701cb062913b72429bcf854ba824f973735427681882a688cb55ce",
- "sha256:9cdc8ab2cc9c3c2e2727a4b67c22881dbb0e1c503d592992594c5e131c867107"
+ "sha256:5e79117472686ac0c4aef5bad5172ea73a1c2d1646b808c35926bd26bdfb0c08",
+ "sha256:62fcfa03d45b5b722539ccbc07b190e4bfff4bb9e3a4d470dd9f6a0981002565"
],
"index": "pypi",
- "version": "==0.31.0"
+ "version": "==0.33.4"
}
},
- "develop": {}
+ "develop": {
+ "bleach": {
+ "hashes": [
+ "sha256:213336e49e102af26d9cde77dd2d0397afabc5a6bf2fed985dc35b5d1e285a16",
+ "sha256:3fdf7f77adcf649c9911387df51254b813185e32b2c6619f690b593a617e19fa"
+ ],
+ "version": "==3.1.0"
+ },
+ "certifi": {
+ "hashes": [
+ "sha256:59b7658e26ca9c7339e00f8f4636cdfe59d34fa37b9b04f6f9e9926b3cece1a5",
+ "sha256:b26104d6835d1f5e49452a26eb2ff87fe7090b89dfcaee5ea2212697e1e1d7ae"
+ ],
+ "version": "==2019.3.9"
+ },
+ "chardet": {
+ "hashes": [
+ "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
+ "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
+ ],
+ "version": "==3.0.4"
+ },
+ "docutils": {
+ "hashes": [
+ "sha256:02aec4bd92ab067f6ff27a38a38a41173bf01bed8f89157768c1573f53e474a6",
+ "sha256:51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274",
+ "sha256:7a4bd47eaf6596e1295ecb11361139febe29b084a87bf005bf899f9a42edc3c6"
+ ],
+ "version": "==0.14"
+ },
+ "idna": {
+ "hashes": [
+ "sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407",
+ "sha256:ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c"
+ ],
+ "version": "==2.8"
+ },
+ "pkginfo": {
+ "hashes": [
+ "sha256:7424f2c8511c186cd5424bbf31045b77435b37a8d604990b79d4e70d741148bb",
+ "sha256:a6d9e40ca61ad3ebd0b72fbadd4fba16e4c0e4df0428c041e01e06eb6ee71f32"
+ ],
+ "version": "==1.5.0.1"
+ },
+ "pygments": {
+ "hashes": [
+ "sha256:71e430bc85c88a430f000ac1d9b331d2407f681d6f6aec95e8bcfbc3df5b0127",
+ "sha256:881c4c157e45f30af185c1ffe8d549d48ac9127433f2c380c24b84572ad66297"
+ ],
+ "version": "==2.4.2"
+ },
+ "readme-renderer": {
+ "hashes": [
+ "sha256:bb16f55b259f27f75f640acf5e00cf897845a8b3e4731b5c1a436e4b8529202f",
+ "sha256:c8532b79afc0375a85f10433eca157d6b50f7d6990f337fa498c96cd4bfc203d"
+ ],
+ "version": "==24.0"
+ },
+ "requests": {
+ "hashes": [
+ "sha256:11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4",
+ "sha256:9cf5292fcd0f598c671cfc1e0d7d1a7f13bb8085e9a590f48c010551dc6c4b31"
+ ],
+ "version": "==2.22.0"
+ },
+ "requests-toolbelt": {
+ "hashes": [
+ "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f",
+ "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"
+ ],
+ "version": "==0.9.1"
+ },
+ "six": {
+ "hashes": [
+ "sha256:3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c",
+ "sha256:d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73"
+ ],
+ "version": "==1.12.0"
+ },
+ "tqdm": {
+ "hashes": [
+ "sha256:0a860bf2683fdbb4812fe539a6c22ea3f1777843ea985cb8c3807db448a0f7ab",
+ "sha256:e288416eecd4df19d12407d0c913cbf77aa8009d7fddb18f632aded3bdbdda6b"
+ ],
+ "version": "==4.32.1"
+ },
+ "twine": {
+ "hashes": [
+ "sha256:0fb0bfa3df4f62076cab5def36b1a71a2e4acb4d1fa5c97475b048117b1a6446",
+ "sha256:d6c29c933ecfc74e9b1d9fa13aa1f87c5d5770e119f5a4ce032092f0ff5b14dc"
+ ],
+ "index": "pypi",
+ "version": "==1.13.0"
+ },
+ "urllib3": {
+ "hashes": [
+ "sha256:b246607a25ac80bedac05c6f282e3cdaf3afb65420fd024ac94435cabe6e18d1",
+ "sha256:dbe59173209418ae49d485b87d1681aefa36252ee85884c31346debd19463232"
+ ],
+ "version": "==1.25.3"
+ },
+ "webencodings": {
+ "hashes": [
+ "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78",
+ "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"
+ ],
+ "version": "==0.5.1"
+ }
+ }
}
diff --git a/setup.cfg b/setup.cfg
index 4562b32..5683838 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,7 @@
[bumpversion]
-current_version = 0.10.1
+current_version = 0.10.2
commit = True
tag = True
[bumpversion:file:wagtail_modeltranslation/__init__.py]
+
diff --git a/wagtail_modeltranslation/__init__.py b/wagtail_modeltranslation/__init__.py
index 61d9abb..41202b0 100644
--- a/wagtail_modeltranslation/__init__.py
+++ b/wagtail_modeltranslation/__init__.py
@@ -1,3 +1,3 @@
# coding: utf-8
-__version__ = '0.10.1'
+__version__ = '0.10.2'
default_app_config = 'wagtail_modeltranslation.apps.ModeltranslationConfig'
diff --git a/wagtail_modeltranslation/patch_wagtailadmin.py b/wagtail_modeltranslation/patch_wagtailadmin.py
index a31bf49..cf58f6f 100644
--- a/wagtail_modeltranslation/patch_wagtailadmin.py
+++ b/wagtail_modeltranslation/patch_wagtailadmin.py
@@ -131,7 +131,7 @@ class WagtailTranslator(object):
def _patch_other_models(self, model):
if hasattr(model, 'edit_handler'):
edit_handler = model.edit_handler
- for tab in edit_handler:
+ for tab in edit_handler.children:
tab.children = self._patch_panels(tab.children)
elif hasattr(model, 'panels'):
model.panels = self._patch_panels(model.panels)
diff --git a/wagtail_modeltranslation/wagtail_hooks.py b/wagtail_modeltranslation/wagtail_hooks.py
index bc4b45d..d7b0d3d 100644
--- a/wagtail_modeltranslation/wagtail_hooks.py
+++ b/wagtail_modeltranslation/wagtail_hooks.py
@@ -8,6 +8,7 @@ from django.conf import settings
from django.conf.urls import url
from django.http import HttpResponse, QueryDict
from django.shortcuts import redirect, render
+from django.templatetags.static import static
from django.utils.html import escape, format_html, format_html_join
from django.utils.translation import ugettext as _
from django.views.decorators.csrf import csrf_exempt
@@ -37,9 +38,9 @@ def translated_slugs():
'wagtail_modeltranslation/js/wagtail_translated_slugs.js',
]
- js_includes = format_html_join('\n', '', (
- (settings.STATIC_URL, filename) for filename in js_files)
- )
+ js_includes = format_html_join('\n', '', (
+ (static(filename),) for filename in js_files)
+ )
lang_codes = []
for lang in settings.LANGUAGES:
@@ -132,18 +133,17 @@ def streamfields_translation_copy():
'wagtail_modeltranslation/js/copy_stream_fields.js',
]
- js_includes = format_html_join('\n', '', (
- (settings.STATIC_URL, filename) for filename in js_files)
- )
+ js_includes = format_html_join('\n', '', (
+ (static(filename),) for filename in js_files)
+ )
return js_includes
@hooks.register('insert_editor_css')
def modeltranslation_page_editor_css():
- return format_html('')
+ filename = 'wagtail_modeltranslation/css/page_editor_modeltranslation.css'
+ return format_html(''.format(static(filename)))
@hooks.register('register_rich_text_link_handler')