Skip to content

Commit

Permalink
v3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GitRon committed Apr 11, 2024
1 parent 1bffa86 commit 6f8f1a8
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .ambient-package-update/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def get_dynamic_city_field(self, data):
Now the package should be available in your virtual environment
and any changes should be directly visible.
Alternatively, simply copy the directory `dynamic_admin_forms`
Alternatively, copy the directory `dynamic_admin_forms`
into any normal django project, so that the python interpreter
finds the local version instead of the installed (old) version.
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.12"

Expand All @@ -28,7 +28,7 @@ jobs:
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', ]
django-version: ['32', '41', '42', '50', ]
django-version: ['42', '50', ]

exclude:
- python-version: '3.12'
Expand All @@ -45,7 +45,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
Expand All @@ -67,7 +67,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'

Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
rev: v0.3.5
hooks:
# Run the Ruff linter.
- id: ruff
Expand All @@ -12,15 +12,15 @@ repos:
- id: ruff-format

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.2
hooks:
- id: pyupgrade
args: [ --py38-plus ]
stages: [ push ]

- repo: https://github.com/adamchainz/django-upgrade
rev: 1.15.0
rev: 1.16.0
hooks:
- id: django-upgrade
args: [--target-version, "3.2"]
args: [--target-version, "4.2"]
stages: [ push ]
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

**3.0.0**
* Dropped Django 3.2 & 4.1 support (via `ambient-package-update`)
* Internal updates via `ambient-package-update`

**2.2.1**

- Fixed security issue with URL not being wrapped in `admin_view`
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ outerHTML of the correct HTML elements to update the form.
For local development, create a virtual environment
in the `testproj` folder:
```shell
$ cd testapp
$ cd testproj
$ python3 -m venv .venv
$ source .venv/bin/activate
$ cd ..
$ pip install -e .
$ flit install --symlink
```
Now the package should be available in your virtual environment
and any changes should be directly visible. Run the project as a Django server and navigate to the admin page.
and any changes should be directly visible.

Alternatively, copy the directory `dynamic_admin_forms`
into any normal django project, so that the python interpreter
Expand All @@ -133,7 +133,7 @@ finds the local version instead of the installed (old) version.

To run end-to-end tests locally:
```shell
$ cd testapp
$ cd testproj
$ python manage.py runserver 0.0.0.0:8000 & # start server
$ python manage.py loaddata fixtures/fixtures-dev.json
$ cd ../e2e
Expand Down
2 changes: 1 addition & 1 deletion django_dynamic_admin_forms/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Add simple dynamic interaction to the otherwise static django admin."""

__version__ = "2.2.1"
__version__ = "3.0.0"
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
# -- Project information -----------------------------------------------------

project = "django-dynamic-admin-forms"
copyright = "2023, Ambient Innovation: GmbH" # noqa: A001
copyright = "2024, Ambient Innovation: GmbH" # noqa: A001
author = "Ambient Innovation: GmbH <[email protected]>"
version = __version__
release = __version__
Expand Down
1 change: 1 addition & 0 deletions manage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""

import os
import sys

Expand Down
27 changes: 15 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
Expand Down Expand Up @@ -46,12 +44,12 @@ dev = [
'coverage~=7.3',
'pre-commit~=3.5',
'ruff~=0.1.7',
'sphinx==4.2.0',
'sphinx-rtd-theme==1.0.0',
'm2r2==0.3.1',
'sphinx~=7.1',
'sphinx-rtd-theme~=2.0',
'm2r2==0.3.3.post2',
'mistune<2.0.0',
'flit~=3.9',
'ambient-package-update~=23.12.4',
'ambient-package-update~=24.4.4',
'unittest-parametrize~=1.4',
]

Expand All @@ -66,7 +64,7 @@ name = "django_dynamic_admin_forms"
'Changelog' = 'https://django-dynamic-admin-forms.readthedocs.io/en/latest/features/changelog.html'

[tool.ruff]
select = [
lint.select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
Expand All @@ -88,11 +86,11 @@ select = [
"PGH", # No all-purpose "# noqa" and eval validation
"PL", # PyLint
]
ignore = [
lint.ignore = [
]

# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = [
lint.fixable = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
Expand All @@ -114,7 +112,7 @@ fixable = [
"PGH", # No all-purpose "# noqa" and eval validation
"PL", # PyLint
]
unfixable = []
lint.unfixable = []

exclude = [
".bzr",
Expand Down Expand Up @@ -171,8 +169,6 @@ isolated_build = True
[testenv]
# Django deprecation overview: https://www.djangoproject.com/download/
deps =
django32: Django==3.2.*
django41: Django==4.1.*
django42: Django==4.2.*
django50: Django==5.0.*
extras = dev,
Expand All @@ -187,3 +183,10 @@ python =
3.11: py311
3.12: py312
"""

[tool.pytest.ini_options]
python_files = [
"tests.py",
"test_*.py",
"*_tests.py",
]
2 changes: 0 additions & 2 deletions pytest.init

This file was deleted.

1 change: 1 addition & 0 deletions testapp/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""

from django.contrib import admin
from django.urls import include, path

Expand Down

0 comments on commit 6f8f1a8

Please sign in to comment.