tabo / django-treebeard
Efficient tree implementations for Django 1.0+ :: https://tabo.pe/projects/django-treebeard/
| commit 139: | 0ea8c876d307 |
| parent 138: | 30ef6b888f70 |
| branch: | default |
| tags: | 1.52 |
Changed (Δ4.5 KB):
CHANGES (6 lines added, 0 lines removed)
MANIFEST.in (1 lines added, 5 lines removed)
README (22 lines added, 9 lines removed)
docs/conf.py (2 lines added, 2 lines removed)
docs/genindex.html (6 lines added, 6 lines removed)
docs/index.html (32 lines added, 13 lines removed)
docs/modindex.html (6 lines added, 6 lines removed)
docs/objects.inv (1 lines added, 1 lines removed)
docs/search.html (6 lines added, 6 lines removed)
docs/searchindex.js (1 lines added, 1 lines removed)
setup.py (5 lines added, 45 lines removed)
treebeard/__init__.py (25 lines added, 11 lines removed)
1 |
||
2 |
Release 1.52 (Dec 18, 2009) |
|
3 |
--------------------------- |
|
4 |
||
5 |
* Really fixed the installation of templates. |
|
6 |
||
1 |
7 |
|
2 |
8 |
Release 1.51 (Dec 16, 2009) |
3 |
9 |
--------------------------- |
1 |
include CHANGES |
|
2 |
include LICENSE |
|
3 |
include NOTICE |
|
4 |
include README |
|
5 |
include |
|
1 |
include CHANGES LICENSE NOTICE README UPDATING MANIFEST.in |
|
6 |
2 |
recursive-include docs * |
7 |
3 |
recursive-include tbbench tbbench-* *.py |
8 |
4 |
recursive-include tbexample *.py *.html |
| … | … | @@ -11,15 +11,28 @@ API, so it's easy to switch between impl |
11 |
11 |
django-treebeard uses Django Model Inheritance with abstract classes |
12 |
12 |
to let you define your own models. To use django-treebeard: |
13 |
13 |
|
14 |
1. Download a release from the treebeard download page or get a |
|
15 |
development version from the treebeard mercurial repository. |
|
16 |
2. Run python setup.py install |
|
17 |
3. Add 'treebeard' to the INSTALLED_APPS section in your django |
|
18 |
settings file. |
|
19 |
4. Create a new model that inherits from one of django-treebeard's |
|
20 |
abstract tree models: mp_tree.MP_Node (materialized path), |
|
21 |
ns_tree.NS_Node (nested sets) or al_tree.AL_Node (adjacency list). |
|
22 |
|
|
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 django |
|
21 |
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`. |
|
23 |
36 |
|
24 |
37 |
You can find the documentation in |
25 |
38 |
| … | … | @@ -42,9 +42,9 @@ copyright = '2008-2009, Gustavo Picon' |
42 |
42 |
# other places throughout the built documents. |
43 |
43 |
# |
44 |
44 |
# The short X.Y version. |
45 |
version = '1.5 |
|
45 |
version = '1.52' |
|
46 |
46 |
# The full version, including alpha/beta/rc tags. |
47 |
release = '1.5 |
|
47 |
release = '1.52' |
|
48 |
48 |
|
49 |
49 |
# There are two options for replacing |today|: either, you set today to some |
50 |
50 |
# non-false value, then it is used: |
Up to file-list docs/genindex.html:
5 |
5 |
<head> |
6 |
6 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
7 |
7 |
|
8 |
<title>Index — django-treebeard v1.5 |
|
8 |
<title>Index — django-treebeard v1.52 documentation</title> |
|
9 |
9 |
<link rel="stylesheet" href="_static/default.css" type="text/css" /> |
10 |
10 |
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> |
11 |
11 |
<script type="text/javascript"> |
12 |
12 |
var DOCUMENTATION_OPTIONS = { |
13 |
13 |
URL_ROOT: '', |
14 |
VERSION: '1.5 |
|
14 |
VERSION: '1.52', |
|
15 |
15 |
COLLAPSE_MODINDEX: false, |
16 |
16 |
FILE_SUFFIX: '.html', |
17 |
17 |
HAS_SOURCE: true |
19 |
19 |
</script> |
20 |
20 |
<script type="text/javascript" src="_static/jquery.js"></script> |
21 |
21 |
<script type="text/javascript" src="_static/doctools.js"></script> |
22 |
<link rel="top" title="django-treebeard v1.5 |
|
22 |
<link rel="top" title="django-treebeard v1.52 documentation" href="index.html" /> |
|
23 |
23 |
</head> |
24 |
24 |
<body> |
25 |
25 |
<div class="related"> |
31 |
31 |
<li class="right" > |
32 |
32 |
<a href="modindex.html" title="Global Module Index" |
33 |
33 |
accesskey="M">modules</a> |</li> |
34 |
<li><a href="index.html">django-treebeard v1.5 |
|
34 |
<li><a href="index.html">django-treebeard v1.52 documentation</a> »</li> |
|
35 |
35 |
</ul> |
36 |
36 |
</div> |
37 |
37 |
|
264 |
264 |
<li class="right" > |
265 |
265 |
<a href="modindex.html" title="Global Module Index" |
266 |
266 |
>modules</a> |</li> |
267 |
<li><a href="index.html">django-treebeard v1.5 |
|
267 |
<li><a href="index.html">django-treebeard v1.52 documentation</a> »</li> |
|
268 |
268 |
</ul> |
269 |
269 |
</div> |
270 |
270 |
<div class="footer"> |
271 |
271 |
© Copyright 2008-2009, Gustavo Picon. |
272 |
Last updated on Dec 1 |
|
272 |
Last updated on Dec 18, 2009. |
|
273 |
273 |
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.3. |
274 |
274 |
</div> |
275 |
275 |
</body> |
Up to file-list docs/index.html:
5 |
5 |
<head> |
6 |
6 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
7 |
7 |
|
8 |
<title>treebeard — Efficient tree model implementations for Django — django-treebeard v1.5 |
|
8 |
<title>treebeard — Efficient tree model implementations for Django — django-treebeard v1.52 documentation</title> |
|
9 |
9 |
<link rel="stylesheet" href="_static/default.css" type="text/css" /> |
10 |
10 |
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> |
11 |
11 |
<script type="text/javascript"> |
12 |
12 |
var DOCUMENTATION_OPTIONS = { |
13 |
13 |
URL_ROOT: '', |
14 |
VERSION: '1.5 |
|
14 |
VERSION: '1.52', |
|
15 |
15 |
COLLAPSE_MODINDEX: false, |
16 |
16 |
FILE_SUFFIX: '.html', |
17 |
17 |
HAS_SOURCE: true |
19 |
19 |
</script> |
20 |
20 |
<script type="text/javascript" src="_static/jquery.js"></script> |
21 |
21 |
<script type="text/javascript" src="_static/doctools.js"></script> |
22 |
<link rel="top" title="django-treebeard v1.5 |
|
22 |
<link rel="top" title="django-treebeard v1.52 documentation" href="" /> |
|
23 |
23 |
</head> |
24 |
24 |
<body> |
25 |
25 |
<div class="related"> |
31 |
31 |
<li class="right" > |
32 |
32 |
<a href="modindex.html" title="Global Module Index" |
33 |
33 |
accesskey="M">modules</a> |</li> |
34 |
<li><a href="">django-treebeard v1.5 |
|
34 |
<li><a href="">django-treebeard v1.52 documentation</a> »</li> |
|
35 |
35 |
</ul> |
36 |
36 |
</div> |
37 |
37 |
|
54 |
54 |
</tr> |
55 |
55 |
<tr class="field"><th class="field-name">license:</th><td class="field-body">Apache License 2.0</td> |
56 |
56 |
</tr> |
57 |
<tr class="field"><th class="field-name">version:</th><td class="field-body">1.5 |
|
57 |
<tr class="field"><th class="field-name">version:</th><td class="field-body">1.52</td> |
|
58 |
58 |
</tr> |
59 |
59 |
<tr class="field"><th class="field-name">url:</th><td class="field-body"><a class="reference external" href="http://code.tabo.pe/django-treebeard/">http://code.tabo.pe/django-treebeard/</a></td> |
60 |
60 |
</tr> |
61 |
<tr class="field"><th class="field-name">documentation:</th><td class="field-body"><a class="reference external" href="http://docs.tabo.pe/django-treebeard/1.5 |
|
61 |
<tr class="field"><th class="field-name">documentation:</th><td class="field-body"><a class="reference external" href="http://docs.tabo.pe/django-treebeard/1.52/">treebeard-docs</a></td> |
|
62 |
62 |
</tr> |
63 |
63 |
<tr class="field"><th class="field-name">examples:</th><td class="field-body"><a class="reference external" href="http://django.tabo.pe/tbexample/">treebeard-examples</a> |
64 |
(<a class="reference external" href="http://code.tabo.pe/django-treebeard/src/1.5 |
|
64 |
(<a class="reference external" href="http://code.tabo.pe/django-treebeard/src/1.52/tbexample/">source</a>)</td> |
|
65 |
65 |
</tr> |
66 |
<tr class="field"><th class="field-name">tests:</th><td class="field-body"><a class="reference external" href="http://code.tabo.pe/django-treebeard/src/1.5 |
|
66 |
<tr class="field"><th class="field-name">tests:</th><td class="field-body"><a class="reference external" href="http://code.tabo.pe/django-treebeard/src/1.52/treebeard/tests.py">treebeard-tests</a></td> |
|
67 |
67 |
</tr> |
68 |
68 |
<tr class="field"><th class="field-name">benchmarks:</th><td class="field-body"><a class="reference external" href="#module-tbbench">treebeard-benchmarks</a></td> |
69 |
69 |
</tr> |
| … | … | @@ -79,9 +79,12 @@ API, so it’s easy to switch betwee |
79 |
79 |
to let you define your own models. To use <tt class="docutils literal"><span class="pre">django-treebeard</span></tt>:</p> |
80 |
80 |
<blockquote> |
81 |
81 |
<ol class="arabic simple"> |
82 |
<li>Download a release from the <a class="reference external" href="http://code.tabo.pe/django-treebeard/downloads/">treebeard download page</a> or get a |
|
83 |
development version from the <a class="reference external" href="http://code.tabo.pe/django-treebeard/src/">treebeard mercurial repository</a>.</li> |
|
84 |
<li>Run <strong> |
|
82 |
<li>Run <strong>easy_install django-treebeard</strong> to install the |
|
83 |
<a class="reference external" href="http://pypi.python.org/pypi/django-treebeard/">latest treebeard version from PyPi</a> |
|
84 |
1.1. If you don’t like easy_install, download a release from the |
|
85 |
<a class="reference external" href="http://code.tabo.pe/django-treebeard/downloads/">treebeard download page</a> or get a development version |
|
86 |
from the <a class="reference external" href="http://code.tabo.pe/django-treebeard/src/">treebeard mercurial repository</a> and run |
|
87 |
<strong>python setup.py install</strong></li> |
|
85 |
88 |
<li>Add <tt class="docutils literal"><span class="pre">'treebeard'</span></tt> to the <tt class="docutils literal"><span class="pre">INSTALLED_APPS</span></tt> section in your django |
86 |
89 |
settings file.</li> |
87 |
90 |
<li>Create a new model that inherits from one of <tt class="docutils literal"><span class="pre">django-treebeard</span></tt>‘s |
| … | … | @@ -89,6 +92,15 @@ abstract tree models: <a title="treebear |
89 |
92 |
<a title="treebeard.ns_tree.NS_Node" class="reference internal" href="#treebeard.ns_tree.NS_Node"><tt class="xref docutils literal"><span class="pre">ns_tree.NS_Node</span></tt></a> (nested sets) or <a title="treebeard.al_tree.AL_Node" class="reference internal" href="#treebeard.al_tree.AL_Node"><tt class="xref docutils literal"><span class="pre">al_tree.AL_Node</span></tt></a> |
90 |
93 |
(adjacency list).</li> |
91 |
94 |
<li>Run <strong>python manage.py syncdb</strong></li> |
95 |
<li>(Optional) If you are going to use the <a title="treebeard.admin.TreeAdmin" class="reference internal" href="#treebeard.admin.TreeAdmin"><tt class="xref docutils literal"><span class="pre">admin.TreeAdmin</span></tt></a> |
|
96 |
class for the django admin, you should install treebeard as a |
|
97 |
directory instead of an egg: |
|
98 |
<strong>easy_install –always-unzip django-treebeard</strong>. |
|
99 |
If you install treebeard as an egg, you’ll need to enable |
|
100 |
<tt class="docutils literal"><span class="pre">django.template.loaders.eggs.load_template_source</span></tt> in the |
|
101 |
<tt class="docutils literal"><span class="pre">TEMPLATE_LOADERS</span></tt> setting in your django settings file. |
|
102 |
Either way, you need to add the path (filesystem or python |
|
103 |
namespace) to treebeard’s templates in <tt class="docutils literal"><span class="pre">TEMPLATE_DIRS</span></tt>.</li> |
|
92 |
104 |
</ol> |
93 |
105 |
</blockquote> |
94 |
106 |
<p>Read the <a title="treebeard.models.Node" class="reference internal" href="#treebeard.models.Node"><tt class="xref docutils literal"><span class="pre">models.Node</span></tt></a> API reference for detailed info.</p> |
| … | … | @@ -2132,6 +2144,12 @@ but as <em>“both X and Y are very |
2132 |
2144 |
</div> |
2133 |
2145 |
<div class="section" id="changes-in-django-treebeard"> |
2134 |
2146 |
<h1>Changes in django-treebeard<a class="headerlink" href="#changes-in-django-treebeard" title="Permalink to this headline">¶</a></h1> |
2147 |
<div class="section" id="release-1-52-dec-18-2009"> |
|
2148 |
<h2>Release 1.52 (Dec 18, 2009)<a class="headerlink" href="#release-1-52-dec-18-2009" title="Permalink to this headline">¶</a></h2> |
|
2149 |
<ul class="simple"> |
|
2150 |
<li>Really fixed the installation of templates.</li> |
|
2151 |
</ul> |
|
2152 |
</div> |
|
2135 |
2153 |
<div class="section" id="release-1-51-dec-16-2009"> |
2136 |
2154 |
<h2>Release 1.51 (Dec 16, 2009)<a class="headerlink" href="#release-1-51-dec-16-2009" title="Permalink to this headline">¶</a></h2> |
2137 |
2155 |
<ul class="simple"> |
| … | … | @@ -2255,6 +2273,7 @@ Solves bug in postgres when the table is |
2255 |
2273 |
</ul> |
2256 |
2274 |
</li> |
2257 |
2275 |
<li><a class="reference external" href="#changes-in-django-treebeard">Changes in django-treebeard</a><ul> |
2276 |
<li><a class="reference external" href="#release-1-52-dec-18-2009">Release 1.52 (Dec 18, 2009)</a></li> |
|
2258 |
2277 |
<li><a class="reference external" href="#release-1-51-dec-16-2009">Release 1.51 (Dec 16, 2009)</a></li> |
2259 |
2278 |
<li><a class="reference external" href="#release-1-5-dec-15-2009">Release 1.5 (Dec 15, 2009)</a><ul> |
2260 |
2279 |
<li><a class="reference external" href="#new-features-added">New features added</a></li> |
| … | … | @@ -2302,12 +2321,12 @@ Solves bug in postgres when the table is |
2302 |
2321 |
<li class="right" > |
2303 |
2322 |
<a href="modindex.html" title="Global Module Index" |
2304 |
2323 |
>modules</a> |</li> |
2305 |
<li><a href="">django-treebeard v1.5 |
|
2324 |
<li><a href="">django-treebeard v1.52 documentation</a> »</li> |
|
2306 |
2325 |
</ul> |
2307 |
2326 |
</div> |
2308 |
2327 |
<div class="footer"> |
2309 |
2328 |
© Copyright 2008-2009, Gustavo Picon. |
2310 |
Last updated on Dec 1 |
|
2329 |
Last updated on Dec 18, 2009. |
|
2311 |
2330 |
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.3. |
2312 |
2331 |
</div> |
2313 |
2332 |
</body> |
Up to file-list docs/modindex.html:
5 |
5 |
<head> |
6 |
6 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
7 |
7 |
|
8 |
<title>Global Module Index — django-treebeard v1.5 |
|
8 |
<title>Global Module Index — django-treebeard v1.52 documentation</title> |
|
9 |
9 |
<link rel="stylesheet" href="_static/default.css" type="text/css" /> |
10 |
10 |
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> |
11 |
11 |
<script type="text/javascript"> |
12 |
12 |
var DOCUMENTATION_OPTIONS = { |
13 |
13 |
URL_ROOT: '', |
14 |
VERSION: '1.5 |
|
14 |
VERSION: '1.52', |
|
15 |
15 |
COLLAPSE_MODINDEX: false, |
16 |
16 |
FILE_SUFFIX: '.html', |
17 |
17 |
HAS_SOURCE: true |
19 |
19 |
</script> |
20 |
20 |
<script type="text/javascript" src="_static/jquery.js"></script> |
21 |
21 |
<script type="text/javascript" src="_static/doctools.js"></script> |
22 |
<link rel="top" title="django-treebeard v1.5 |
|
22 |
<link rel="top" title="django-treebeard v1.52 documentation" href="index.html" /> |
|
23 |
23 |
|
24 |
24 |
|
25 |
25 |
|
34 |
34 |
<li class="right" > |
35 |
35 |
<a href="" title="Global Module Index" |
36 |
36 |
accesskey="M">modules</a> |</li> |
37 |
<li><a href="index.html">django-treebeard v1.5 |
|
37 |
<li><a href="index.html">django-treebeard v1.52 documentation</a> »</li> |
|
38 |
38 |
</ul> |
39 |
39 |
</div> |
40 |
40 |
|
121 |
121 |
<li class="right" > |
122 |
122 |
<a href="" title="Global Module Index" |
123 |
123 |
>modules</a> |</li> |
124 |
<li><a href="index.html">django-treebeard v1.5 |
|
124 |
<li><a href="index.html">django-treebeard v1.52 documentation</a> »</li> |
|
125 |
125 |
</ul> |
126 |
126 |
</div> |
127 |
127 |
<div class="footer"> |
128 |
128 |
© Copyright 2008-2009, Gustavo Picon. |
129 |
Last updated on Dec 1 |
|
129 |
Last updated on Dec 18, 2009. |
|
130 |
130 |
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.3. |
131 |
131 |
</div> |
132 |
132 |
</body> |
Up to file-list docs/objects.inv:
1 |
1 |
# Sphinx inventory version 1 |
2 |
2 |
# Project: django-treebeard |
3 |
# Version: 1.5 |
|
3 |
# Version: 1.52 |
|
4 |
4 |
treebeard.models mod index.html |
5 |
5 |
treebeard.al_tree mod index.html |
6 |
6 |
treebeard.admin mod index.html |
Up to file-list docs/search.html:
5 |
5 |
<head> |
6 |
6 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
7 |
7 |
|
8 |
<title>Search — django-treebeard v1.5 |
|
8 |
<title>Search — django-treebeard v1.52 documentation</title> |
|
9 |
9 |
<link rel="stylesheet" href="_static/default.css" type="text/css" /> |
10 |
10 |
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> |
11 |
11 |
<script type="text/javascript"> |
12 |
12 |
var DOCUMENTATION_OPTIONS = { |
13 |
13 |
URL_ROOT: '', |
14 |
VERSION: '1.5 |
|
14 |
VERSION: '1.52', |
|
15 |
15 |
COLLAPSE_MODINDEX: false, |
16 |
16 |
FILE_SUFFIX: '.html', |
17 |
17 |
HAS_SOURCE: true |
20 |
20 |
<script type="text/javascript" src="_static/jquery.js"></script> |
21 |
21 |
<script type="text/javascript" src="_static/doctools.js"></script> |
22 |
22 |
<script type="text/javascript" src="_static/searchtools.js"></script> |
23 |
<link rel="top" title="django-treebeard v1.5 |
|
23 |
<link rel="top" title="django-treebeard v1.52 documentation" href="index.html" /> |
|
24 |
24 |
</head> |
25 |
25 |
<body> |
26 |
26 |
<div class="related"> |
32 |
32 |
<li class="right" > |
33 |
33 |
<a href="modindex.html" title="Global Module Index" |
34 |
34 |
accesskey="M">modules</a> |</li> |
35 |
<li><a href="index.html">django-treebeard v1.5 |
|
35 |
<li><a href="index.html">django-treebeard v1.52 documentation</a> »</li> |
|
36 |
36 |
</ul> |
37 |
37 |
</div> |
38 |
38 |
|
83 |
83 |
<li class="right" > |
84 |
84 |
<a href="modindex.html" title="Global Module Index" |
85 |
85 |
>modules</a> |</li> |
86 |
<li><a href="index.html">django-treebeard v1.5 |
|
86 |
<li><a href="index.html">django-treebeard v1.52 documentation</a> »</li> |
|
87 |
87 |
</ul> |
88 |
88 |
</div> |
89 |
89 |
|
90 |
90 |
<div class="footer"> |
91 |
91 |
© Copyright 2008-2009, Gustavo Picon. |
92 |
Last updated on Dec 1 |
|
92 |
Last updated on Dec 18, 2009. |
|
93 |
93 |
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.3. |
94 |
94 |
</div> |
95 |
95 |
<script type="text/javascript" src="searchindex.js"></script> |
Up to file-list docs/searchindex.js:
1 |
Search.setIndex({desctypes:{"0":"classmethod","1":"method","2":"attribute","3":"class","4":"exception"},terms:{all:0,code:0,queri:0,lack:0,prefix:0,subclass:0,follow:0,attemp:0,children:0,millisecond:0,get_root_nod:0,depend:0,sensit:0,friendli:0,get_last_s:0,rightmost:0,under:0,get_next_s:0,leav:0,get_children_count:0,sourc:0,everi:0,risk:0,fals:0,util:0,veri:0,affect:0,exact:0, |
|
1 |
Search.setIndex({desctypes:{"0":"classmethod","1":"method","2":"attribute","3":"class","4":"exception"},terms:{all:0,code:0,queri:0,lack:0,prefix:0,subclass:0,follow:0,attemp:0,children:0,millisecond:0,get_root_nod:0,depend:0,sensit:0,friendli:0,get_last_s:0,rightmost:0,under:0,get_next_s:0,leav:0,get_children_count:0,sourc:0,everi:0,risk:0,fals:0,util:0,veri:0,affect:0,exact:0,room:0,foo:0,level:0,get_prev_s:0,metod:0,list:0,"try":0,get_root:0,small:0,node2:0,load_data:0,dir:0,prevent:0,smaller:0,force_insert:0,add_child:0,past:0,ns_tree:0,design:0,pass:0,download:0,val2:0,val1:0,treebeard:0,get_descendant_count:0,even:0,index:0,what:0,abc:0,appear:0,tbbench:0,repli:0,section:0,unsort:0,current:0,delet:0,version:0,run:0,"new":0,method:0,full:0,whose:0,sib_ord:0,errorlist:0,shouldn:0,let:0,address:0,path:0,safer:0,modifi:0,sinc:0,valu:0,search:0,error_class:0,convers:0,datetim:0,related_nam:0,implement:0,transact:0,get_first_s:0,portabl:0,overrid:0,configur:0,extra:0,tweak:0,app:0,api:0,instal:0,get_tre:0,from:0,describ:0,would:0,regist:0,two:0,next:0,predict:0,tropashko:0,call:0,handl:0,taken:0,prev:0,tell:0,reorder:0,more:0,sort:0,claus:0,benchmark:0,warn:0,indic:0,particular:0,hole:0,cach:0,must:0,none:0,retriev:0,find_problem:0,restor:0,setup:0,work:0,kwarg:0,can:0,treebeard_test_alphabet:0,dec:0,root:0,abcd:0,sqlite:0,process:0,share:0,templat:0,high:0,unzip:0,want:0,descendants_count:0,occur:0,string:0,alwai:0,steplen:0,quot:0,get_last_root_nod:0,is_sibling_of:0,write:0,invalidmovetodescend:0,instead:0,reodrer:0,ancestor:0,simpl:0,updat:0,lad:0,max:0,after:0,spot:0,befor:0,wrong:0,date:0,data:0,classmethod:0,element:0,receiv:0,"switch":0,preced:0,allow:0,anoth:0,egg:0,order:0,origin:0,help:0,over:0,move:0,becaus:0,increas:0,missingnodeorderbi:0,hierarchi:0,paramet:0,group:0,fix:0,better:0,get_last_child:0,html:0,bypass:0,comprehens:0,non:0,good:0,synopsi:0,thei:0,python:0,safe:0,initi:0,denorm:0,"break":0,framework:0,nov:0,get_par:0,template_load:0,"_meta":0,tempat:0,separ:0,innodb:0,each:0,found:0,unicod:0,complet:0,mean:0,continu:0,realli:0,heavi:0,lft:0,meta:0,connect:0,forgot:0,our:0,patch:0,variabl:0,get_descendants_group_count:0,get_descend:0,positiveintegerfield:0,numval:0,rel:0,print:0,node_order_bi:0,common:0,postgr:0,empty_permit:0,differ:0,mp_tree:0,control:0,base:0,dictionari:0,releas:0,span:0,"byte":0,invalidposit:0,care:0,could:0,keep:0,datetimefield:0,length:0,enforc:0,place:0,isn:0,is_child_of:0,charfield:0,think:0,first:0,oper:0,node_obj:0,load_template_sourc:0,directli:0,number:0,mai:0,alreadi:0,wasn:0,installed_app:0,miss:0,primari:0,size:0,auto_id:0,given:0,pathoverflow:0,script:0,licens:0,system:0,mercuri:0,movenodeform:0,max_length:0,sadli:0,too:0,store:0,"0123456789abcdefghijklmnopqrstuvwxyz":0,option:0,root_nod:0,namespac:0,parm:0,copi:0,specifi:0,add_sibl:0,than:0,pg83:0,pg82:0,load_bulk:0,target:0,instanc:0,remov:0,sproc:0,tree:0,structur:0,charact:0,dump_bulk:0,get_sibl:0,cost:0,posit:0,mynodemodel:0,pre:0,ram:0,queryset:0,ani:0,packag:0,tabo:0,have:0,tabl:0,need:0,numconv:0,django:0,strength:0,gustavo:0,equival:0,self:0,children_set:0,note:0,also:0,without:0,read:0,take:0,which:0,singl:0,integerfield:0,normal:0,previou:0,oracl:0,label_suffix:0,sortednod:0,most:0,plan:0,myisam:0,"class":0,tradit:0,don:0,url:0,doc:0,mymodel:0,destruct:0,doe:0,databas:0,left:0,ns_node:0,find:0,involv:0,onli:0,slow:0,copyright:0,field2:0,field3:0,explain:0,field1:0,apach:0,should:0,won:0,get_field:0,thinkpad:0,contribut:0,get:0,between:0,pypi:0,mainten:0,fastest:0,iso8859:0,report:0,enabl:0,template_dir:0,"public":0,get_ancestor:0,admin_sit:0,contain:0,where:0,wrote:0,set:0,dump:0,orphan:0,maximum:0,see:0,mandatori:0,result:0,arg:0,corrupt:0,mp_node:0,parent:0,correctli:0,pattern:0,state:0,celko:0,tree_id:0,approach:0,attribut:0,accord:0,kei:0,weak:0,"4gb":0,entir:0,joe:0,solv:0,keep_id:0,both:0,last:0,admin:0,foreign:0,etc:0,inconsist:0,force_upd:0,comment:0,exhibit:0,ubuntu:0,insist:0,loader:0,al_testnod:0,get_children:0,respect:0,assum:0,db_index:0,three:0,describen:0,trigger:0,damn:0,treeadmin:0,deeper:0,argument:0,child:0,"case":0,vanilla:0,properti:0,defin:0,"while":0,error:0,exist:0,loop:0,advantag:0,site:0,worri:0,itself:0,testtreealphabet:0,"return":0,ascii:0,sever:0,"null":0,develop:0,welcom:0,author:0,perform:0,alphabet:0,make:0,same:0,auto_now:0,complex:0,descend:0,al_nod:0,sqlite3:0,document:0,start:0,agress:0,http:0,optim:0,nest:0,unus:0,moment:0,rais:0,improv:0,auto_now_add:0,collat:0,mount:0,get_first_child:0,inherit:0,al_testnodesort:0,exampl:0,expens:0,thi:0,filesystem:0,model:0,sibl:0,latest:0,is_leaf:0,load:0,just:0,less:0,fix_tre:0,rest:0,mysql:0,web:0,now:0,rgt:0,easi:0,hint:0,had:0,except:0,littl:0,add:0,"0123456789abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz":0,els:0,save:0,modul:0,build:0,varchar:0,preserv:0,piec:0,five:0,know:0,mynod:0,recurs:0,desc:0,insert:0,like:0,specif:0,docutil:0,manual:0,manifest:0,"boolean":0,either:0,output:0,manag:0,right:0,interv:0,creation:0,some:0,intern:0,proper:0,syncdb:0,librari:0,leaf:0,per:0,larg:0,dump_data:0,aleh:0,leftmost:0,backend:0,refer:0,id_:0,object:0,add_root:0,picon:0,is_root:0,broken:0,step:0,repositori:0,postgresql:0,column:0,materi:0,page:0,get_first_root_nod:0,backup:0,disabl:0,own:0,effici:0,encod:0,easy_instal:0,automat:0,due:0,stop:0,empti:0,orm:0,chang:0,bulk_data:0,your:0,smarti:0,al_tre:0,strval:0,wai:0,support:0,fast:0,avail:0,width:0,reli:0,includ:0,lot:0,mptt:0,form:0,tupl:0,numchild:0,testnodesortedautonow:0,line:0,"true":0,bug:0,info:0,utf:0,helper:0,possibl:0,"default":0,"_find_next_nod":0,is_descendant_of:0,get_depth:0,limit:0,foreignkei:0,problem:0,featur:0,creat:0,"abstract":0,t61:0,doesn:0,incomplet:0,decreas:0,file:0,enviro:0,adjac:0,check:0,probabl:0,incorrect:0,when:0,detail:0,invalid:0,field:0,other:0,branch:0,test:0,you:0,node:0,relat:0,liter:0,order_insertion_bi:0,consid:0,sql:0,"60m":0,vadim:0,faster:0,directori:0,"51a":0,depth:0,ignor:0,time:0},titles:["<tt class=\"docutils literal\"><span class=\"pre\">treebeard</span></tt> — Efficient tree model implementations for Django"],modules:{"treebeard.models":0,tbbench:0,"treebeard.admin":0,"treebeard.al_tree":0,"treebeard.ns_tree":0,"treebeard.mp_tree":0,"treebeard.forms":0,treebeard:0,"treebeard.exceptions":0},descrefs:{"treebeard.ns_tree.NS_Node":{get_tree:[0,0],rgt:[0,2],node_order_by:[0,2],lft:[0,2],depth:[0,2],tree_id:[0,2]},"treebeard.models":{Node:[0,3]},"treebeard.al_tree":{AL_Node:[0,3]},"treebeard.admin":{TreeAdmin:[0,3]},"treebeard.ns_tree":{NS_Node:[0,3]},"treebeard.al_tree.AL_Node":{get_depth:[0,1],parent:[0,2],sib_order:[0,2],node_order_by:[0,2]},"treebeard.mp_tree":{MP_Node:[0,3]},"treebeard.forms":{MoveNodeForm:[0,3]},"treebeard.mp_tree.MP_Node":{alphabet:[0,2],get_tree:[0,0],add_root:[0,0],find_problems:[0,0],add_sibling:[0,1],numchild:[0,2],move:[0,1],fix_tree:[0,0],node_order_by:[0,2],add_child:[0,1],depth:[0,2],path:[0,2],steplen:[0,2]},"treebeard.models.Node":{is_leaf:[0,1],find_problems:[0,0],get_prev_sibling:[0,1],get_ancestors:[0,1],move:[0,1],fix_tree:[0,0],add_child:[0,1],get_root_nodes:[0,0],get_descendant_count:[0,1],get_tree:[0,0],get_descendants_group_count:[0,0],is_sibling_of:[0,1],get_children:[0,1],get_last_child:[0,1],get_root:[0,1],get_parent:[0,1],save:[0,1],get_children_count:[0,1],add_root:[0,0],add_sibling:[0,1],get_next_sibling:[0,1],get_first_sibling:[0,1],get_first_root_node:[0,0],is_root:[0,1],get_last_sibling:[0,1],load_bulk:[0,0],get_last_root_node:[0,0],get_siblings:[0,1],get_first_child:[0,1],is_descendant_of:[0,1],dump_bulk:[0,0],get_depth:[0,1],is_child_of:[0,1],get_descendants:[0,1],"delete":[0,1]},"treebeard.exceptions":{MissingNodeOrderBy:[0,4],PathOverflow:[0,4],InvalidMoveToDescendant:[0,4],InvalidPosition:[0,4]}},filenames:["index"]}) |
| … | … | @@ -4,49 +4,7 @@ import os |
4 |
4 |
from distutils.command.install import INSTALL_SCHEMES |
5 |
5 |
from distutils.core import setup |
6 |
6 |
|
7 |
version = '1.51' |
|
8 |
||
9 |
def fullsplit(path, result=None): |
|
10 |
""" |
|
11 |
Split a pathname into components (the opposite of os.path.join) in a |
|
12 |
platform-neutral way. |
|
13 |
""" |
|
14 |
if result is None: |
|
15 |
result = [] |
|
16 |
head, tail = os.path.split(path) |
|
17 |
if head == '': |
|
18 |
return [tail] + result |
|
19 |
if head == path: |
|
20 |
return result |
|
21 |
return fullsplit(head, [tail] + result) |
|
22 |
||
23 |
||
24 |
# Tell distutils to put the data_files in platform-specific installation |
|
25 |
# locations. See here for an explanation: |
|
26 |
# http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb |
|
27 |
for scheme in INSTALL_SCHEMES.values(): |
|
28 |
scheme['data'] = scheme['purelib'] |
|
29 |
||
30 |
# Compile the list of packages available, because distutils doesn't have |
|
31 |
# an easy way to do this. |
|
32 |
packages, data_files = [], [] |
|
33 |
root_dir = os.path.dirname(__file__) |
|
34 |
tagging_dir = os.path.join(root_dir, 'treebeard') |
|
35 |
pieces = fullsplit(root_dir) |
|
36 |
if pieces[-1] == '': |
|
37 |
len_root_dir = len(pieces) - 1 |
|
38 |
else: |
|
39 |
len_root_dir = len(pieces) |
|
40 |
||
41 |
for dirpath, dirnames, filenames in os.walk(tagging_dir): |
|
42 |
# Ignore dirnames that start with '.' |
|
43 |
for i, dirname in enumerate(dirnames): |
|
44 |
if dirname.startswith('.'): del dirnames[i] |
|
45 |
if '__init__.py' in filenames: |
|
46 |
packages.append('.'.join(fullsplit(dirpath)[len_root_dir:])) |
|
47 |
elif filenames: |
|
48 |
data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]]) |
|
49 |
||
7 |
version = '1.52' |
|
50 |
8 |
|
51 |
9 |
classifiers = [ |
52 |
10 |
"Development Status :: 5 - Production/Stable", |
| … | … | @@ -60,6 +18,7 @@ classifiers = [ |
60 |
18 |
"Framework :: Django", |
61 |
19 |
] |
62 |
20 |
|
21 |
root_dir = os.path.dirname(__file__) |
|
63 |
22 |
long_desc = open((root_dir if root_dir else '.')+'/README').read() |
64 |
23 |
|
65 |
24 |
setup( |
| … | … | @@ -69,8 +28,9 @@ setup( |
69 |
28 |
author='Gustavo Picon', |
70 |
29 |
author_email='tabo@tabo.pe', |
71 |
30 |
license='Apache License 2.0', |
72 |
packages = packages, |
|
73 |
data_files = data_files, |
|
31 |
packages = ['treebeard', 'treebeard.templatetags'], |
|
32 |
package_dir={'treebeard': 'treebeard'}, |
|
33 |
package_data={'treebeard': ['templates/admin/*.html']}, |
|
74 |
34 |
description='Efficient Materialized Path tree implementation for' |
75 |
35 |
' Django 1.0+', |
76 |
36 |
classifiers=classifiers, |
Up to file-list treebeard/__init__.py:
7 |
7 |
:synopsys: Efficient Tree implementations for Django 1.0+ |
8 |
8 |
:copyright: 2008-2009 by `Gustavo Picon <http://tabo.pe>`_ |
9 |
9 |
:license: Apache License 2.0 |
10 |
:version: 1.5 |
|
10 |
:version: 1.52 |
|
11 |
11 |
:url: http://code.tabo.pe/django-treebeard/ |
12 |
12 |
:documentation: |
13 |
13 |
`treebeard-docs |
14 |
<http://docs.tabo.pe/django-treebeard/1.5 |
|
14 |
<http://docs.tabo.pe/django-treebeard/1.52/>`_ |
|
15 |
15 |
:examples: |
16 |
16 |
`treebeard-examples |
17 |
17 |
<http://django.tabo.pe/tbexample/>`_ |
18 |
18 |
(`source |
19 |
<http://code.tabo.pe/django-treebeard/src/1.5 |
|
19 |
<http://code.tabo.pe/django-treebeard/src/1.52/tbexample/>`_) |
|
20 |
20 |
:tests: |
21 |
21 |
`treebeard-tests |
22 |
<http://code.tabo.pe/django-treebeard/src/1.5 |
|
22 |
<http://code.tabo.pe/django-treebeard/src/1.52/treebeard/tests.py>`_ |
|
23 |
23 |
:benchmarks: `treebeard-benchmarks <#module-tbbench>`_ |
24 |
24 |
|
25 |
25 |
``django-treebeard`` is a library that implements efficient tree |
33 |
33 |
``django-treebeard`` uses `Django Model Inheritance with abstract classes`_ |
34 |
34 |
to let you define your own models. To use ``django-treebeard``: |
35 |
35 |
|
36 |
1. Download a release from the `treebeard download page`_ or get a |
|
37 |
development version from the `treebeard mercurial repository`_. |
|
38 |
2. Run :command:`python setup.py install` |
|
39 |
3. Add ``'treebeard'`` to the ``INSTALLED_APPS`` section in your django |
|
36 |
1. Run :command:`easy_install django-treebeard` to install the |
|
37 |
`latest treebeard version from PyPi`_ |
|
38 |
1.1. If you don't like easy_install, download a release from the |
|
39 |
`treebeard download page`_ or get a development version |
|
40 |
from the `treebeard mercurial repository`_ and run |
|
41 |
:command:`python setup.py install` |
|
42 |
2. Add ``'treebeard'`` to the ``INSTALLED_APPS`` section in your django |
|
40 |
43 |
settings file. |
41 |
|
|
44 |
3. Create a new model that inherits from one of ``django-treebeard``'s |
|
42 |
45 |
abstract tree models: :class:`mp_tree.MP_Node` (materialized path), |
43 |
46 |
:class:`ns_tree.NS_Node` (nested sets) or :class:`al_tree.AL_Node` |
44 |
47 |
(adjacency list). |
45 |
|
|
48 |
4. Run :command:`python manage.py syncdb` |
|
49 |
5. (Optional) If you are going to use the :class:`admin.TreeAdmin` |
|
50 |
class for the django admin, you should install treebeard as a |
|
51 |
directory instead of an egg: |
|
52 |
:command:`easy_install --always-unzip django-treebeard`. |
|
53 |
If you install treebeard as an egg, you'll need to enable |
|
54 |
``django.template.loaders.eggs.load_template_source`` in the |
|
55 |
``TEMPLATE_LOADERS`` setting in your django settings file. |
|
56 |
Either way, you need to add the path (filesystem or python |
|
57 |
namespace) to treebeard's templates in ``TEMPLATE_DIRS``. |
|
46 |
58 |
|
47 |
59 |
|
48 |
60 |
Read the :class:`models.Node` API reference for detailed info. |
51 |
63 |
http://code.tabo.pe/django-treebeard/downloads/ |
52 |
64 |
.. _`treebeard mercurial repository`: |
53 |
65 |
http://code.tabo.pe/django-treebeard/src/ |
66 |
.. _`latest treebeard version from PyPi`: |
|
67 |
http://pypi.python.org/pypi/django-treebeard/ |
|
54 |
68 |
|
55 |
69 |
""" |
56 |
70 |
|
57 |
__version__ = '1.5 |
|
71 |
__version__ = '1.52' |
|
58 |
72 |
