Skip to content

Commit cc59a60

Browse files
authored
Add django 3.1 support (#47)
* add django 3.1 support * ups * fixes #45 * update readme * fix warnings * fiyes * remove not supported version * needs to be py2 compatible for now
1 parent 3e27fa3 commit cc59a60

26 files changed

+50
-99
lines changed

.travis.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,38 @@
11
language: python
22

33
dist: xenial
4-
sudo: false
54

65
matrix:
76
include:
87
- python: 3.5
98
env: TOX_ENV='flake8'
109
- python: 3.5
1110
env: TOX_ENV='isort'
12-
# Django 1.11
13-
- python: 2.7
14-
env: DJANGO='dj111' CMS='cms34'
15-
- python: 3.4
16-
env: DJANGO='dj111' CMS='cms35'
17-
- python: 3.5
18-
env: DJANGO='dj111' CMS='cms36'
19-
- python: 3.6
20-
env: DJANGO='dj111' CMS='cms37'
21-
# Django 2.1
22-
- python: 3.6
23-
env: DJANGO='dj21' CMS='cms36'
24-
- python: 3.6
25-
env: DJANGO='dj21' CMS='cms37'
2611
# Django 2.2
12+
- python: 3.5
13+
env: DJANGO='dj22' CMS='cms37'
2714
- python: 3.6
2815
env: DJANGO='dj22' CMS='cms37'
2916
- python: 3.7
3017
env: DJANGO='dj22' CMS='cms37'
18+
- python: 3.8
19+
env: DJANGO='dj22' CMS='cms37'
20+
# Django 3.0, always run the lowest supported version
21+
- python: 3.6
22+
env: DJANGO='dj30' CMS='cms37'
23+
# Django 3.1, always run the lowest supported version
24+
- python: 3.6
25+
env: DJANGO='dj31' CMS='cms38'
26+
allow_failures:
27+
- python: 3.6
28+
env: DJANGO='dj31' CMS='cms38'
3129

3230
install:
3331
- pip install coverage isort tox
34-
- "if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then export PY_VER=py27; fi"
35-
- "if [[ $TRAVIS_PYTHON_VERSION == '3.4' ]]; then export PY_VER=py34; fi"
3632
- "if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then export PY_VER=py35; fi"
3733
- "if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then export PY_VER=py36; fi"
3834
- "if [[ $TRAVIS_PYTHON_VERSION == '3.7' ]]; then export PY_VER=py37; fi"
35+
- "if [[ $TRAVIS_PYTHON_VERSION == '3.8' ]]; then export PY_VER=py38; fi"
3936
- "if [[ ${DJANGO}z != 'z' ]]; then export TOX_ENV=$PY_VER-$DJANGO-$CMS; fi"
4037

4138
script:

CHANGELOG.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ Changelog
33
=========
44

55

6+
3.0.0 (unreleased)
7+
==================
8+
9+
* Added support for Django 3.1
10+
* Dropped support for Python 2.7 and Python 3.4
11+
* Dropped support for Django < 2.2
12+
13+
614
2.4.0 (2020-01-29)
715
==================
816

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ file for additional dependencies:
4141

4242
|python| |django| |djangocms|
4343

44-
* Django Filer 1.2.4 or higher
44+
* Django Filer 1.7 or higher
4545

4646
Make sure `django-filer <http://django-filer.readthedocs.io/en/latest/installation.html>`_
4747
is installed and configured appropriately.
@@ -95,9 +95,9 @@ You can run tests by executing::
9595
.. |coverage| image:: https://codecov.io/gh/divio/djangocms-file/branch/master/graph/badge.svg
9696
:target: https://codecov.io/gh/divio/djangocms-file
9797

98-
.. |python| image:: https://img.shields.io/badge/python-2.7%20%7C%203.4+-blue.svg
98+
.. |python| image:: https://img.shields.io/badge/python-3.5+-blue.svg
9999
:target: https://pypi.org/project/djangocms-file/
100-
.. |django| image:: https://img.shields.io/badge/django-1.11%20%7C%202.1%20%7C%202.2-blue.svg
100+
.. |django| image:: https://img.shields.io/badge/django-2.2,%203.0,%203.1-blue.svg
101101
:target: https://www.djangoproject.com/
102-
.. |djangocms| image:: https://img.shields.io/badge/django%20CMS-3.4%2B-blue.svg
102+
.. |djangocms| image:: https://img.shields.io/badge/django%20CMS-3.7%2B-blue.svg
103103
:target: https://www.django-cms.org/

aldryn_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from aldryn_client import forms
32

43

djangocms_file/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
# -*- coding: utf-8 -*-
21
__version__ = '2.4.0'

djangocms_file/cms_plugins.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# -*- coding: utf-8 -*-
2-
from django.utils.translation import ugettext_lazy as _
1+
from django.utils.translation import gettext_lazy as _
32

43
from cms.plugin_base import CMSPluginBase
54
from cms.plugin_pool import plugin_pool
@@ -58,7 +57,7 @@ class FolderPlugin(CMSPluginBase):
5857

5958
def render(self, context, instance, placeholder):
6059
context['folder_files'] = instance.get_files()
61-
return super(FolderPlugin, self).render(context, instance, placeholder)
60+
return super().render(context, instance, placeholder)
6261

6362
def get_render_template(self, context, instance, placeholder):
6463
return 'djangocms_file/{}/folder.html'.format(instance.template)

djangocms_file/migrations/0001_initial.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
from __future__ import unicode_literals
3-
41
import django.db.models.deletion
52
from django.db import migrations, models
63

djangocms_file/migrations/0002_auto_20151202_1551.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
from __future__ import unicode_literals
3-
41
from django.db import migrations, models
52

63

djangocms_file/migrations/0003_remove_related_name_for_cmsplugin_ptr.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
from __future__ import unicode_literals
3-
41
import django.db.models.deletion
52
from django.db import migrations, models
63

djangocms_file/migrations/0004_set_related_name_for_cmsplugin_ptr.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
from __future__ import unicode_literals
3-
41
import django.db.models.deletion
52
from django.db import migrations, models
63

0 commit comments

Comments
 (0)