qmetrics.net

Django MPTT

Modified preorder tree traversal for Django models

DatabasesFrameworks & PlatformsNo longer maintainedDesktop/CLI app

Django MPTT is no longer maintained. The project says: “========================================== This project is currently unmaintained ==========================================” source Look at the maintained alternatives below before choosing it.

Django MPTT screenshot

Reusable Django app that stores hierarchical model data using MPTT fields for fast reads. Adds tree managers, model helpers, forms, templates, and admin tools.

Overview

django-mptt implements Modified Preorder Tree Traversal for Django models that need parent-child hierarchies. The approach precomputes left, right, level, and tree identifiers on each row so ancestry and descendant queries stay efficient at read time.

Registering a model adds the needed tree columns automatically and keeps structure consistent on create, delete, and parent changes. Levels can sort by configurable fields. Instance methods cover ancestors, siblings, descendants, repositioning, and related tree operations.

A TreeManager supports moving nodes, inserting anywhere in a tree, switching trees, and rebuild when bulk updates happen outside the app. Form fields, utility helpers, template tags, and admin classes help render and edit trees in standard Django UIs.

Writes and moves update many rows, so concurrent writes, bulk SQL, and external database changes can corrupt stored tree metadata; rebuild can recover but rewrites all rows. The maintainers note the package is kept on a best-effort basis with compatibility fixes but no new features, and suggest recursive CTE alternatives such as django-tree-queries for new designs where appropriate.

Key features

  • Automatic MPTT model registration
  • Tree structure maintenance on saves
  • Ancestor and descendant queries
  • TreeManager move and insert
  • rebuild for bulk repair
  • Tree form fields
  • Template tags for trees
  • Admin tree visualization

Use cases

  • Category hierarchies
  • Nested comment threads
  • Organizational charts in Django
  • Menu or taxonomy models

Similar software

Supabase

Open-source Postgres platform with auth, APIs, and storage

Supabase bundles a dedicated Postgres database with authentication, auto-generated REST and GraphQL APIs, realtime, functions, file storage, and vector tooling.

★ 115.6k⟳ todayApache-2.0
Open Source Alternative to:FirebaseFirebase Realtime Database

GORM

Feature-rich ORM library for Go applications

GORM maps Go structs to SQL databases with migrations, associations, hooks, and a fluent query API. It targets developer-friendly access patterns for common CRUD and relationship modeling.

★ 40k⟳ 1 month agoMIT
Frameworks & PlatformsDesktop/CLI app

TypeORM

TypeScript and JavaScript ORM for many SQL and NoSQL databases

TypeORM maps objects to relational and document databases from Node.js, browsers, and mobile shells. It supports TypeScript and JavaScript with both Data Mapper and Active Record styles.

★ 36.7k⟳ 3 days agoMIT
Frameworks & PlatformsDesktop/CLI app

MyBatis 3

Java SQL mapper with XML or annotation config

MyBatis links Java objects to SQL and stored procedures via XML or annotations. It trims repetitive JDBC parameter and result handling.

★ 20.4k⟳ yesterdayApache-2.0

Node Redis

High-performance Redis client for Node.js

node-redis connects Node.js applications to Redis with typed commands, clustering, pub/sub, transactions, and optional client-side caching.

★ 17.6k⟳ yesterdayMIT
Frameworks & PlatformsDesktop/CLI app

MyBatis-Plus

Enhanced MyBatis toolkit for Java database access

MyBatis-Plus extends MyBatis with code generation, conditional query builders, and pagination helpers. It stays compatible with MyBatis while adding convenience APIs for common CRUD work.

★ 17.5k⟳ todayApache-2.0
Frameworks & PlatformsDesktop/CLI app