Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: crccheck/django-object-actions
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.8.1
Choose a base ref
...
head repository: crccheck/django-object-actions
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 1,696 additions and 734 deletions.
  1. +0 −12 .coveragerc
  2. +1 −1 .dockerignore
  3. +51 −0 .github/workflows/ci.yml
  4. +18 −0 .github/workflows/conventional-pr.yml
  5. +47 −0 .github/workflows/release.yml
  6. +7 −9 .gitignore
  7. +0 −31 .travis.yml
  8. +577 −20 CHANGELOG.md
  9. +4 −0 CONTRIBUTING.md
  10. +2 −1 Dockerfile
  11. +1 −1 LICENSE
  12. +0 −3 MANIFEST.in
  13. +32 −36 Makefile
  14. +267 −0 README.md
  15. +0 −220 README.rst
  16. +0 −1 VERSION
  17. +10 −2 django_object_actions/__init__.py
  18. +2 −0 django_object_actions/models.py
  19. +22 −0 django_object_actions/templates/django_object_actions/action_trigger.html
  20. +2 −8 django_object_actions/templates/django_object_actions/change_form.html
  21. +2 −8 django_object_actions/templates/django_object_actions/change_list.html
  22. +1 −4 django_object_actions/tests/__init__.py
  23. +77 −27 django_object_actions/tests/test_admin.py
  24. +16 −0 django_object_actions/tests/test_urls.py
  25. +75 −38 django_object_actions/tests/test_utils.py
  26. +30 −20 django_object_actions/tests/tests.py
  27. +126 −58 django_object_actions/utils.py
  28. +78 −52 example_project/polls/admin.py
  29. +30 −17 example_project/polls/factories.py
  30. +37 −21 example_project/polls/migrations/0001_initial.py
  31. +36 −0 example_project/polls/migrations/0002_auto_20200805_0239.py
  32. +19 −10 example_project/polls/models.py
  33. +41 −37 example_project/settings.py
  34. +5 −27 example_project/urls.py
  35. +80 −0 pyproject.toml
  36. +0 −5 requirements.txt
  37. +0 −5 setup.cfg
  38. +0 −31 setup.py
  39. +0 −29 tox.ini
12 changes: 0 additions & 12 deletions .coveragerc

This file was deleted.

2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@
.coverage

.env
.tox/
*.db
*.sqlite


build/
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
pull_request:
push:
branches:
- main

jobs:
prepare:
runs-on: ubuntu-latest
steps:
- name: Create matrix
id: create_matrix
uses: fabiocaccamo/create-matrix-action@v5
with:
matrix: |
python-version {3.9}, django-version {4.2}
python-version {3.10}, django-version {4.2,5.0,5.1,5.2}
python-version {3.11}, django-version {4.2,5.0,5.1,5.2}
python-version {3.12}, django-version {4.2,5.0,5.1,5.2}
python-version {3.13}, django-version {5.1,5.2}
outputs:
matrix: ${{ steps.create_matrix.outputs.matrix }}

test:
needs: prepare
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.prepare.outputs.matrix) }}
name: "Python ${{ matrix.python-version }} + Django ${{ matrix.django-version }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install -e '.[dev]'
- run: pip install "Django==${{ matrix.django-version }}.*"
- run: make test

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- run: pip install -e '.[dev]'
- run: make lint
18 changes: 18 additions & 0 deletions .github/workflows/conventional-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: conventional-pr
on:
pull_request:
types:
- opened
- edited
- synchronize
branches:
- main
jobs:
lint-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# check for the most recent release: https://github.com/CondeNast/conventional-pull-request-action/releases
- uses: CondeNast/conventional-pull-request-action@v0.1.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# https://python-semantic-release.readthedocs.io/en/latest/automatic-releases/github-actions.html#examples
name: Release

on:
workflow_dispatch:
# Disabled to be able to roll multiple breaking releases into one release
# push:
# branches:
# - main

jobs:
release:
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
contents: write

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
fetch-depth: 0
persist-credentials: false
- name: Setup | Force release branch to be at workflow sha
run: |
git reset --hard ${{ github.sha }}
- name: Action | Python Semantic Release
id: release
# https://github.com/python-semantic-release/python-semantic-release/releases
# https://python-semantic-release.readthedocs.io/en/latest/github-action.html
uses: python-semantic-release/python-semantic-release@v9.21.0
with:
github_token: ${{ secrets.BOT_GITHUB_TOKEN }}

- name: Publish | Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
# See https://github.com/actions/runner/issues/1173
if: steps.release.outputs.released == 'true'

- name: Publish | Upload to GitHub Release Assets
uses: python-semantic-release/publish-action@v9.21.0
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.BOT_GITHUB_TOKEN }}
tag: ${{ steps.release.outputs.tag }}
16 changes: 7 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
media

*.log
*.pot
*.pyc
__pycache__
.DS_Store
.coverage
.sass-cache


.env
.tox/
*.db
*.sqlite
.venv
.idea

# Private files
.env


# build
MANIFEST
build/*
dist/*
*.egg-info

31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

Loading