Skip to content

Commit

Permalink
feat: add django 4.2 support (#7481)
Browse files Browse the repository at this point in the history
* revert: test change done earlier

* feat: add django 4.2a1 to requirements and to the CI

* fix: typo in the test.yml file

* fix: update django to the stable

* feat: some more updates to get the CI running

* fix: two lint related issues

* fix: update compatibility matrix to include django 4.2 support
  • Loading branch information
vinitkumar committed Apr 10, 2023
1 parent 9e33167 commit 89a42dd
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 21 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
django-3.2.txt,
django-4.0.txt,
django-4.1.txt,
django-4.2.txt,
]
os: [
ubuntu-20.04,
Expand Down Expand Up @@ -73,14 +74,15 @@ jobs:
django-3.2.txt,
django-4.0.txt,
django-4.1.txt,
django-4.2.txt,
]
os: [
ubuntu-20.04,
]

services:
mysql:
image: mysql:5.7
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: djangocms_test
Expand All @@ -93,6 +95,7 @@ jobs:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}


uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -126,6 +129,7 @@ jobs:
django-3.2.txt,
django-4.0.txt,
django-4.1.txt,
django-4.2.txt,
]
os: [
ubuntu-20.04,
Expand Down
3 changes: 0 additions & 3 deletions cms/admin/pageadmin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import copy
import json
import re
import sys
Expand Down Expand Up @@ -258,8 +257,6 @@ def duplicate(self, request, object_id):
if page is None:
raise self._get_404_exception(object_id)

request = copy.copy(request)

if request.method == 'GET':
# source is a field in the form
# because its value is in the url,
Expand Down
1 change: 1 addition & 0 deletions cms/tests/test_no_i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def test_url_redirect(self):
)
homepage.set_as_homepage()
response = self.client.get('/', follow=False)
self.assertEqual(response.status_code, 302) # Needs to redirect
self.assertTrue(response['Location'].endswith("/foobar/"))

def test_plugin_add_edit(self):
Expand Down
33 changes: 17 additions & 16 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,22 +157,23 @@ by a long-term support policy.
** indicates that the version has been tested and works. *×* indicates that it has not been tested, or
is known to be incompatible.

=========== ==== ==== === === === === === === === === === === === === === ====
django CMS Python Django
----------- ----------------------------- ------------------------------------
\ 3.11 3.10 3.9 3.8 3.7 3.6 3.5 4.1 4.0 3.2 3.1 3.0 2.2 2.1 2.0 1.11
=========== ==== ==== === === === === === === === === === === === === === ====
4.1.x ✓ ✓ ✓ ✓ ✓ × × ✓ ✓ ✓ ✓ ✓ ✓ × × ×
3.11.1 ✓ ✓ ✓ ✓ ✓ × × ✓ ✓ LTS × × × × × ×
3.11.0 ✓ ✓ ✓ ✓ ✓ × × × ✓ ✓ × × × × × ×
3.10.x × ✓ ✓ ✓ ✓ × × × × ✓ ✓ ✓ ✓ × × ×
3.9.x × × ✓ ✓ ✓ ✓ × × × ✓ ✓ ✓ ✓ × × ×
3.8.x × × ✓ ✓ ✓ ✓ × × × × ✓ ✓ LTS × × ×
3.7.x × × ✓ ✓ ✓ ✓ ✓ × × × × ✓ LTS ✓ ✓ LTS
3.6.x × × × ✓ ✓ ✓ ✓ × × × × × ✓ ✓ ✓ ✓
3.5.x × × × ✓ ✓ ✓ ✓ × × × × × × × × ✓
3.4.5 × × × × ✓ ✓ ✓ × × × × × × × × LTS
=========== ==== ==== === === === === === === === === === === === === === ====
=========== ==== ==== === === === === === === === === === === === === === === ====
django CMS Python Django
----------- ----------------------------- ----------------------------------------
\ 3.11 3.10 3.9 3.8 3.7 3.6 3.5 4.2 4.1 4.0 3.2 3.1 3.0 2.2 2.1 2.0 1.11
=========== ==== ==== === === === === === === === === === === === === === === ====
4.1.x ✓ ✓ ✓ ✓ ✓ × × ✓ ✓ ✓ ✓ ✓ ✓ ✓ × × ×
3.11.2 ✓ ✓ ✓ ✓ ✓ × × LTS ✓ ✓ LTS × × × × × ×
3.11.1 ✓ ✓ ✓ ✓ ✓ × × × ✓ ✓ LTS × × × × × ×
3.11.0 ✓ ✓ ✓ ✓ ✓ × × × × ✓ ✓ × × × × × ×
3.10.x × ✓ ✓ ✓ ✓ × × × × × ✓ ✓ ✓ ✓ × × ×
3.9.x × × ✓ ✓ ✓ ✓ × × × × ✓ ✓ ✓ ✓ × × ×
3.8.x × × ✓ ✓ ✓ ✓ × × × × × ✓ ✓ LTS × × ×
3.7.x × × ✓ ✓ ✓ ✓ ✓ × × × × × ✓ LTS ✓ ✓ LTS
3.6.x × × × ✓ ✓ ✓ ✓ × × × × × × ✓ ✓ ✓ ✓
3.5.x × × × ✓ ✓ ✓ ✓ × × × × × × × × × ✓
3.4.5 × × × × ✓ ✓ ✓ × × × × × × × × × LTS
=========== ==== ==== === === === === === === === === === === === === === === ====


.. _Python: https://www.python.org
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
Expand All @@ -35,6 +34,7 @@
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
'Framework :: Django :: 4.2',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development',
Expand Down
5 changes: 5 additions & 0 deletions test_requirements/django-4.2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

-r requirements_base.txt
Django==4.2
django-formtools==2.2
pyenchant==3.0.1

0 comments on commit 89a42dd

Please sign in to comment.