Skip to main content

Django Admin Anchors

PyPI PyPI - Python Version PyPI - Django Version Downloads Codecov License

Turn Django admin list display items into clickable links to related objects using decorators.

Clicking admin anchors will redirect to a filtered changelist view showing the related objects. This allows you to get a quick overview and run actions on the filtered objects.

Installation

pip install django-admin-anchors

Usage

Take a look at the tests/project directory to see a runnable example project.

Object list page (light mode) Object list page (dark mode)

from django.contrib import admin
from admin_anchors import admin_anchor
from yourapp.models import Team


@admin.register(Team)
class TeamAdmin(admin.ModelAdmin):
    list_display = ["__str__", "captain_link", "captains_profile_link", "members_link"]

    @admin_anchor("captain")
    def captain_link(self, instance):
        return str(instance.captain)

    @admin_anchor("captain.profile")
    def captains_profile_link(self, instance):
        return "Captains profile"

    @admin_anchor("members")
    def members_link(self, instance):
        return f"{instance.members.count()} members"

Object change page (light mode) Object change page (dark mode)

from django.contrib import admin
from admin_anchors import admin_anchor
from yourapp.models import Player


@admin.register(Player)
class PlayerAdmin(admin.ModelAdmin):
    readonly_fields = ["profile_link"]

    @admin_anchor("profile")
    def profile_link(self, instance):
        return "Profile"

Example project

Take a look at our Django example project under tests/project. You can run it by executing these commands:

  1. uv sync
  2. uv run tests/project/manage.py migrate
  3. uv run tests/project/manage.py createsuperuser
  4. uv run tests/project/manage.py runserver

Metadata

Release files for django-admin-anchors 5.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-admin-anchors 5.1.0
File Size Uploaded Provenance Actions
django_admin_anchors-5.1.0.tar.gz 4.7 kB With provenance Details for django_admin_anchors-5.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-admin-anchors 5.1.0
File Interpreter ABI Platform Actions
django_admin_anchors-5.1.0-py3-none-any.whl Python 3 none any Details for django_admin_anchors-5.1.0-py3-none-any.whl

Total release size: 10.3 kB

Release files / django_admin_anchors-5.1.0.tar.gz

Download URL django_admin_anchors-5.1.0.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
71492061c3308284436bb52c0fbae3f9a34bc1fbd0a15858986daa4478cec2f6
BLAKE2b-256 checksum
How to use checksums
547aa3b0d5927aa04e2032fa07b8ee897186b229f5c5635a44a391c3b18eb57f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / django_admin_anchors-5.1.0-py3-none-any.whl

Download URL django_admin_anchors-5.1.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7c614a0ca2d52e4be481f3e5a45eb72ddaba5f634ba17e1210750609a41a322
BLAKE2b-256 checksum
How to use checksums
3d5765acc0b1339c25fc19e021250aaeae35ce7a1a5efa905a049aa324ef70ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for django-admin-anchors 5.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_admin_anchors-5.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page