Skip to content
Merged
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
194 changes: 99 additions & 95 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,95 +1,99 @@
name: tests

on:
push:
branches: [main]
paths-ignore:
- "README.md"
pull_request:
paths-ignore:
- "README.md"
branches: [main]

jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# supporting Python 3.10-3.12
- python-version: "3.10"
django-version: "4.2"
- python-version: "3.11"
django-version: "4.2"
- python-version: "3.12"
django-version: "4.2"
- python-version: "3.13"
django-version: "4.2"

- python-version: "3.10"
django-version: "5.0"
- python-version: "3.11"
django-version: "5.0"
- python-version: "3.12"
django-version: "5.0"
- python-version: "3.13"
django-version: "5.0"

- python-version: "3.10"
django-version: "5.1"
- python-version: "3.11"
django-version: "5.1"
- python-version: "3.12"
django-version: "5.1"
- python-version: "3.13"
django-version: "5.1"

- python-version: "3.10"
django-version: "5.2"
- python-version: "3.11"
django-version: "5.2"
- python-version: "3.12"
django-version: "5.2"
- python-version: "3.13"
django-version: "5.2"

steps:
- uses: actions/checkout@v4

- name: Install UV
uses: astral-sh/setup-uv@v5
with:
version: "0.6.5"
python-version: ${{ matrix.python-version }}
enable-cache: true

- name: Create venv and install dependencies
run: |
uv venv
uv pip install "django==${{ matrix.django-version }}"
uv sync --all-extras --dev

- name: Run Tests
run: uv run python manage.py test -v 2

# lint:
# name: Lint Code
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4

# - name: Install UV
# uses: astral-sh/setup-uv@v5
# with:
# version: "0.6.5"
# python-version: "3.12"
# enable-cache: true

# - name: Create venv and install dependencies
# run: |
# uv venv

# - name: Run Ruff
# run: uv run ruff check .
name: tests

on:
push:
branches: [main]
paths-ignore:
- "*.md"
- "docs/**"
- ".github/release-drafter.yml"
pull_request:
branches: [main]
paths-ignore:
- "*.md"
- "docs/**"
- ".github/release-drafter.yml"

jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# supporting Python 3.10-3.12
- python-version: "3.10"
django-version: "4.2"
- python-version: "3.11"
django-version: "4.2"
- python-version: "3.12"
django-version: "4.2"
- python-version: "3.13"
django-version: "4.2"

- python-version: "3.10"
django-version: "5.0"
- python-version: "3.11"
django-version: "5.0"
- python-version: "3.12"
django-version: "5.0"
- python-version: "3.13"
django-version: "5.0"

- python-version: "3.10"
django-version: "5.1"
- python-version: "3.11"
django-version: "5.1"
- python-version: "3.12"
django-version: "5.1"
- python-version: "3.13"
django-version: "5.1"

- python-version: "3.10"
django-version: "5.2"
- python-version: "3.11"
django-version: "5.2"
- python-version: "3.12"
django-version: "5.2"
- python-version: "3.13"
django-version: "5.2"

steps:
- uses: actions/checkout@v4

- name: Install UV
uses: astral-sh/setup-uv@v5
with:
version: "0.6.5"
python-version: ${{ matrix.python-version }}
enable-cache: true

- name: Create venv and install dependencies
run: |
uv venv
uv pip install "django==${{ matrix.django-version }}"
uv sync --all-extras --dev

- name: Run Tests
run: uv run python manage.py test -v 2

# lint:
# name: Lint Code
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4

# - name: Install UV
# uses: astral-sh/setup-uv@v5
# with:
# version: "0.6.5"
# python-version: "3.12"
# enable-cache: true

# - name: Create venv and install dependencies
# run: |
# uv venv

# - name: Run Ruff
# run: uv run ruff check .
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,10 @@ Mixin knobs:
## Recipes and docs

- [Quickstart](https://tnware.github.io/django-admin-reversefields/quickstart.html)
- [Core concepts](https://tnware.github.io/django-admin-reversefields/core-concepts.html)
- [Permissions](https://tnware.github.io/django-admin-reversefields/permissions-guide.html)
- [Architecture](https://tnware.github.io/django-admin-reversefields/architecture.html)
- [Concepts & Architecture](https://tnware.github.io/django-admin-reversefields/concepts.html)
- [Configuration](https://tnware.github.io/django-admin-reversefields/configuration.html)
- [Recipes](https://tnware.github.io/django-admin-reversefields/recipes.html)
- [Caveats](https://tnware.github.io/django-admin-reversefields/caveats.html)
- [Rendering & Visibility](https://tnware.github.io/django-admin-reversefields/rendering.html)

---

Expand Down
105 changes: 0 additions & 105 deletions docs/architecture.rst

This file was deleted.

14 changes: 7 additions & 7 deletions docs/caveats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Caveats

This page highlights operational edge-cases and limitations that are easy to
overlook while following the happy-path guides (:doc:`quickstart`,
:doc:`recipes`). Use it alongside :doc:`data-integrity` and
:doc:`permissions-guide` when planning production roll-outs.
:doc:`recipes`). Use it alongside :doc:`concepts` and
:doc:`configuration` when planning production roll-outs.

.. contents:: Page contents
:local:
Expand All @@ -25,7 +25,7 @@ ForeignKey requirements
.. seealso::

The persistence order (unbind before bind) is documented in
:doc:`data-integrity`.
:doc:`concepts`.

Transactional behaviour
-----------------------
Expand Down Expand Up @@ -55,10 +55,10 @@ Display customisation
The default widgets mirror the Django admin look-and-feel. Override
``ReverseRelationConfig.widget`` to plug in custom widgets (e.g. Unfold, DAL) or
see the :doc:`advanced` gallery for end-to-end examples. For request-aware
choice limiting, revisit :doc:`querysets-and-widgets`.
choice limiting, revisit :doc:`configuration`.

For how fields are included in the form and when they are visible vs. disabled,
see :doc:`rendering`.
see :doc:`configuration`.

Permission interplay
--------------------
Expand All @@ -70,14 +70,14 @@ Permission interplay
Denied fields are ignored during save (including hidden/disabled fields), so
crafted POSTs cannot sidestep the check. The render-time behaviour is controlled by
:attr:`~django_admin_reversefields.mixins.ReverseRelationAdminMixin.reverse_permission_mode`
(``"disable"`` or ``"hide"``). Refer back to :doc:`permissions-guide` for the
(``"disable"`` or ``"hide"``). Refer back to :doc:`configuration` for the
evaluation flow and error-message precedence.

By default, the render gate consults only a base/global permission. To let
per-field/global policies influence visibility/editability, set
``reverse_render_uses_field_policy=True`` on the admin.

See :doc:`rendering` for the end-to-end visibility and editability flow.
See :doc:`configuration` for the end-to-end visibility and editability flow.

One-to-one specifics
--------------------
Expand Down
Loading
Loading