Skip to content

Commit

Permalink
Django upgrade 4.2 (#318)
Browse files Browse the repository at this point in the history
* fix: django 4.2 upgrade

---------

Co-authored-by: Salman Nawaz <[email protected]>
  • Loading branch information
salman2013 and Salman Nawaz authored Jul 20, 2023
1 parent 52f70bf commit 494b9c0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [django32, django40, quality]
toxenv: [django32, django40, django42, quality]

steps:
- uses: actions/checkout@v2
Expand All @@ -36,7 +36,7 @@ jobs:
run: tox

- name: Run Coverage
if: matrix.python-version == '3.8' && matrix.toxenv=='django32'
if: matrix.python-version == '3.8' && matrix.toxenv=='django42'
uses: codecov/codecov-action@v1
with:
flags: unittests
Expand Down
2 changes: 1 addition & 1 deletion organizations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""
edx-organizations app initialization module
"""
__version__ = '6.11.1' # pragma: no cover
__version__ = '6.12.0' # pragma: no cover
9 changes: 6 additions & 3 deletions organizations/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ def get_actions(self, request):

return actions

@admin.action(
description=_('Activate selected entries')
)
def activate_selected(self, request, queryset):
""" Activate the selected entries. """
count = queryset.count()
Expand All @@ -41,6 +44,9 @@ def activate_selected(self, request, queryset):
self.message_user(request, message)
self.message_user(request, self.HISTORY_DISCLAIMER, level=messages.WARNING)

@admin.action(
description=_('Deactivate selected entries')
)
def deactivate_selected(self, request, queryset):
""" Deactivate the selected entries. """
count = queryset.count()
Expand All @@ -55,9 +61,6 @@ def deactivate_selected(self, request, queryset):
self.message_user(request, message)
self.message_user(request, self.HISTORY_DISCLAIMER, level=messages.WARNING)

deactivate_selected.short_description = _('Deactivate selected entries')
activate_selected.short_description = _('Activate selected entries')


@admin.register(Organization)
class OrganizationAdmin(ActivateDeactivateAdminMixin, admin.ModelAdmin):
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def get_version(*file_paths):
'Framework :: Django',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.2',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-django{32,40}, quality
envlist = py38-django{32,40,42}, quality

[testenv]
setenv =
Expand All @@ -8,13 +8,14 @@ setenv =
deps =
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
django42: Django>=4.2,<4.3
-rtest-requirements.txt
commands =
python -Wd -m pytest {posargs}
coverage report

[testenv:quality]
setenv =
setenv =
PYTHONPATH = {toxinidir}
deps =
Django>=3.2,<4.0
Expand Down

0 comments on commit 494b9c0

Please sign in to comment.