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

Django 5.0 support #383

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
7 changes: 3 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,16 @@ jobs:
uses: actions/setup-python@v3
- name: Install Dependencies
run: |
npm ci --also=dev
python -m pip install --upgrade pip
python -m pip install build --user
npm ci --include=dev
pip install build --user
- name: Build Client
run: |
npm run build
npm run minify
- name: Patch templates
run: |
mkdir -p adminsortable2/templates/adminsortable2/edit_inline
DJANGO_VERSIONS=("4.0" "4.1" "4.2")
DJANGO_VERSIONS=("4.0" "4.1" "4.2", "5.0")
for django_version in ${DJANGO_VERSIONS[@]}; do
echo $django_version
curl --silent --output adminsortable2/templates/adminsortable2/edit_inline/stacked-django-$django_version.html https://raw.githubusercontent.com/django/django/stable/$django_version.x/django/contrib/admin/templates/admin/edit_inline/stacked.html
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,34 @@ jobs:

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
node-version: ["16.x"]
django-version: ["4.0.*", "4.1.*", "4.2.*"]
django-version: ["4.0.*", "4.1.*", "4.2.*", "5.0.*"]
exclude: # https://docs.djangoproject.com/en/4.2/faq/install/#what-python-version-can-i-use-with-django
- python-version: "3.8"
django-version: "5.0.*"
- python-version: "3.9"
django-version: "5.0.*"
- python-version: "3.11"
django-version: "4.0.*"
- python-version: "3.12"
django-version: "4.0.*"
- python-version: "3.12"
django-version: "4.1.*"

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
npm ci --also=dev
npm ci --include=dev
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel
python -m pip install "Django==${{ matrix.django-version }}"
python -m pip install -r testapp/requirements.txt
python -m playwright install
Expand All @@ -49,7 +60,7 @@ jobs:
- name: Patch templates
run: |
mkdir -p adminsortable2/templates/adminsortable2/edit_inline
DJANGO_VERSIONS=("4.0" "4.1" "4.2")
DJANGO_VERSIONS=("4.0" "4.1" "4.2" "5.0")
for django_version in ${DJANGO_VERSIONS[@]}; do
echo $django_version
curl --silent --output adminsortable2/templates/adminsortable2/edit_inline/stacked-django-$django_version.html https://raw.githubusercontent.com/django/django/stable/$django_version.x/django/contrib/admin/templates/admin/edit_inline/stacked.html
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Release history of [django-admin-sortable2](https://github.com/jrief/django-admin-sortable2/)

### 2.1.11
- Add support for Django 5.0

### 2.1.10
- Do not create sourcemaps in production build.

Expand Down
6 changes: 3 additions & 3 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ compiler:

git clone https://github.com/jrief/django-admin-sortable2.git
cd django-admin-sortable2
npm install --also=dev
npm install
npm run build

# and optionally for a minimized version
Expand Down Expand Up @@ -53,7 +53,7 @@ version of NodeJS.

git clone https://github.com/jrief/django-admin-sortable2.git
cd django-admin-sortable2
npm install --include=dev
npm install
npm run build
npm run minify
python -m pip install Django
Expand Down Expand Up @@ -104,7 +104,7 @@ Follow these steps to run all unit- and end-to-end tests.

git clone https://github.com/jrief/django-admin-sortable2.git
cd django-admin-sortable2
npm install --include=dev
npm install
npm run build
python -m pip install Django
python -m pip install -r testapp/requirements.txt
Expand Down
137 changes: 98 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ def readfile(filename):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.12',
'Framework :: Django',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
'Framework :: Django :: 4.2',
'Framework :: Django :: 5.0',
]


Expand Down
6 changes: 3 additions & 3 deletions testapp/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ charset-normalizer==2.0.12
jinja2
idna==3.3
iniconfig==2.0.0
greenlet==2.0.1
greenlet==3.0.0
packaging==21.3
playwright==1.31.1
playwright==1.39.0
pluggy==1.0.0
py==1.11.0
pyee==9.0.4
pyee==11.0.1
pyparsing==3.0.9
pytest==7.2.2
pytest-base-url==2.0.0
Expand Down
Loading