Skip to content

Commit 3201e02

Browse files
salman2013Salman Nawaz
and
Salman Nawaz
authored
Django 4.2 support (#290)
* fix: django 4.2 upgrade --------- Co-authored-by: Salman Nawaz <[email protected]>
1 parent 6971155 commit 3201e02

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
matrix:
1717
os: [ubuntu-20.04]
1818
python-version: ['3.8']
19-
toxenv: [quality, docs, django32-drflatest, django40-drflatest]
19+
toxenv: [quality, docs, django32-drflatest, django42-drflatest]
2020
steps:
2121
- uses: actions/checkout@v3
2222
- name: setup python
@@ -36,7 +36,7 @@ jobs:
3636
run: tox
3737

3838
- name: Run Coverage
39-
if: matrix.python-version == '3.8' && matrix.toxenv=='django32-drflatest'
39+
if: matrix.python-version == '3.8' && matrix.toxenv=='django42-drflatest'
4040
uses: codecov/codecov-action@v3
4141
with:
4242
files: htmlcov/index.html

config_models/__init__.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22
Configuration models for Django allowing config management with auditing.
33
"""
44

5-
__version__ = '2.3.0'
6-
7-
default_app_config = 'config_models.apps.ConfigModelsConfig' # pylint: disable=invalid-name
5+
__version__ = '2.4.0'

config_models/admin.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,13 @@ def add_view(self, request, form_url='', extra_context=None):
199199
# with the value of the latest config, which doesn't make sense for keyed models.
200200
return super(ConfigurationModelAdmin, self).add_view(request, form_url, extra_context)
201201

202+
@admin.display(
203+
description=_('Update')
204+
)
202205
def edit_link(self, inst):
203206
""" Edit link for the change view """
204207
if not inst.is_active:
205208
return '--'
206209
update_url = reverse(f'admin:{self.model._meta.app_label}_{self.model._meta.model_name}_add')
207210
update_url += f"?source={inst.pk}"
208211
return format_html('<a href="{}">{}</a>', update_url, _('Update'))
209-
edit_link.short_description = _('Update')

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def is_requirement(line):
118118
'Development Status :: 3 - Alpha',
119119
'Framework :: Django',
120120
'Framework :: Django :: 3.2',
121-
'Framework :: Django :: 4.0',
121+
'Framework :: Django :: 4.2',
122122
'Intended Audience :: Developers',
123123
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
124124
'Natural Language :: English',

tox.ini

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py38-django{32,40}-drf{latest},quality,docs
2+
envlist = py38-django{32,42}-drf{latest},quality,docs
33

44
[pycodestyle]
55
exclude = .git,.tox,migrations
@@ -19,7 +19,7 @@ setenv =
1919
DJANGO_SETTINGS_MODULE = test_settings
2020
deps =
2121
django32: Django>=3.2,<4.0
22-
django40: Django>=4.0,<4.1
22+
django42: Django>=4.2,<4.3
2323
drflatest: djangorestframework
2424
-r{toxinidir}/requirements/test.txt
2525
commands =
@@ -58,3 +58,4 @@ commands =
5858
pylint tests
5959
pycodestyle config_models tests
6060
make help
61+

0 commit comments

Comments
 (0)