Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python 3.11 and Django 4.2 #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
django-version: "4.0"
- python-version: "3.10"
django-version: "4.1"
- python-version: "3.11"
django-version: "4.2"
- grappelli: "1"
name-suffix: " + grappelli"
python-version: "3.7"
Expand Down
1 change: 1 addition & 0 deletions nested_admin/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
See https://github.com/django/django/commit/c19b56f633e172b3c02094cbe12d28865ee57772
and https://code.djangoproject.com/ticket/28377
"""

from collections import defaultdict, OrderedDict
import warnings

Expand Down
10 changes: 6 additions & 4 deletions nested_admin/nested.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,11 @@ def inline_formset_data(self):
"lookupAutocomplete": getattr(
self.opts, "autocomplete_lookup_fields", {}
),
"formsetFkName": self.formset.fk.name
if getattr(self.formset, "fk", None)
else "",
"formsetFkName": (
self.formset.fk.name
if getattr(self.formset, "fk", None)
else ""
),
"formsetFkModel": formset_fk_model,
"nestingLevel": getattr(self.formset, "nesting_depth", 0),
"fieldNames": {
Expand Down Expand Up @@ -542,7 +544,7 @@ def get_formset(self, request, obj=None, **kwargs):

if self.sortable_field_name:

class FormSet(BaseFormSet):
class FormSet(BaseFormSet): # noqa: F811
sortable_field_name = self.sortable_field_name

kwargs["formset"] = FormSet
Expand Down
4 changes: 2 additions & 2 deletions nested_admin/polymorphic.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def get_formset(self, request, obj=None, **kwargs):

if self.sortable_field_name:

class FormSet(BaseFormSet):
class FormSet(BaseFormSet): # noqa: F811
sortable_field_name = self.sortable_field_name

kwargs["formset"] = FormSet
Expand Down Expand Up @@ -190,7 +190,7 @@ def get_formset(self, request, obj=None, **kwargs):

if self.sortable_field_name:

class FormSet(BaseFormSet):
class FormSet(BaseFormSet): # noqa: F811
sortable_field_name = self.sortable_field_name

kwargs["formset"] = FormSet
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
],
include_package_data=True,
zip_safe=False,
Expand Down
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ envlist =
py{36,37,38,39,310}-dj32-{grp,nogrp}
py{38,39,310}-dj40-{grp,nogrp}
py{38,39,310}-dj41-nogrp
py{38,39,310,311}-dj42-nogrp
black,flake8
skipsdist=True

Expand Down Expand Up @@ -79,13 +80,15 @@ python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311

[gh-actions:env]
DJANGO =
2.2: dj22
3.2: dj32
4.0: dj40
4.1: dj41
4.2: dj42
GRAPPELLI =
0: nogrp
1: grp
Loading