django-fast-treenode 3.0.2__tar.gz → 3.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {django_fast_treenode-3.0.2/django_fast_treenode.egg-info → django_fast_treenode-3.0.3}/PKG-INFO +23 -24
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/README.md +22 -23
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3/django_fast_treenode.egg-info}/PKG-INFO +23 -24
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/about.md +1 -1
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/index.md +3 -3
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/migration.md +4 -4
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/roadmap.md +2 -6
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/pyproject.toml +1 -1
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/setup.py +1 -1
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/admin/admin.py +1 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/AUTHORS.txt +384 -384
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/LICENSE.txt +43 -43
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/external/jquery/jquery.js +10716 -10716
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/index.html +297 -297
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/jquery-ui.css +438 -438
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/jquery-ui.js +5222 -5222
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/jquery-ui.min.css +6 -6
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/jquery-ui.min.js +5 -5
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/jquery-ui.structure.css +16 -16
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/jquery-ui.structure.min.css +4 -4
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/jquery-ui.theme.css +439 -439
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/jquery-ui.theme.min.css +4 -4
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/package.json +82 -82
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/version.py +2 -2
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/LICENSE +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/MANIFEST.in +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/django_fast_treenode.egg-info/SOURCES.txt +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/django_fast_treenode.egg-info/dependency_links.txt +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/django_fast_treenode.egg-info/requires.txt +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/django_fast_treenode.egg-info/top_level.txt +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/.gitignore +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/.nojekyll +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/admin.md +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/api.md +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/apifirst.md +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/cache.md +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/customization.md +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/dnd.md +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/import_export.md +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/insert-after.jpg +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/insert-as-child.jpg +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/installation.md +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/models.md +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/requirements.txt +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/docs/using.md +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/setup.cfg +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/tests/test_suite.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/__init__.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/admin/__init__.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/admin/changelist.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/admin/exporter.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/admin/importer.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/admin/mixin.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/apps.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/cache.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/forms.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/managers/__init__.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/managers/managers.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/managers/queries.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/managers/tasks.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/models/__init__.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/models/decorators.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/models/factory.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/models/mixins/__init__.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/models/mixins/ancestors.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/models/mixins/children.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/models/mixins/descendants.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/models/mixins/family.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/models/mixins/logical.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/models/mixins/node.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/models/mixins/properties.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/models/mixins/roots.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/models/mixins/siblings.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/models/mixins/tree.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/models/mixins/update.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/models/models.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/settings.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/signals.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/.gitkeep +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/css/.gitkeep +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/css/tree_widget.css +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/css/treenode_admin.css +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/css/treenode_tabs.css +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/js/.gitkeep +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/js/lz-string.min.js +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/js/tree_widget.js +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/js/treenode_admin.js +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/images/ui-icons_444444_256x240.png +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/images/ui-icons_555555_256x240.png +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/images/ui-icons_777620_256x240.png +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/images/ui-icons_777777_256x240.png +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/images/ui-icons_cc0000_256x240.png +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/static/vendors/jquery-ui/images/ui-icons_ffffff_256x240.png +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/templates/.gitkeep +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/templates/admin/.gitkeep +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/templates/admin/treenode_ajax_rows.html +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/templates/admin/treenode_changelist.html +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/templates/admin/treenode_import_export.html +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/templates/admin/treenode_rows.html +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/templates/widgets/tree_widget.html +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/tests.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/urls.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/utils/__init__.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/utils/db/__init__.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/utils/db/compiler.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/utils/db/db_vendor.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/utils/db/service.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/utils/db/sqlcompat.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/utils/db/sqlquery.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/views/__init__.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/views/autoapi.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/views/autocomplete.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/views/children.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/views/common.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/views/crud.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/views/search.py +0 -0
- {django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3}/treenode/widgets.py +0 -0
{django_fast_treenode-3.0.2/django_fast_treenode.egg-info → django_fast_treenode-3.0.3}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: django-fast-treenode
|
3
|
-
Version: 3.0.
|
3
|
+
Version: 3.0.3
|
4
4
|
Summary: Treenode Framework for supporting tree (hierarchical) data structure in Django projects
|
5
5
|
Home-page: https://django-fast-treenode.readthedocs.io/
|
6
6
|
Author: Timur Kady
|
@@ -62,16 +62,16 @@ Dynamic: home-page
|
|
62
62
|
Dynamic: license-file
|
63
63
|
Dynamic: requires-python
|
64
64
|
|
65
|
-
#
|
65
|
+
# Treenode Framework
|
66
66
|
**A hybrid open-source framework for working with trees in Django**
|
67
67
|
|
68
68
|
[](https://github.com/TimurKady/django-fast-treenode/actions/workflows/test.yaml)
|
69
69
|
[](https://django-fast-treenode.readthedocs.io/)
|
70
|
-
[](https://pypi.org/project/django-fast-
|
70
|
+
[](https://pypi.org/project/django-fast-Treenode/)
|
71
71
|
[](https://djangopackages.org/packages/p/django-fast-treenode/)
|
72
72
|
[](https://github.com/sponsors/TimurKady)
|
73
73
|
|
74
|
-
## About The
|
74
|
+
## About The Treenode Framework
|
75
75
|
### Overview
|
76
76
|
|
77
77
|
**Treenode Framework** is an advanced tree management system for Django applications.It is designed to handle large-scale, deeply nested, and highly dynamic tree structures while maintaining excellent performance, data integrity, and ease of use.
|
@@ -87,7 +87,7 @@ Its core philosophy: **maximum scalability, minimum complexity**.
|
|
87
87
|
|
88
88
|
### Key Features
|
89
89
|
#### Common operations
|
90
|
-
The `django-fast-
|
90
|
+
The `django-fast-Treenode` package supports all the basic operations needed to work with tree structures:
|
91
91
|
|
92
92
|
- Extracting **ancestors** (queryset, list, pks, count);
|
93
93
|
- Extracting **children** (queryset, list, pks, count);
|
@@ -118,10 +118,10 @@ Typical applications include:
|
|
118
118
|
|
119
119
|
In all these domains, scalable and fast tree management is not a luxury — it's a necessity.
|
120
120
|
|
121
|
-
### Why
|
121
|
+
### Why Treenode Framework?
|
122
122
|
At the moment, django-fast-treeenode is, if not the best, then one of the best packages for working with tree data under Djangjo.
|
123
123
|
|
124
|
-
- **High performance**: [tests show](docs/about.md#benchmark-tests) that on trees of 5k-10k nodes with a nesting depth of 500-600 levels, **Treenode Framework** (`django-fast-
|
124
|
+
- **High performance**: [tests show](docs/about.md#benchmark-tests) that on trees of 5k-10k nodes with a nesting depth of 500-600 levels, **Treenode Framework** (`django-fast-Treenode`) shows **performance 4-7 times better** than the main popular packages.
|
125
125
|
- **Flexible API**: today contains the widest set of methods for working with a tree in comparison with other packages.
|
126
126
|
- **Convenient administration**: the admin panel interface was developed taking into account the experience of using other packages. It provides convenience and intuitiveness with ease of programming.
|
127
127
|
- **Scalability**: **Treenode Framework** suitable for solving simple problems such as menus, directories, parsing arithmetic expressions, as well as complex problems such as program optimization, image layout, multi-step decision making problems, or machine learning..
|
@@ -134,7 +134,7 @@ To get started quickly, you need to follow these steps:
|
|
134
134
|
|
135
135
|
- Simply install the package via `pip`:
|
136
136
|
```sh
|
137
|
-
pip install django-fast-
|
137
|
+
pip install django-fast-Treenode
|
138
138
|
```
|
139
139
|
- Once installed, add `'treenode'` to your `INSTALLED_APPS` in **settings.py**:
|
140
140
|
```python {title="settings.py"}
|
@@ -147,9 +147,9 @@ To get started quickly, you need to follow these steps:
|
|
147
147
|
|
148
148
|
- Open **models.py** and create your own tree class:
|
149
149
|
```
|
150
|
-
from
|
150
|
+
from Treenode.models import TreenodeModel
|
151
151
|
|
152
|
-
class MyTree(
|
152
|
+
class MyTree(TreenodeModel):
|
153
153
|
name = models.CharField(max_length=255)
|
154
154
|
display_field = "name"
|
155
155
|
```
|
@@ -157,11 +157,11 @@ To get started quickly, you need to follow these steps:
|
|
157
157
|
- Open **admin.py** and create a model for the admin panel
|
158
158
|
```
|
159
159
|
from django.contrib import admin
|
160
|
-
from
|
161
|
-
from .models import
|
160
|
+
from Treenode.admin import TreenodeModelAdmin
|
161
|
+
from .models import MyTree
|
162
162
|
|
163
|
-
@admin.register(
|
164
|
-
class
|
163
|
+
@admin.register(MyTree)
|
164
|
+
class MyTreeAdmin(TreenodeModelAdmin):
|
165
165
|
list_display = ("name",)
|
166
166
|
search_fields = ("name",)
|
167
167
|
```
|
@@ -176,25 +176,24 @@ To get started quickly, you need to follow these steps:
|
|
176
176
|
```sh
|
177
177
|
python manage.py runserver
|
178
178
|
```
|
179
|
-
|
180
179
|
Everything is ready, enjoy 🎉!
|
181
180
|
|
182
181
|
## Documentation
|
183
|
-
Full documentation is available at **[ReadTheDocs](https://django-fast-
|
182
|
+
Full documentation is available at **[ReadTheDocs](https://django-fast-Treenode.readthedocs.io/)**.
|
184
183
|
|
185
184
|
Quick access links:
|
186
|
-
* [Installation, configuration and fine tuning](https://django-fast-
|
187
|
-
* [Model Inheritance and Extensions](https://django-fast-
|
188
|
-
* [Working with Admin Classes](https://django-fast-
|
189
|
-
* [API Reference](https://django-fast-
|
190
|
-
* [Import & Export](https://django-fast-
|
191
|
-
* [Caching and working with cache](https://django-fast-
|
192
|
-
* [Migration and upgrade guide](https://django-fast-
|
185
|
+
* [Installation, configuration and fine tuning](https://django-fast-Treenode.readthedocs.io/installation/)
|
186
|
+
* [Model Inheritance and Extensions](https://django-fast-Treenode.readthedocs.io/models/)
|
187
|
+
* [Working with Admin Classes](https://django-fast-Treenode.readthedocs.io/admin/)
|
188
|
+
* [API Reference](https://django-fast-Treenode.readthedocs.io/api/)
|
189
|
+
* [Import & Export](https://django-fast-Treenode.readthedocs.io/import_export/)
|
190
|
+
* [Caching and working with cache](https://django-fast-Treenode.readthedocs.io/cache/)
|
191
|
+
* [Migration and upgrade guide](https://django-fast-Treenode.readthedocs.io/migration/)
|
193
192
|
|
194
193
|
Your wishes, objections, comments are welcome.
|
195
194
|
|
196
195
|
## License
|
197
|
-
Released under [MIT License](https://github.com/TimurKady/django-fast-
|
196
|
+
Released under [MIT License](https://github.com/TimurKady/django-fast-Treenode/blob/main/LICENSE).
|
198
197
|
|
199
198
|
## Credits
|
200
199
|
Thanks to everyone who contributed to the development and testing of this package, as well as the Django community for their inspiration and support.
|
@@ -1,13 +1,13 @@
|
|
1
|
-
#
|
1
|
+
# Treenode Framework
|
2
2
|
**A hybrid open-source framework for working with trees in Django**
|
3
3
|
|
4
4
|
[](https://github.com/TimurKady/django-fast-treenode/actions/workflows/test.yaml)
|
5
5
|
[](https://django-fast-treenode.readthedocs.io/)
|
6
|
-
[](https://pypi.org/project/django-fast-
|
6
|
+
[](https://pypi.org/project/django-fast-Treenode/)
|
7
7
|
[](https://djangopackages.org/packages/p/django-fast-treenode/)
|
8
8
|
[](https://github.com/sponsors/TimurKady)
|
9
9
|
|
10
|
-
## About The
|
10
|
+
## About The Treenode Framework
|
11
11
|
### Overview
|
12
12
|
|
13
13
|
**Treenode Framework** is an advanced tree management system for Django applications.It is designed to handle large-scale, deeply nested, and highly dynamic tree structures while maintaining excellent performance, data integrity, and ease of use.
|
@@ -23,7 +23,7 @@ Its core philosophy: **maximum scalability, minimum complexity**.
|
|
23
23
|
|
24
24
|
### Key Features
|
25
25
|
#### Common operations
|
26
|
-
The `django-fast-
|
26
|
+
The `django-fast-Treenode` package supports all the basic operations needed to work with tree structures:
|
27
27
|
|
28
28
|
- Extracting **ancestors** (queryset, list, pks, count);
|
29
29
|
- Extracting **children** (queryset, list, pks, count);
|
@@ -54,10 +54,10 @@ Typical applications include:
|
|
54
54
|
|
55
55
|
In all these domains, scalable and fast tree management is not a luxury — it's a necessity.
|
56
56
|
|
57
|
-
### Why
|
57
|
+
### Why Treenode Framework?
|
58
58
|
At the moment, django-fast-treeenode is, if not the best, then one of the best packages for working with tree data under Djangjo.
|
59
59
|
|
60
|
-
- **High performance**: [tests show](docs/about.md#benchmark-tests) that on trees of 5k-10k nodes with a nesting depth of 500-600 levels, **Treenode Framework** (`django-fast-
|
60
|
+
- **High performance**: [tests show](docs/about.md#benchmark-tests) that on trees of 5k-10k nodes with a nesting depth of 500-600 levels, **Treenode Framework** (`django-fast-Treenode`) shows **performance 4-7 times better** than the main popular packages.
|
61
61
|
- **Flexible API**: today contains the widest set of methods for working with a tree in comparison with other packages.
|
62
62
|
- **Convenient administration**: the admin panel interface was developed taking into account the experience of using other packages. It provides convenience and intuitiveness with ease of programming.
|
63
63
|
- **Scalability**: **Treenode Framework** suitable for solving simple problems such as menus, directories, parsing arithmetic expressions, as well as complex problems such as program optimization, image layout, multi-step decision making problems, or machine learning..
|
@@ -70,7 +70,7 @@ To get started quickly, you need to follow these steps:
|
|
70
70
|
|
71
71
|
- Simply install the package via `pip`:
|
72
72
|
```sh
|
73
|
-
pip install django-fast-
|
73
|
+
pip install django-fast-Treenode
|
74
74
|
```
|
75
75
|
- Once installed, add `'treenode'` to your `INSTALLED_APPS` in **settings.py**:
|
76
76
|
```python {title="settings.py"}
|
@@ -83,9 +83,9 @@ To get started quickly, you need to follow these steps:
|
|
83
83
|
|
84
84
|
- Open **models.py** and create your own tree class:
|
85
85
|
```
|
86
|
-
from
|
86
|
+
from Treenode.models import TreenodeModel
|
87
87
|
|
88
|
-
class MyTree(
|
88
|
+
class MyTree(TreenodeModel):
|
89
89
|
name = models.CharField(max_length=255)
|
90
90
|
display_field = "name"
|
91
91
|
```
|
@@ -93,11 +93,11 @@ To get started quickly, you need to follow these steps:
|
|
93
93
|
- Open **admin.py** and create a model for the admin panel
|
94
94
|
```
|
95
95
|
from django.contrib import admin
|
96
|
-
from
|
97
|
-
from .models import
|
96
|
+
from Treenode.admin import TreenodeModelAdmin
|
97
|
+
from .models import MyTree
|
98
98
|
|
99
|
-
@admin.register(
|
100
|
-
class
|
99
|
+
@admin.register(MyTree)
|
100
|
+
class MyTreeAdmin(TreenodeModelAdmin):
|
101
101
|
list_display = ("name",)
|
102
102
|
search_fields = ("name",)
|
103
103
|
```
|
@@ -112,25 +112,24 @@ To get started quickly, you need to follow these steps:
|
|
112
112
|
```sh
|
113
113
|
python manage.py runserver
|
114
114
|
```
|
115
|
-
|
116
115
|
Everything is ready, enjoy 🎉!
|
117
116
|
|
118
117
|
## Documentation
|
119
|
-
Full documentation is available at **[ReadTheDocs](https://django-fast-
|
118
|
+
Full documentation is available at **[ReadTheDocs](https://django-fast-Treenode.readthedocs.io/)**.
|
120
119
|
|
121
120
|
Quick access links:
|
122
|
-
* [Installation, configuration and fine tuning](https://django-fast-
|
123
|
-
* [Model Inheritance and Extensions](https://django-fast-
|
124
|
-
* [Working with Admin Classes](https://django-fast-
|
125
|
-
* [API Reference](https://django-fast-
|
126
|
-
* [Import & Export](https://django-fast-
|
127
|
-
* [Caching and working with cache](https://django-fast-
|
128
|
-
* [Migration and upgrade guide](https://django-fast-
|
121
|
+
* [Installation, configuration and fine tuning](https://django-fast-Treenode.readthedocs.io/installation/)
|
122
|
+
* [Model Inheritance and Extensions](https://django-fast-Treenode.readthedocs.io/models/)
|
123
|
+
* [Working with Admin Classes](https://django-fast-Treenode.readthedocs.io/admin/)
|
124
|
+
* [API Reference](https://django-fast-Treenode.readthedocs.io/api/)
|
125
|
+
* [Import & Export](https://django-fast-Treenode.readthedocs.io/import_export/)
|
126
|
+
* [Caching and working with cache](https://django-fast-Treenode.readthedocs.io/cache/)
|
127
|
+
* [Migration and upgrade guide](https://django-fast-Treenode.readthedocs.io/migration/)
|
129
128
|
|
130
129
|
Your wishes, objections, comments are welcome.
|
131
130
|
|
132
131
|
## License
|
133
|
-
Released under [MIT License](https://github.com/TimurKady/django-fast-
|
132
|
+
Released under [MIT License](https://github.com/TimurKady/django-fast-Treenode/blob/main/LICENSE).
|
134
133
|
|
135
134
|
## Credits
|
136
135
|
Thanks to everyone who contributed to the development and testing of this package, as well as the Django community for their inspiration and support.
|
{django_fast_treenode-3.0.2 → django_fast_treenode-3.0.3/django_fast_treenode.egg-info}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: django-fast-treenode
|
3
|
-
Version: 3.0.
|
3
|
+
Version: 3.0.3
|
4
4
|
Summary: Treenode Framework for supporting tree (hierarchical) data structure in Django projects
|
5
5
|
Home-page: https://django-fast-treenode.readthedocs.io/
|
6
6
|
Author: Timur Kady
|
@@ -62,16 +62,16 @@ Dynamic: home-page
|
|
62
62
|
Dynamic: license-file
|
63
63
|
Dynamic: requires-python
|
64
64
|
|
65
|
-
#
|
65
|
+
# Treenode Framework
|
66
66
|
**A hybrid open-source framework for working with trees in Django**
|
67
67
|
|
68
68
|
[](https://github.com/TimurKady/django-fast-treenode/actions/workflows/test.yaml)
|
69
69
|
[](https://django-fast-treenode.readthedocs.io/)
|
70
|
-
[](https://pypi.org/project/django-fast-
|
70
|
+
[](https://pypi.org/project/django-fast-Treenode/)
|
71
71
|
[](https://djangopackages.org/packages/p/django-fast-treenode/)
|
72
72
|
[](https://github.com/sponsors/TimurKady)
|
73
73
|
|
74
|
-
## About The
|
74
|
+
## About The Treenode Framework
|
75
75
|
### Overview
|
76
76
|
|
77
77
|
**Treenode Framework** is an advanced tree management system for Django applications.It is designed to handle large-scale, deeply nested, and highly dynamic tree structures while maintaining excellent performance, data integrity, and ease of use.
|
@@ -87,7 +87,7 @@ Its core philosophy: **maximum scalability, minimum complexity**.
|
|
87
87
|
|
88
88
|
### Key Features
|
89
89
|
#### Common operations
|
90
|
-
The `django-fast-
|
90
|
+
The `django-fast-Treenode` package supports all the basic operations needed to work with tree structures:
|
91
91
|
|
92
92
|
- Extracting **ancestors** (queryset, list, pks, count);
|
93
93
|
- Extracting **children** (queryset, list, pks, count);
|
@@ -118,10 +118,10 @@ Typical applications include:
|
|
118
118
|
|
119
119
|
In all these domains, scalable and fast tree management is not a luxury — it's a necessity.
|
120
120
|
|
121
|
-
### Why
|
121
|
+
### Why Treenode Framework?
|
122
122
|
At the moment, django-fast-treeenode is, if not the best, then one of the best packages for working with tree data under Djangjo.
|
123
123
|
|
124
|
-
- **High performance**: [tests show](docs/about.md#benchmark-tests) that on trees of 5k-10k nodes with a nesting depth of 500-600 levels, **Treenode Framework** (`django-fast-
|
124
|
+
- **High performance**: [tests show](docs/about.md#benchmark-tests) that on trees of 5k-10k nodes with a nesting depth of 500-600 levels, **Treenode Framework** (`django-fast-Treenode`) shows **performance 4-7 times better** than the main popular packages.
|
125
125
|
- **Flexible API**: today contains the widest set of methods for working with a tree in comparison with other packages.
|
126
126
|
- **Convenient administration**: the admin panel interface was developed taking into account the experience of using other packages. It provides convenience and intuitiveness with ease of programming.
|
127
127
|
- **Scalability**: **Treenode Framework** suitable for solving simple problems such as menus, directories, parsing arithmetic expressions, as well as complex problems such as program optimization, image layout, multi-step decision making problems, or machine learning..
|
@@ -134,7 +134,7 @@ To get started quickly, you need to follow these steps:
|
|
134
134
|
|
135
135
|
- Simply install the package via `pip`:
|
136
136
|
```sh
|
137
|
-
pip install django-fast-
|
137
|
+
pip install django-fast-Treenode
|
138
138
|
```
|
139
139
|
- Once installed, add `'treenode'` to your `INSTALLED_APPS` in **settings.py**:
|
140
140
|
```python {title="settings.py"}
|
@@ -147,9 +147,9 @@ To get started quickly, you need to follow these steps:
|
|
147
147
|
|
148
148
|
- Open **models.py** and create your own tree class:
|
149
149
|
```
|
150
|
-
from
|
150
|
+
from Treenode.models import TreenodeModel
|
151
151
|
|
152
|
-
class MyTree(
|
152
|
+
class MyTree(TreenodeModel):
|
153
153
|
name = models.CharField(max_length=255)
|
154
154
|
display_field = "name"
|
155
155
|
```
|
@@ -157,11 +157,11 @@ To get started quickly, you need to follow these steps:
|
|
157
157
|
- Open **admin.py** and create a model for the admin panel
|
158
158
|
```
|
159
159
|
from django.contrib import admin
|
160
|
-
from
|
161
|
-
from .models import
|
160
|
+
from Treenode.admin import TreenodeModelAdmin
|
161
|
+
from .models import MyTree
|
162
162
|
|
163
|
-
@admin.register(
|
164
|
-
class
|
163
|
+
@admin.register(MyTree)
|
164
|
+
class MyTreeAdmin(TreenodeModelAdmin):
|
165
165
|
list_display = ("name",)
|
166
166
|
search_fields = ("name",)
|
167
167
|
```
|
@@ -176,25 +176,24 @@ To get started quickly, you need to follow these steps:
|
|
176
176
|
```sh
|
177
177
|
python manage.py runserver
|
178
178
|
```
|
179
|
-
|
180
179
|
Everything is ready, enjoy 🎉!
|
181
180
|
|
182
181
|
## Documentation
|
183
|
-
Full documentation is available at **[ReadTheDocs](https://django-fast-
|
182
|
+
Full documentation is available at **[ReadTheDocs](https://django-fast-Treenode.readthedocs.io/)**.
|
184
183
|
|
185
184
|
Quick access links:
|
186
|
-
* [Installation, configuration and fine tuning](https://django-fast-
|
187
|
-
* [Model Inheritance and Extensions](https://django-fast-
|
188
|
-
* [Working with Admin Classes](https://django-fast-
|
189
|
-
* [API Reference](https://django-fast-
|
190
|
-
* [Import & Export](https://django-fast-
|
191
|
-
* [Caching and working with cache](https://django-fast-
|
192
|
-
* [Migration and upgrade guide](https://django-fast-
|
185
|
+
* [Installation, configuration and fine tuning](https://django-fast-Treenode.readthedocs.io/installation/)
|
186
|
+
* [Model Inheritance and Extensions](https://django-fast-Treenode.readthedocs.io/models/)
|
187
|
+
* [Working with Admin Classes](https://django-fast-Treenode.readthedocs.io/admin/)
|
188
|
+
* [API Reference](https://django-fast-Treenode.readthedocs.io/api/)
|
189
|
+
* [Import & Export](https://django-fast-Treenode.readthedocs.io/import_export/)
|
190
|
+
* [Caching and working with cache](https://django-fast-Treenode.readthedocs.io/cache/)
|
191
|
+
* [Migration and upgrade guide](https://django-fast-Treenode.readthedocs.io/migration/)
|
193
192
|
|
194
193
|
Your wishes, objections, comments are welcome.
|
195
194
|
|
196
195
|
## License
|
197
|
-
Released under [MIT License](https://github.com/TimurKady/django-fast-
|
196
|
+
Released under [MIT License](https://github.com/TimurKady/django-fast-Treenode/blob/main/LICENSE).
|
198
197
|
|
199
198
|
## Credits
|
200
199
|
Thanks to everyone who contributed to the development and testing of this package, as well as the Django community for their inspiration and support.
|
@@ -194,7 +194,7 @@ All results were normalized relative to the best observed values. Lower values i
|
|
194
194
|
| Children | 🥇1,0 | 1,1 | 1,4 | 🥉1,0 | 🥈1,0 | 1,6 |
|
195
195
|
| Siblings | 🥇1,0 | 1,1 | 2,8 | 1,1 | 🥈1,0 | 1,1 |
|
196
196
|
| Family | 314,2 | 10.110,0 | 🥈236,2 | 🥉273,4 | 609,9 | 🥇1,0 |
|
197
|
-
| Re-reading | 338,4 | 8.416,7 | 🥉445,7 | 727,4 | 🥇1,0 |
|
197
|
+
| Re-reading | 338,4 | 8.416,7 | 🥉445,7 | 727,4 | 🥇1,0 | 🥈1,3 |
|
198
198
|
| Random | 253,8 | 1,1 | 274,5 | 🥇1,0 | 🥈1,0 | 🥉1,3 |
|
199
199
|
| Move | 🥇1,0 | 23,75 | 🥈1,6 | 🥈1,3 | 268,2 | 7,5 |
|
200
200
|
| Delete | 42,8 | 🥈3,63 | 🥈1,9 | 4,7 | 27,6 | 🥇1,0 |
|
@@ -73,10 +73,10 @@ To get started quickly, you need to follow these steps:
|
|
73
73
|
```
|
74
74
|
from django.contrib import admin
|
75
75
|
from treenode.admin import TreeNodeModelAdmin
|
76
|
-
from .models import
|
76
|
+
from .models import MyTree
|
77
77
|
|
78
|
-
@admin.register(
|
79
|
-
class
|
78
|
+
@admin.register(MyTree)
|
79
|
+
class MyTreeAdmin(TreeNodeModelAdmin):
|
80
80
|
list_display = ("name",)
|
81
81
|
search_fields = ("name",)
|
82
82
|
```
|
@@ -178,7 +178,7 @@ def export_tree(node):
|
|
178
178
|
children = node.get_children()
|
179
179
|
return {
|
180
180
|
"id": node.id,
|
181
|
-
"
|
181
|
+
"parent": node.get_parent().id if node.get_parent() else None,
|
182
182
|
"name": node.name,
|
183
183
|
# Continue the list by inserting the required model fields
|
184
184
|
# Do not export the `children` field
|
@@ -192,7 +192,7 @@ with open("tree_data.json", "w") as f:
|
|
192
192
|
json.dump(data, f, indent=4)
|
193
193
|
```
|
194
194
|
|
195
|
-
This code exports your structure to `tree_data.json` file. JSON preserves the id →
|
195
|
+
This code exports your structure to `tree_data.json` file. JSON preserves the id → parent relationship, but without children.
|
196
196
|
|
197
197
|
Now clear the table:
|
198
198
|
```python
|
@@ -229,9 +229,9 @@ class Category(TreeNodeModel):
|
|
229
229
|
```
|
230
230
|
Be sure to add `treenode_display_field` as `django-fast-treenode` uses it to display nodes in the admin panel.
|
231
231
|
|
232
|
-
The `treenode_sort_field` attribute specifies the tree sorting order. The default value of this field is `None`. It will sort by the internal field `
|
232
|
+
The `treenode_sort_field` attribute specifies the tree sorting order. The default value of this field is `None`. It will sort by the internal field `priority`.
|
233
233
|
|
234
|
-
The `
|
234
|
+
The `priority` value will be generated automatically if not specified during import. It will either be set as nodes are inserted into the tree (in the order in which the nodes will appear in the imported data), or after they are inserted, depending on the results of sorting by the field specified in the `treenode_sort_field` attribute.
|
235
235
|
|
236
236
|
> Note: sorting functions are available for `django-tree-node` version 2.3 and higher.
|
237
237
|
|
@@ -20,13 +20,9 @@ The 3.x release series will focus on strengthening TreeNode Framework in terms o
|
|
20
20
|
|
21
21
|
Focus: enhance operational safety and optimize workflows for large-scale trees.
|
22
22
|
|
23
|
-
- **Safe Import Preview**:
|
23
|
+
- **Safe Import Preview**: Implement a staging layer for imports, allowing users to review and confirm imported data before committing changes.
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
- **Incremental Export**:
|
28
|
-
|
29
|
-
Support selective export of nodes modified after a specified date or revision marker.
|
25
|
+
- **Incremental Export**: Support selective export of nodes modified after a specified date or revision marker.
|
30
26
|
|
31
27
|
|
32
28
|
* **Version 3.3 — Soft Deletion Support**
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "django-fast-treenode"
|
7
|
-
version = "3.0.
|
7
|
+
version = "3.0.3"
|
8
8
|
description = "Treenode Framework for supporting tree (hierarchical) data structure in Django projects"
|
9
9
|
readme = "README.md"
|
10
10
|
authors = [{ name = "Timur Kady", email = "timurkady@yandex.com" }]
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name='django-fast-treenode',
|
5
|
-
version='3.0.
|
5
|
+
version='3.0.3',
|
6
6
|
description='Treenode Framework for supporting tree (hierarchical) data structure in Django projects',
|
7
7
|
long_description=open('README.md', encoding='utf-8').read(),
|
8
8
|
long_description_content_type='text/markdown',
|