• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

django_mptt.egg-info/H03-May-2022-137102

docs/H27-Sep-2021-2,2531,458

mptt/H27-Sep-2021-6,9855,563

INSTALLH A D18-Jan-2020493 1711

LICENSEH A D18-Jan-20201.1 KiB2217

MANIFEST.inH A D18-Jan-2020290 1211

NOTESH A D18-Jan-202018.6 KiB515425

PKG-INFOH A D27-Sep-20215.7 KiB137102

README.rstH A D20-Aug-20213.8 KiB10874

setup.cfgH A D27-Sep-20211.5 KiB7263

setup.pyH A D20-Aug-202162 62

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