forked from django-cms/djangocms-text-ckeditor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add django 3.1 support (django-cms#543)
* add django 3.1 compatibility * fix tests * enable frontend tests * run as seperate job * use rst * add fe to envlist * nope * further cleanup * remove # -*- coding: utf-8 -*- * get linting to work * use same setup as on filer * add additional adaptions * needs to be py2 compatible for now * renamce license file
- Loading branch information
1 parent
f8dc530
commit 11e7797
Showing
49 changed files
with
1,028 additions
and
1,168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,7 @@ htmlcov/ | |
.cache | ||
nosetests.xml | ||
*.cover | ||
.coverage | ||
.hypothesis/ | ||
|
||
# Translations | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,50 @@ | ||
language: python | ||
|
||
sudo: false | ||
dist: xenial | ||
|
||
matrix: | ||
include: | ||
- python: 3.5 | ||
env: TOX_ENV='flake8' | ||
- python: 3.5 | ||
env: TOX_ENV='isort' | ||
# Django 1.11 | ||
- python: 3.4 | ||
env: DJANGO='dj111' CMS='cms35' FE=1 | ||
- python: 3.5 | ||
env: DJANGO='dj111' CMS='cms36' FE=1 | ||
- python: 3.6 | ||
env: DJANGO='dj111' CMS='cms37' FE=1 | ||
# Django 2.1 | ||
- python: 3.6 | ||
env: DJANGO='dj21' CMS='cms36' FE=1 | ||
- python: 3.6 | ||
env: DJANGO='dj21' CMS='cms37' FE=1 | ||
env: TOX_ENV='frontend' | ||
# Django 2.2 | ||
- python: 3.5 | ||
env: DJANGO='dj22' CMS='cms37' | ||
- python: 3.6 | ||
env: DJANGO='dj22' CMS='cms37' FE=1 | ||
env: DJANGO='dj22' CMS='cms37' | ||
- python: 3.7 | ||
env: DJANGO='dj22' CMS='cms37' FE=1 | ||
dist: xenial | ||
sudo: true | ||
env: DJANGO='dj22' CMS='cms37' | ||
- python: 3.8 | ||
env: DJANGO='dj22' CMS='cms37' | ||
# Django 3.0 | ||
# Django 3.0, always run the lowest supported version | ||
- python: 3.6 | ||
env: DJANGO='dj30' CMS='cms37' | ||
- python: 3.7 | ||
env: DJANGO='dj30' CMS='cms37' | ||
- python: 3.8 | ||
env: DJANGO='dj30' CMS='cms37' | ||
# Django 3.1, always run the lowest supported version | ||
- python: 3.6 | ||
env: DJANGO='dj31' CMS='cms38' | ||
allow_failures: | ||
- python: 3.6 | ||
env: DJANGO='dj31' CMS='cms38' | ||
|
||
before_script: | ||
install: | ||
- pip install coverage isort tox | ||
- "if [[ $TRAVIS_PYTHON_VERSION == '3.4' ]]; then export PY_VER=py34; fi" | ||
- "if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then export PY_VER=py35; fi" | ||
- "if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then export PY_VER=py36; fi" | ||
- "if [[ $TRAVIS_PYTHON_VERSION == '3.7' ]]; then export PY_VER=py37; fi" | ||
- "if [[ $TRAVIS_PYTHON_VERSION == '3.8' ]]; then export PY_VER=py38; fi" | ||
- "if [[ ${DJANGO}z != 'z' ]]; then export TOX_ENV=$PY_VER-$DJANGO-$CMS; fi" | ||
- if [ "$FE" == 1 ]; then nvm install 8 && nvm use 8; fi | ||
- if [ "$FE" == 1 ]; then npm config set spin false; fi | ||
- if [ "$FE" == 1 ]; then npm install -g npm; fi | ||
- if [ "$FE" == 1 ]; then npm install -g [email protected]; fi | ||
- if [ "$FE" == 1 ]; then npm install -g codeclimate-test-reporter; fi | ||
- if [ "$FE" == 1 ]; then npm ci; fi | ||
|
||
install: | ||
- pip install -U tox>=1.8 coveralls | ||
- "if [[ $TRAVIS_PYTHON_VERSION == '3.4' ]]; then export PY_VER=py34; fi" | ||
- "if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then export PY_VER=py35; fi" | ||
- "if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then export PY_VER=py36; fi" | ||
- "if [[ $TRAVIS_PYTHON_VERSION == '3.7' ]]; then export PY_VER=py37; fi" | ||
- "if [[ ${DJANGO}z != 'z' ]]; then export TOX_ENV=$PY_VER-$DJANGO-$CMS; fi" | ||
- "if [[ $FE == 1 ]]; then export FE_STR='-fe'; fi" | ||
before_script: | ||
- if [ $TOX_ENV == 'frontend' ]; then | ||
nvm install 8.10.0 && nvm use 8.10.0; | ||
npm config set spin false; | ||
npm install -g npm; | ||
npm install -g [email protected]; | ||
npm install; | ||
fi | ||
|
||
script: | ||
- tox -e $TOX_ENV | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
====================================== | ||
Upgrade to a newer version of CKEditor | ||
====================================== | ||
|
||
Simple upgrade | ||
-------------- | ||
|
||
Download the latest minified version of ckeditor, bundled with all | ||
configured CKEditor-4 plugins. The correct URL can be found in | ||
``djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/build-config.js`` | ||
under (3). | ||
|
||
Unzip that file and replace | ||
``djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor`` with | ||
it. | ||
|
||
Rebundle everything running ``gulp build``. | ||
|
||
Full upgrade | ||
------------ | ||
|
||
This requires to access the sources of CKEditor. Clone the repository | ||
and build CKEditor: | ||
|
||
.. code:: bash | ||
|
||
git clone https://github.com/ckeditor/ckeditor4.git | ||
cd ckeditor4 | ||
./dev/builder/build.sh --leave-js-unminified | ||
|
||
This creates an unminified release of CKEditor, which is useful for | ||
debugging. In a production environment, remove the option | ||
``--leave-js-unminified``. | ||
|
||
**djangocms-text-ckeditor** reuses two plugins from CKEditor-4, which | ||
are patched to work inside **django-CMS**. These plugins are found at | ||
``djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor_plugins/cmsdialog/plugin.js`` | ||
and | ||
``djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor_plugins/cmsresize/plugin.js``. | ||
These plugins have been derived from | ||
``ckeditor4/plugins/plugins/dialog/plugin.js`` and | ||
``ckeditor4/plugins/plugins/resize/plugin.js`` respectively. | ||
|
||
The current version of djangocms-text-ckeditor is based on the version | ||
4.14.0 of CKEditor4. If these two plugins have to be ported to a later | ||
version, first make a ``diff -u ...`` against version 4.14.0, then copy | ||
these plugins into the current folders, ``cmsdialog`` and ``cmsresize``. | ||
Then switch back to the latest version of CKEditor-4 and apply the | ||
patches previously created. | ||
|
||
Replace the folder | ||
``djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor`` with | ||
that from ``ckeditor4/dev/builder/release/ckeditor``. | ||
|
||
Rebundle everything running ``gulp build``. | ||
|
||
``.editorconfig`` | ||
~~~~~~~~~~~~~~~~~ | ||
Please don't convert tabs to spaces in the plugins patched from | ||
CKEditor-4. They use tabs for indentation and if they are converted, it | ||
makes file diffs much harder. That's the reason, why this folder | ||
contains its own ``.editorconfig``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
from aldryn_client import forms | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
See PEP 440 (https://www.python.org/dev/peps/pep-0440/) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
from django.apps import AppConfig | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
from .sanitizer import AllowTokenParser | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.