django-modeltree
TODO
Decision gist · record as of 2026-08-14
Yes, if your Django project has complex model relationships and you want to reduce query boilerplate—the low install friction and permissive license make it a low-risk addition. However, the aging maintenance status (last commit 2026-01-29, only 3 stars) suggests limited community support; verify that it meets your specific use case and that you're comfortable with potential delays in Django version compatibility updates.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Django and anytree as runtime dependencies; Django version support spans 2.2 through 6.0.
- Low install friction with a pure-Python wheel.
- Maintenance status is aging—last commit was 2026-01-29 and the package has only 3 GitHub stars, suggesting limited community adoption and potential for delayed updates.
License · maintenance · safety
BSD License (permissive) — BSD License (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
last release 2026-01-15 (211 days) · last repo commit 2026-01-29 · 3 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 85,686 downloads/mo, #13,905 on PyPI
Alternatives
Verify before relying
pip install django-modeltree
from django_modeltree import ModelTree
# Build a modeltree to navigate model relationships
tree = ModelTree(YourModel)- Whether the package handles circular relationships or complex many-to-many scenarios without performance degradation.
- Specific performance characteristics compared to standard Django ORM queries for large model hierarchies.
- Whether the package is actively maintained or if the aging status indicates it may not support future Django versions.
What it is and what it does
django-modeltree is a Django utility that simplifies navigation of model relationships by building a tree structure from your model layout. Instead of writing complex queries to traverse related models, you define the tree once and access related objects and their data through an elegant interface. It wraps Django's ORM and anytree to provide a more intuitive way to work with interconnected models.
The package targets developers working with Django projects that have intricate model relationships. It aims to reduce boilerplate query code and make relationship traversal more readable. With support for Django 2.2 through 6.0 and Python 3.7 through 3.13, it covers a wide range of modern Django deployments, though the aging maintenance status and low adoption suggest it may not receive timely updates for new Django releases.
Use it for
- Navigate multi-level model relationships in a Django admin or API without writing nested select_related or prefetch_related chains.
- Build a tree representation of a hierarchical model structure (e.g., organizational units, category taxonomies) for efficient traversal.
- Simplify access to related objects when building reports or exports that require data from multiple connected models.
- Reduce ORM query complexity in views or serializers that need to fetch and display related model data.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if your Django project has complex model relationships and you want to reduce query boilerplate—the low install friction and permissive license make it a low-risk addition.
However, the aging maintenance status (last commit 2026-01-29, only 3 stars) suggests limited community support; verify that it meets your specific use case and that you're comfortable with potential delays in Django version compatibility updates.
Install
django-modeltree on PyPI
Before you install
Low install friction with a pure-Python wheel. Maintenance status is aging—last commit was 2026-01-29 and the package has only 3 GitHub stars, suggesting limited community adoption and potential for delayed updates.
Requires Django and anytree as runtime dependencies; Django version support spans 2.2 through 6.0.
License in practice
BSD License (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install django-modeltree
from django_modeltree import ModelTree
# Build a modeltree to navigate model relationships
tree = ModelTree(YourModel)
Verify before relying
- Whether the package handles circular relationships or complex many-to-many scenarios without performance degradation.
- Specific performance characteristics compared to standard Django ORM queries for large model hierarchies.
- Whether the package is actively maintained or if the aging status indicates it may not support future Django versions.
Package facts
| License | BSD License permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesDjangoanytree |
| Maintenance | Aging 211 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 85,686 / month, #13,905 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 2.2Framework :: Django :: 3.0Framework :: Django :: 3.1Framework :: Django :: 3.2Framework :: Django :: 4.0Framework :: Django :: 4.1Framework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software DevelopmentTopic :: Software Development :: Libraries :: Application Frameworks |
Evidence: django_modeltree-1.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “django model relationships navigation”
- django-modeltreeProvides a simplified interface for navigating Django model…
- django-tree-queriesQuery hierarchical tree structures in Django models using recursive…
- django-reverse-adminAdds reverse inline support to Django admin for OneToOneField and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also nutree · django-reverse-admin · django-peeringdb · django-diagram · django-click · simple-icd-10-cm · django-nonrelated-inlines · drf-writable-nested · rest-framework-generic-relations · django-countries