django-mptt


Namedjango-mptt JSON
Version 0.16.0 PyPI version JSON
download
home_pageNone
SummaryUtilities for implementing Modified Preorder Tree Traversal with your Django Models and working with trees of Model instances.
upload_time2024-01-16 15:29:25
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT-License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ==========================================
**This project is currently unmaintained**
==========================================

Alternatives to django-mptt include:

* `django-treebeard <https://pypi.org/project/django-treebeard/>`_ includes a MPTT
  implementation (called a nested set), but the state of maintenance is unclear.
* Maybe you do not need MPTT, especially when using newer databases. See
  `django-tree-queries <https://github.com/matthiask/django-tree-queries>`_ for an
  implementation using recursive Common Table Expressions (CTE). See the
  `announcement blog post <https://406.ch/writing/django-tree-queries/>`__.


===========
django-mptt
===========

Utilities for implementing Modified Preorder Tree Traversal with your
Django Models and working with trees of Model instances.

.. image:: https://secure.travis-ci.org/django-mptt/django-mptt.svg?branch=master
    :alt: Build Status
    :target: https://travis-ci.org/django-mptt/django-mptt

Project home: https://github.com/django-mptt/django-mptt/

Documentation: https://django-mptt.readthedocs.io/

Discussion group: https://groups.google.com/forum/#!forum/django-mptt-dev

What is Modified Preorder Tree Traversal?
=========================================

MPTT is a technique for storing hierarchical data in a database. The aim is to
make retrieval operations very efficient.

The trade-off for this efficiency is that performing inserts and moving
items around the tree are more involved, as there's some extra work
required to keep the tree structure in a good state at all times.

Here are a few articles about MPTT to whet your appetite and provide
details about how the technique itself works:

* `Trees in SQL`_
* `Storing Hierarchical Data in a Database`_
* `Managing Hierarchical Data in MySQL`_

.. _`Trees in SQL`: https://www.ibase.ru/files/articles/programming/dbmstrees/sqltrees.html
.. _`Storing Hierarchical Data in a Database`: https://www.sitepoint.com/hierarchical-data-database/
.. _`Managing Hierarchical Data in MySQL`: http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/

What is ``django-mptt``?
========================

``django-mptt`` is a reusable Django app that aims to make it easy for you
to use MPTT with your own Django models.

It takes care of the details of managing a database table as a tree
structure and provides tools for working with trees of model instances.

Requirements
------------

* A supported version of Python: https://devguide.python.org/versions/#supported-versions
* A supported version of Django: https://www.djangoproject.com/download/#supported-versions

Feature overview
----------------

* Simple registration of models - fields required for tree structure will be
  added automatically.

* The tree structure is automatically updated when you create or delete
  model instances, or change an instance's parent.

* Each level of the tree is automatically sorted by a field (or fields) of your
  choice.

* New model methods are added to each registered model for:

  * changing position in the tree
  * retrieving ancestors, siblings, descendants
  * counting descendants
  * other tree-related operations

* A ``TreeManager`` manager is added to all registered models. This provides
  methods to:

  * move nodes around a tree, or into a different tree
  * insert a node anywhere in a tree
  * rebuild the MPTT fields for the tree (useful when you do bulk updates
    outside of Django)

* `Form fields`_ for tree models.

* `Utility functions`_ for tree models.

* `Template tags and filters`_ for rendering trees.

* `Admin classes`_ for visualizing and modifying trees in Django's administration
  interface.

