tabo / django-treebeard

Efficient tree implementations for Django 1.0+ :: https://tabo.pe/projects/django-treebeard/

Clone this repository (size: 528.3 KB): HTTPS / SSH
$ hg clone http://code.tabo.pe/django-treebeard
commit 233: b510c7559b91
parent 232: ae6d3c6ad2be
branch: 1.6.X
tags: 1.6
updating README
Gustavo Picon / tabo
5 months ago

Changed (Δ1.2 KB):

raw changeset »

README (16 lines added, 33 lines removed)

Up to file-list README:

2
2
django-treebeard
3
3
================
4
4
5
django-treebeard is a library that implements efficient tree
6
implementations for the Django Web Framework 1.0+. It includes 3 different
7
tree implementations: Adjacency List, Materialized Path and Nested Sets.
8
Each one has it's own strength and weaknesses but share the same
9
API, so it's easy to switch between implementations.
5
django-treebeard is a library that implements efficient tree implementations
6
for the Django Web Framework 1.0+, written by Gustavo Picón and licensed under
7
the Apache License 2.0.
10
8
11
django-treebeard uses Django Model Inheritance with abstract classes
12
to let you define your own models. To use django-treebeard:
9
django-treebeard is:
13
10
14
    1. Run `easy_install django-treebeard` to install the
15
       latest treebeard version from PyPi
16
       1.1. If you don't like easy_install, download a release from the
17
       treebeard download page or get a development version
18
       from the treebeard mercurial repository and run
19
       `python setup.py install`
20
    2. Add 'treebeard' to the `INSTALLED_APPS` section in your
21
       django settings file.
22
    3. Create a new model that inherits from one of django-treebeard's
23
       abstract tree models: mp_tree.MP_Node (materialized path),
24
       ns_tree.NS_Node (nested sets) or al_tree.AL_Node
25
       (adjacency list).
26
    4. Run `python manage.py syncdb`
27
    5. (Optional) If you are going to use the `admin.TreeAdmin`
28
       class for the django admin, you should install treebeard as a
29
       directory instead of an egg:
30
       `easy_install --always-unzip django-treebeard`.
31
       If you install treebeard as an egg, you'll need to enable
32
       `django.template.loaders.eggs.load_template_source` in the
33
       `TEMPLATE_LOADERS` setting in your django settings file.
34
       Either way, you need to add the path (filesystem or python
35
       namespace) to treebeard's templates in `TEMPLATE_DIRS`.
36
       Also you need to enable `django-core-context-processors-request`_
37
       in the ``TEMPLATE_CONTEXT_PROCESSORS`` setting in your django
38
       settings file.
11
- **Flexible**: Includes 3 different tree implementations with the same API:
12
13
  1. Adjacency List
14
  2. Materialized Path
15
  3. Nested Sets
16
17
- **Fast**: Optimized non-naive tree operations (see Benchmarks).
18
- **Easy**: Uses Django Model Inheritance with abstract classes to define your own
19
  models.
20
- **Clean**: Testable and well tested code base. Code/branch test coverage is above
21
  96%.
39
22
40
23
You can find the documentation in
41
24
42
    http://docs.tabo.pe/django-treebeard/tip/
25
    https://tabo.pe/projects/django-treebeard/docs/tip/