--- id: django-modeltree version: "1.0.0" license: BSD License license_treatment: permissive maintenance: aging --- # django-modeltree — TODO License: permissive · Maintenance: aging · Downloads: 85.7K/mo ## 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 above — verify before relying. Provides a simplified interface for navigating Django model relationships and accessing related objects without complex query building. 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 pip install django-modeltree uv add django-modeltree poetry add django-modeltree ## Installing django-modeltree 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. 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) Requires Django and anytree as runtime dependencies; Django version support spans 2.2 through 6.0. 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: unspecified - Install friction: low - Maintenance: aging - Downloads: 85.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django model relationships navigation, django model tree traversal, django related objects access, django query simplification, django model hierarchy, django orm relationship helper, django model graph navigation, django-orm, model-relationships [View on SkillFed](https://skillfed.io/packages/django-modeltree) · [View on PyPI](https://pypi.org/project/django-modeltree/)