Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
django_mptt.egg-info/ | H | 03-May-2022 | - | 137 | 102 | |
docs/ | H | 27-Sep-2021 | - | 2,253 | 1,458 | |
mptt/ | H | 27-Sep-2021 | - | 6,985 | 5,563 | |
INSTALL | H A D | 18-Jan-2020 | 493 | 17 | 11 | |
LICENSE | H A D | 18-Jan-2020 | 1.1 KiB | 22 | 17 | |
MANIFEST.in | H A D | 18-Jan-2020 | 290 | 12 | 11 | |
NOTES | H A D | 18-Jan-2020 | 18.6 KiB | 515 | 425 | |
PKG-INFO | H A D | 27-Sep-2021 | 5.7 KiB | 137 | 102 | |
README.rst | H A D | 20-Aug-2021 | 3.8 KiB | 108 | 74 | |
setup.cfg | H A D | 27-Sep-2021 | 1.5 KiB | 72 | 63 | |
setup.py | H A D | 20-Aug-2021 | 62 | 6 | 2 |
README.rst
1========================================== 2**This project is currently unmaintained** 3========================================== 4 5Alternatives to django-mptt include: 6 7* `django-treebeard <https://pypi.org/project/django-treebeard/>`_ includes a MPTT 8 implementation (called nested set) 9* Maybe you do not need MPTT, especially when using newer databases. See 10 `django-tree-queries <https://github.com/matthiask/django-tree-queries>`_ for an 11 implementation using recursive Common Table Expressions (CTE). See the 12 `announcement blog post <https://406.ch/writing/django-tree-queries/>`__. 13 14 15=========== 16django-mptt 17=========== 18 19Utilities for implementing Modified Preorder Tree Traversal with your 20Django Models and working with trees of Model instances. 21 22.. image:: https://secure.travis-ci.org/django-mptt/django-mptt.svg?branch=master 23 :alt: Build Status 24 :target: https://travis-ci.org/django-mptt/django-mptt 25 26Project home: https://github.com/django-mptt/django-mptt/ 27 28Documentation: https://django-mptt.readthedocs.io/ 29 30Discussion group: https://groups.google.com/forum/#!forum/django-mptt-dev 31 32What is Modified Preorder Tree Traversal? 33========================================= 34 35MPTT is a technique for storing hierarchical data in a database. The aim is to 36make retrieval operations very efficient. 37 38The trade-off for this efficiency is that performing inserts and moving 39items around the tree is more involved, as there's some extra work 40required to keep the tree structure in a good state at all times. 41 42Here are a few articles about MPTT to whet your appetite and provide 43details about how the technique itself works: 44 45* `Trees in SQL`_ 46* `Storing Hierarchical Data in a Database`_ 47* `Managing Hierarchical Data in MySQL`_ 48 49.. _`Trees in SQL`: https://www.ibase.ru/files/articles/programming/dbmstrees/sqltrees.html 50.. _`Storing Hierarchical Data in a Database`: https://www.sitepoint.com/hierarchical-data-database/ 51.. _`Managing Hierarchical Data in MySQL`: http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/ 52 53What is ``django-mptt``? 54======================== 55 56``django-mptt`` is a reusable Django app which aims to make it easy for you 57to use MPTT with your own Django models. 58 59It takes care of the details of managing a database table as a tree 60structure and provides tools for working with trees of model instances. 61 62Requirements 63------------ 64 65* Python 3.6+ 66* A supported version of Django (currently 2.2+) 67 68Feature overview 69---------------- 70 71* Simple registration of models - fields required for tree structure will be 72 added automatically. 73 74* The tree structure is automatically updated when you create or delete 75 model instances, or change an instance's parent. 76 77* Each level of the tree is automatically sorted by a field (or fields) of your 78 choice. 79 80* New model methods are added to each registered model for: 81 82 * changing position in the tree 83 * retrieving ancestors, siblings, descendants 84 * counting descendants 85 * other tree-related operations 86 87* A ``TreeManager`` manager is added to all registered models. This provides 88 methods to: 89 90 * move nodes around a tree, or into a different tree 91 * insert a node anywhere in a tree 92 * rebuild the MPTT fields for the tree (useful when you do bulk updates 93 outside of django) 94 95* `Form fields`_ for tree models. 96 97* `Utility functions`_ for tree models. 98 99* `Template tags and filters`_ for rendering trees. 100 101* `Admin classes`_ for visualizing and modifying trees in Django's administration 102 interface. 103 104.. _`Form fields`: https://django-mptt.readthedocs.io/en/latest/forms.html 105.. _`Utility functions`: https://django-mptt.readthedocs.io/en/latest/utilities.html 106.. _`Template tags and filters`: https://django-mptt.readthedocs.io/en/latest/templates.html 107.. _`Admin classes`: https://django-mptt.readthedocs.io/en/latest/admin.html 108