.. _`Form fields`: https://django-mptt.readthedocs.io/en/latest/forms.html
.. _`Utility functions`: https://django-mptt.readthedocs.io/en/latest/utilities.html
.. _`Template tags and filters`: https://django-mptt.readthedocs.io/en/latest/templates.html
.. _`Admin classes`: https://django-mptt.readthedocs.io/en/latest/admin.html

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-mptt",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Craig de Stigter <craig.ds@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/06/58/11dcda841c5570cecab15d52362096e36bf61c0a7013df903e9747bc6a6c/django_mptt-0.16.0.tar.gz",
    "platform": null,
    "description": "==========================================\n**This project is currently unmaintained**\n==========================================\n\nAlternatives to django-mptt include:\n\n* `django-treebeard <https://pypi.org/project/django-treebeard/>`_ includes a MPTT\n  implementation (called a nested set), but the state of maintenance is unclear.\n* Maybe you do not need MPTT, especially when using newer databases. See\n  `django-tree-queries <https://github.com/matthiask/django-tree-queries>`_ for an\n  implementation using recursive Common Table Expressions (CTE). See the\n  `announcement blog post <https://406.ch/writing/django-tree-queries/>`__.\n\n\n===========\ndjango-mptt\n===========\n\nUtilities for implementing Modified Preorder Tree Traversal with your\nDjango Models and working with trees of Model instances.\n\n.. image:: https://secure.travis-ci.org/django-mptt/django-mptt.svg?branch=master\n    :alt: Build Status\n    :target: https://travis-ci.org/django-mptt/django-mptt\n\nProject home: https://github.com/django-mptt/django-mptt/\n\nDocumentation: https://django-mptt.readthedocs.io/\n\nDiscussion group: https://groups.google.com/forum/#!forum/django-mptt-dev\n\nWhat is Modified Preorder Tree Traversal?\n=========================================\n\nMPTT is a technique for storing hierarchical data in a database. The aim is to\nmake retrieval operations very efficient.\n\nThe trade-off for this efficiency is that performing inserts and moving\nitems around the tree are more involved, as there's some extra work\nrequired to keep the tree structure in a good state at all times.\n\nHere are a few articles about MPTT to whet your appetite and provide\ndetails about how the technique itself works:\n\n* `Trees in SQL`_\n* `Storing Hierarchical Data in a Database`_\n* `Managing Hierarchical Data in MySQL`_\n\n.. _`Trees in SQL`: https://www.ibase.ru/files/articles/programming/dbmstrees/sqltrees.html\n.. _`Storing Hierarchical Data in a Database`: https://www.sitepoint.com/hierarchical-data-database/\n.. _`Managing Hierarchical Data in MySQL`: http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/\n\nWhat is ``django-mptt``?\n========================\n\n``django-mptt`` is a reusable Django app that aims to make it easy for you\nto use MPTT with your own Django models.\n\nIt takes care of the details of managing a database table as a tree\nstructure and provides tools for working with trees of model instances.\n\nRequirements\n------------\n\n* A supported version of Python: https://devguide.python.org/versions/#supported-versions\n* A supported version of Django: https://www.djangoproject.com/download/#supported-versions\n\nFeature overview\n----------------\n\n* Simple registration of models - fields required for tree structure will be\n  added automatically.\n\n* The tree structure is automatically updated when you create or delete\n  model instances, or change an instance's parent.\n\n* Each level of the tree is automatically sorted by a field (or fields) of your\n  choice.\n\n* New model methods are added to each registered model for:\n\n  * changing position in the tree\n  * retrieving ancestors, siblings, descendants\n  * counting descendants\n  * other tree-related operations\n\n* A ``TreeManager`` manager is added to all registered models. This provides\n  methods to:\n\n  * move nodes around a tree, or into a different tree\n  * insert a node anywhere in a tree\n  * rebuild the MPTT fields for the tree (useful when you do bulk updates\n    outside of Django)\n\n* `Form fields`_ for tree models.\n\n* `Utility functions`_ for tree models.\n\n* `Template tags and filters`_ for rendering trees.\n\n* `Admin classes`_ for visualizing and modifying trees in Django's administration\n  interface.\n\n.. _`Form fields`: https://django-mptt.readthedocs.io/en/latest/forms.html\n.. _`Utility functions`: https://django-mptt.readthedocs.io/en/latest/utilities.html\n.. _`Template tags and filters`: https://django-mptt.readthedocs.io/en/latest/templates.html\n.. _`Admin classes`: https://django-mptt.readthedocs.io/en/latest/admin.html\n",
    "bugtrack_url": null,
    "license": "MIT-License",
    "summary": "Utilities for implementing Modified Preorder Tree Traversal with your Django Models and working with trees of Model instances.",
    "version": "0.16.0",
    "project_urls": {
        "Homepage": "https://github.com/django-mptt/django-mptt/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "452761a39b0d716e52be2df7d9fed6e35fe10eb3faaf207cdfaac3f9f68ecb1a",
                "md5": "e3bbac697a6db12c2f60cfa675003adb",
                "sha256": "8716849ba3318d94e2e100ed0923a05c1ffdf8195f8472b690dbaf737d2af3b5"
            },
            "downloads": -1,
            "filename": "django_mptt-0.16.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e3bbac697a6db12c2f60cfa675003adb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 115934,
            "upload_time": "2024-01-16T15:29:27",
            "upload_time_iso_8601": "2024-01-16T15:29:27.762930Z",
            "url": "https://files.pythonhosted.org/packages/45/27/61a39b0d716e52be2df7d9fed6e35fe10eb3faaf207cdfaac3f9f68ecb1a/django_mptt-0.16.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "065811dcda841c5570cecab15d52362096e36bf61c0a7013df903e9747bc6a6c",
                "md5": "172c787dbfadab59bc4f7c0a81a774b0",
                "sha256": "56c9606bf0b329b5f5afd55dd8bfd073612ea1d5999b10903b09de62bee84c8e"
            },
            "downloads": -1,
            "filename": "django_mptt-0.16.0.tar.gz",
            "has_sig": false,
            "md5_digest": "172c787dbfadab59bc4f7c0a81a774b0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 69886,
            "upload_time": "2024-01-16T15:29:25",
            "upload_time_iso_8601": "2024-01-16T15:29:25.507798Z",
            "url": "https://files.pythonhosted.org/packages/06/58/11dcda841c5570cecab15d52362096e36bf61c0a7013df903e9747bc6a6c/django_mptt-0.16.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-16 15:29:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "django-mptt",
    "github_project": "django-mptt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "django-mptt"
}
        
Elapsed time: 0.21266s