Efficient Materialized Path tree implementation for Django 1.0+
Project description
django-treebeard is a library that implements efficient tree implementations for the Django Web Framework 1.0+. It includes 3 different tree implementations: Adjacency List, Materialized Path and Nested Sets. Each one has it’s own strength and weaknesses but share the same API, so it’s easy to switch between implementations.
django-treebeard uses Django Model Inheritance with abstract classes to let you define your own models. To use django-treebeard:
Run easy_install django-treebeard to install the latest treebeard version from PyPi 1.1. If you don’t like easy_install, download a release from the treebeard download page or get a development version from the treebeard mercurial repository and run python setup.py install
Add ‘treebeard’ to the INSTALLED_APPS section in your django settings file.
Create a new model that inherits from one of django-treebeard’s abstract tree models: mp_tree.MP_Node (materialized path), ns_tree.NS_Node (nested sets) or al_tree.AL_Node (adjacency list).
Run python manage.py syncdb
(Optional) If you are going to use the admin.TreeAdmin class for the django admin, you should install treebeard as a directory instead of an egg: easy_install –always-unzip django-treebeard. If you install treebeard as an egg, you’ll need to enable django.template.loaders.eggs.load_template_source in the TEMPLATE_LOADERS setting in your django settings file. Either way, you need to add the path (filesystem or python namespace) to treebeard’s templates in TEMPLATE_DIRS.
You can find the documentation in
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-treebeard-1.52.tar.gz
.
File metadata
- Download URL: django-treebeard-1.52.tar.gz
- Upload date:
- Size: 110.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cb66c7d74a4f7a38ff87de7455150b74a9b75fad4c244e8ab811d1a0607faf8 |
|
MD5 | 5d5ed62456c6da92848f8139fcf24257 |
|
BLAKE2b-256 | d72434858391823ea0fbd0d41178ee7f65b44e58858d8c9e4e277d7ccee43ec9 |