Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
d2b3e50
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Mar 12, 2024
9b668d7
Fixed not resetting fields' unique attr
ddabble Mar 10, 2024
4d39103
[pre-commit.ci] pre-commit autoupdate (#1318)
pre-commit-ci[bot] Mar 18, 2024
da87859
Renamed admin's action_list to historical_records
ddabble Sep 28, 2023
16b7de7
Made object history list template overridable
ddabble Feb 24, 2024
18f00bd
Made admin history queryset overridable
ddabble Feb 24, 2024
dc3a34e
Added getter for admin's history_list_display
ddabble Feb 24, 2024
9d232a6
Added m2m_field_name util functions
ddabble Feb 27, 2024
28afb4d
Refactored ModelDelta + ModelChange as dataclasses
ddabble Feb 27, 2024
a5439d2
Refactored parts of diff_against()
ddabble Feb 29, 2024
a842b98
Added foreign_keys_are_objs arg to diff_against()
ddabble Mar 1, 2024
0589ac2
diff_against() returns PK wrapper for deleted objs
ddabble Mar 8, 2024
b5e627c
Added _select_related_history_tracked_objs()
ddabble Mar 8, 2024
04eefad
Added obj diff code from unittest
ddabble Mar 20, 2024
c9963aa
Added Changes column to admin history page
ddabble May 4, 2024
733f4e0
Made Bandit exclude test dirs
ddabble May 2, 2024
b8c1a0c
Merge pull request #1128 from raunaq-sailo/feat/adding-history-diff
ddabble May 6, 2024
23ef769
[pre-commit.ci] pre-commit autoupdate (#1320)
pre-commit-ci[bot] May 14, 2024
bf58d58
Fix m2m saved when simple history disabled (#1329)
MattFanto May 14, 2024
87327ce
[docs] Install project in yaml instead of reqs (#1332)
ddabble May 15, 2024
e9689f8
Fixed O(n) queries when adding M2M objects (#1333)
ddabble May 15, 2024
d428c51
Bump black from 23.12.0 to 24.4.2 in /requirements (#1339)
dependabot[bot] May 15, 2024
90dde0b
Bump flake8 from 6.1.0 to 7.0.0 in /requirements (#1335)
dependabot[bot] May 15, 2024
4863536
Bump isort from 5.12.0 to 5.13.2 in /requirements (#1336)
dependabot[bot] May 15, 2024
e6fc7ae
Bump sphinx-rtd-theme from 1.3.0 to 2.0.0 in /requirements (#1338)
dependabot[bot] May 15, 2024
b9d1e87
Bump sphinx from 7.2.6 to 7.3.7 in /requirements (#1337)
dependabot[bot] May 15, 2024
235f208
Bump mysqlclient from 2.2.0 to 2.2.4 in /requirements (#1340)
dependabot[bot] May 15, 2024
7c6ee08
Bump coverage from 7.3.2 to 7.5.1 in /requirements (#1341)
dependabot[bot] May 15, 2024
be798aa
Bump tox-gh-actions from 3.1.3 to 3.2.0 in /requirements (#1343)
dependabot[bot] May 15, 2024
af81e4f
Bump tox from 4.11.3 to 4.15.0 in /requirements (#1342)
dependabot[bot] May 15, 2024
aa2bb71
Prepare for release 3.6.0 (#1345)
ddabble May 26, 2024
3854269
Bump coverage from 7.5.1 to 7.5.2 in /requirements (#1346)
dependabot[bot] May 26, 2024
35c540e
Update package metadata
ofek May 29, 2024
560f298
Dropped support for Django 3.2 (#1344)
ddabble May 29, 2024
87a08b7
Changed docs link to stable version
ddabble May 28, 2024
cf6848c
Tweaked layout of README badges
ddabble May 28, 2024
fef00f6
Migrated setup.py -> pyproject.toml with Hatchling
ddabble May 28, 2024
19722e2
Merge branch 'ddabble/update-package-metadata' into modernize-metadata
ddabble May 29, 2024
6a8918e
Merge pull request #1348 from ofek/modernize-metadata
ddabble May 29, 2024
a4e4783
Added Django as installation dependency (#1349)
ddabble May 29, 2024
695b17f
Prepare for release 3.7.0
ddabble May 29, 2024
1fe70ab
Replaced PyPI comments in CHANGES.rst with a regex
ddabble May 29, 2024
2a2bec9
Merge pull request #1350 from jazzband/release-3.7.0
ddabble May 29, 2024
08b4de7
Make `skip_history_when_saving` work when creating a new object (#1262)
ddabble Jun 7, 2024
5c88b2e
Bump tox from 4.15.0 to 4.16.0 in /requirements
dependabot[bot] Jul 3, 2024
d7e19ab
Bump psycopg[binary] from 3.1.19 to 3.2.1 in /requirements
dependabot[bot] Jul 1, 2024
58fd88b
Bump flake8 from 7.0.0 to 7.1.0 in /requirements
dependabot[bot] Jun 17, 2024
eebf9b3
Bump coverage from 7.5.2 to 7.5.4 in /requirements
dependabot[bot] Jul 10, 2024
2571899
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 8, 2024
d8cf0b8
Improve performance of the latest_of_each method of the manager (#1360)
bagababaoglu Jul 22, 2024
4ca46a5
Bump coverage from 7.5.4 to 7.6.1 in /requirements (#1376)
dependabot[bot] Sep 10, 2024
ba0ac34
Bump black from 24.4.2 to 24.8.0 in /requirements (#1377)
dependabot[bot] Sep 10, 2024
4a8756a
Bump tox from 4.16.0 to 4.18.1 in /requirements (#1386)
dependabot[bot] Sep 10, 2024
2d8d54d
Bump flake8 from 7.1.0 to 7.1.1 in /requirements (#1378)
dependabot[bot] Sep 10, 2024
7fdebc8
[pre-commit.ci] pre-commit autoupdate (#1374)
pre-commit-ci[bot] Sep 10, 2024
4325591
HistoricOneToOneField (#1394)
JordanHyatt Nov 20, 2024
6c10248
Deferred fields patch (#1393)
JordanHyatt Nov 20, 2024
56db9d7
Bump psycopg[binary] from 3.2.1 to 3.2.3 in /requirements (#1398)
dependabot[bot] Nov 24, 2024
b906a39
Bump black from 24.8.0 to 24.10.0 in /requirements (#1405)
dependabot[bot] Nov 24, 2024
115d0f3
Bump tox from 4.18.1 to 4.23.2 in /requirements (#1416)
dependabot[bot] Nov 24, 2024
c37ba23
Bump sphinx-rtd-theme from 2.0.0 to 3.0.2 in /requirements (#1418)
dependabot[bot] Nov 24, 2024
46c8d4c
Bump sphinx from 7.3.7 to 8.1.3 in /requirements (#1409)
dependabot[bot] Nov 24, 2024
64cdeb4
Updated all djangoproject.com links to reference the stable version (…
tim-schilling Nov 24, 2024
0ec991f
Dropped support for Python 3.8
Nov 19, 2024
da4c2f2
Added support for Django 5.1
Nov 19, 2024
e0d6723
Updated pre-commit versions and applied lint changes.
Nov 19, 2024
98462de
Merge pull request #1421 from tim-schilling/version-updates
tim-schilling Nov 24, 2024
5dfeefe
History view pagination (#1277)
jurrian Nov 25, 2024
2ff3d77
Bump mysqlclient from 2.2.4 to 2.2.6 in /requirements (#1423)
dependabot[bot] Nov 28, 2024
7cd4647
Bump coverage from 7.6.1 to 7.6.8 in /requirements (#1422)
dependabot[bot] Nov 28, 2024
b890718
\#527 Fixes issue where the history button doesn't work when viewing …
trumpet2012 Oct 4, 2024
339afbf
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Dec 2, 2024
e26e399
Bump coverage from 7.6.8 to 7.6.9 in /requirements (#1427)
dependabot[bot] Dec 10, 2024
c025d4e
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jan 13, 2025
47fe4b0
Bump coverage from 7.6.9 to 7.6.10 in /requirements (#1432)
dependabot[bot] Jan 23, 2025
2a346f5
Bump mysqlclient from 2.2.6 to 2.2.7 in /requirements (#1437)
dependabot[bot] Jan 23, 2025
fae915a
Bump psycopg[binary] from 3.2.3 to 3.2.4 in /requirements (#1439)
dependabot[bot] Jan 23, 2025
5d03b6c
Bump tox from 4.23.2 to 4.24.1 in /requirements (#1440)
dependabot[bot] Jan 23, 2025
8d69847
Updated test matrix to test against Django 5.2 explicitly (#1441)
tim-schilling Jan 23, 2025
389a3a4
Prep for version 3.8 (#1442)
tim-schilling Jan 23, 2025
55850c2
Remove the deprecated `simple_history_admin_list.display_list()` + **…
ddabble Jan 26, 2025
774269c
Bump coverage from 7.6.10 to 7.6.12 in /requirements (#1454)
dependabot[bot] Feb 16, 2025
b9199a7
[pre-commit.ci] pre-commit autoupdate (#1449)
pre-commit-ci[bot] Feb 16, 2025
5fe0048
Bump flake8 from 7.1.1 to 7.1.2 in /requirements (#1456)
dependabot[bot] Mar 13, 2025
4d81cc6
Bump tox-gh-actions from 3.2.0 to 3.3.0 in /requirements (#1459)
dependabot[bot] Mar 13, 2025
0820cb4
Bump sphinx from 8.1.3 to 8.2.3 in /requirements (#1462)
dependabot[bot] Mar 13, 2025
ef7c301
[pre-commit.ci] pre-commit autoupdate (#1455)
pre-commit-ci[bot] Mar 13, 2025
cef95a5
Bump isort from 5.13.2 to 6.0.1 in /requirements (#1461)
dependabot[bot] Mar 13, 2025
4ce967e
Bump black from 24.10.0 to 25.1.0 in /requirements (#1447)
dependabot[bot] Mar 13, 2025
f69dd4f
Exclude tests from wheels (#1478)
stefan6419846 Apr 16, 2025
7e63c53
Updated changelog for #1478
ddabble Apr 16, 2025
d87408d
Bump psycopg[binary] from 3.2.4 to 3.2.6 in /requirements (#1465)
dependabot[bot] Mar 14, 2025
5ee0a12
Bump tox from 4.24.1 to 4.25.0 in /requirements (#1472)
dependabot[bot] Apr 16, 2025
df6f6ad
[pre-commit.ci] pre-commit autoupdate (#1468)
pre-commit-ci[bot] Apr 16, 2025
626ece4
Bump coverage from 7.6.12 to 7.8.0 in /requirements (#1473)
dependabot[bot] Apr 16, 2025
8101497
Bump flake8 from 7.1.2 to 7.2.0 in /requirements (#1474)
dependabot[bot] May 17, 2025
5721e31
Bump psycopg[binary] from 3.2.6 to 3.2.9 in /requirements (#1484)
dependabot[bot] May 17, 2025
010928f
Bump tox from 4.25.0 to 4.26.0 in /requirements (#1485)
dependabot[bot] May 17, 2025
8bb6175
[pre-commit.ci] pre-commit autoupdate (#1482)
pre-commit-ci[bot] May 17, 2025
7d6b50b
Bump coverage from 7.8.0 to 7.9.0 in /requirements (#1495)
dependabot[bot] Jun 13, 2025
9fb7c5c
Bump codecov/codecov-action from 3 to 5 (#1425)
dependabot[bot] Jun 13, 2025
bc9909f
Switch repo to Django Commons (#1429)
tim-schilling Jun 20, 2025
58dbb06
Prepare for release 3.10.0 (#1498)
ddabble Jun 20, 2025
dc56984
Fixed changed log syntax to support PyPI packaging. (#1499)
tim-schilling Jun 20, 2025
3d5dc30
Bump sigstore/gh-action-sigstore-python from 3.0.0 to 3.0.1 (#1500)
dependabot[bot] Jun 23, 2025
1b841d0
fix(diff_against): support diffing against deleted records
euriostigue Feb 20, 2024
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
109 changes: 85 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,102 @@
---
name: Release
name: Publish Python 🐍 distribution 📦 to PyPI

on:
push:
tags:
# Order matters, the last rule that applies to a tag
# is the one that takes effect:
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-including-and-excluding-branches-and-tags
- '*'
# There should be no dev tags created, but to be safe,
# let's not publish them.
- '!*.dev*'

env:
PYPI_URL: https://pypi.org/p/django-simple-history

jobs:

build:
if: github.repository == 'jazzband/django-simple-history'
name: Build distribution 📦
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x

- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U setuptools twine wheel

- name: Build package
run: |
python setup.py --version
python setup.py sdist --format=gztar bdist_wheel
twine check dist/*

- name: Upload packages to Jazzband
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
python-version: "3.x"
- name: Install pypa/build
run:
python3 -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: ${{ env.PYPI_URL }}
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1.12

github-release:
name: >-
Sign the Python 🐍 distribution 📦 with Sigstore
and upload them to GitHub Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest

permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
user: jazzband
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
repository_url: https://jazzband.co/projects/django-simple-history/upload
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
34 changes: 16 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,24 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13-dev']
django-version: ['3.2', '4.2', '5.0', 'main']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
django-version: ['4.2', '5.0', '5.1', '5.2', 'main']

exclude:
# Exclude py3.8 and py3.9 for Django main and 5.0
- python-version: '3.8'
django-version: '5.0'
# Exclude py3.9 for Django >= 5.0,
# and py3.10 and py3.11 for Django > 5.2
- python-version: '3.9'
django-version: '5.0'
- python-version: '3.8'
django-version: 'main'
- python-version: '3.9'
django-version: '5.1'
- python-version: '3.9'
django-version: '5.2'
- python-version: '3.9'
django-version: 'main'

# Exclude py3.11, py3.12 and py3.13 for Django 3.2
- python-version: '3.10'
django-version: 'main'
- python-version: '3.11'
django-version: '3.2'
- python-version: '3.12'
django-version: '3.2'
- python-version: '3.13-dev'
django-version: '3.2'
django-version: 'main'

services:

Expand Down Expand Up @@ -73,7 +70,7 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
setup.py
pyproject.toml
tox.ini
requirements/*.txt

Expand All @@ -89,8 +86,9 @@ jobs:
DJANGO: ${{ matrix.django-version }}

- name: Upload coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}


Expand All @@ -109,7 +107,7 @@ jobs:
- name: Set up newest stable Python version
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.13
cache: 'pip'
# Invalidate the cache when this file updates, as the dependencies' versions
# are pinned in the step below
Expand All @@ -121,7 +119,7 @@ jobs:
# Install this project in editable mode, so that its package metadata can be queried
pip install -e .
# Install the latest minor version of Django we support
pip install Django==5.0
pip install Django==5.1

- name: Check translation files are updated
run: python -m simple_history.tests.generated_file_checks.check_translations
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.idea
.tox/
.venv/
.python-version
/.project
/.pydevproject
/.ve
Expand Down
31 changes: 20 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
---
repos:
- repo: https://github.com/PyCQA/bandit
rev: 1.7.7
rev: 1.8.3
hooks:
- id: bandit
args:
- "-x *test*.py"
exclude: /.*tests/

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.2.0
rev: 25.1.0
hooks:
- id: black
language_version: python3.8
language_version: python3.9

- repo: https://github.com/pycqa/flake8
rev: 7.0.0
rev: 7.2.0
hooks:
- id: flake8
args:
- "--config=tox.ini"

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
rev: 6.0.1
hooks:
- id: isort

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: requirements-txt-fixer
files: requirements/.*\.txt$
Expand All @@ -36,18 +35,28 @@ repos:
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-toml
- id: debug-statements
- id: detect-private-key

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.5.1
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.24.1
hooks:
- id: validate-pyproject

- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
rev: v1.37.1
hooks:
- id: yamllint
args:
- "--strict"

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.1
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py39-plus]
3 changes: 3 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ sphinx:
python:
install:
- requirements: requirements/docs.txt
# Install this project locally, so that its package metadata can be queried
- method: pip
path: .
9 changes: 8 additions & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Authors
- Anton Kulikov (`bigtimecriminal <https://github.com/bigtimecriminal>`_)
- Ben Lawson (`blawson <https://github.com/blawson>`_)
- Benjamin Mampaey (`bmampaey <https://github.com/bmampaey>`_)
- Berke Agababaoglu (`bagababaoglu <https://github.com/bagababaoglu>`_)
- Bheesham Persaud (`bheesham <https://github.com/bheesham>`_)
- `bradford281 <https://github.com/bradford281>`_
- Brian Armstrong (`barm <https://github.com/barm>`_)
Expand All @@ -43,6 +44,7 @@ Authors
- Dmytro Shyshov (`xahgmah <https://github.com/xahgmah>`_)
- Edouard Richard (`vied12 <https://github.com/vied12>` _)
- Eduardo Cuducos
- Eric Uriostigue (`euriostigue <https://github.com/euriostigue>`_)
- Erik van Widenfelt (`erikvw <https://github.com/erikvw>`_)
- Fábio Capuano (`fabiocapsouza <https://github.com/fabiocapsouza`_)
- Filipe Pina (@fopina)
Expand Down Expand Up @@ -78,9 +80,11 @@ Authors
- Jonathan Loo (`alpha1d3d <https://github.com/alpha1d3d>`_)
- Jonathan Sanchez
- Jonathan Zvesper (`zvesp <https://github.com/zvesp>`_)
- Jordon Wing (`jordonwii <https://github.com/jordonwii`_)
- Jordan Hyatt (`JordanHyatt <https://github.com/JordanHyatt>`_)
- Jordon Wing (`jordonwii <https://github.com/jordonwii>`_)
- Josh Fyne
- Josh Thomas (`joshuadavidthomas <https://github.com/joshuadavidthomas>`_)
- Jurrian Tromp (`jurrian <https://github.com/jurrian>`_)
- Keith Hackbarth
- Kevin Foster
- Kira (`kiraware <https://github.com/kiraware>`_)
Expand Down Expand Up @@ -109,6 +113,7 @@ Authors
- Nianpeng Li
- Nick Träger
- Noel James (`NoelJames <https://github.com/NoelJames>`_)
- Ofek Lev (`ofek <https://github.com/ofek>`_)
- Phillip Marshall
- Prakash Venkatraman (`dopatraman <https://github.com/dopatraman>`_)
- Rajesh Pappula
Expand Down Expand Up @@ -141,6 +146,8 @@ Authors
- `ddusi <https://github.com/ddusi>`_
- `DanialErfanian <https://github.com/DanialErfanian>`_
- `Sridhar Marella <https://github.com/sridhar562345>`_
- `Mattia Fantoni <https://github.com/MattFanto>`_
- `Trent Holliday <https://github.com/trumpet2012>`_

Background
==========
Expand Down
Loading