# HG changeset patch # User Gustavo Picon # Date 1261117642 18000 # Node ID 0ea8c876d30783ef3a0e8b6f9565371c0f13e8a5 # Parent 30ef6b888f70d4f859a4462edb56b9ad91e08057 fixed the installation of templates, and added templates section to the installation instructions diff -r 30ef6b888f70d4f859a4462edb56b9ad91e08057 -r 0ea8c876d30783ef3a0e8b6f9565371c0f13e8a5 CHANGES --- a/CHANGES Wed Dec 16 23:45:40 2009 -0500 +++ b/CHANGES Fri Dec 18 01:27:22 2009 -0500 @@ -1,3 +1,9 @@ + +Release 1.52 (Dec 18, 2009) +--------------------------- + +* Really fixed the installation of templates. + Release 1.51 (Dec 16, 2009) --------------------------- diff -r 30ef6b888f70d4f859a4462edb56b9ad91e08057 -r 0ea8c876d30783ef3a0e8b6f9565371c0f13e8a5 MANIFEST.in --- a/MANIFEST.in Wed Dec 16 23:45:40 2009 -0500 +++ b/MANIFEST.in Fri Dec 18 01:27:22 2009 -0500 @@ -1,8 +1,4 @@ -include CHANGES -include LICENSE -include NOTICE -include README -include UPDATING +include CHANGES LICENSE NOTICE README UPDATING MANIFEST.in recursive-include docs * recursive-include tbbench tbbench-* *.py recursive-include tbexample *.py *.html diff -r 30ef6b888f70d4f859a4462edb56b9ad91e08057 -r 0ea8c876d30783ef3a0e8b6f9565371c0f13e8a5 README --- a/README Wed Dec 16 23:45:40 2009 -0500 +++ b/README Fri Dec 18 01:27:22 2009 -0500 @@ -11,15 +11,28 @@ django-treebeard uses Django Model Inheritance with abstract classes to let you define your own models. To use django-treebeard: - 1. Download a release from the treebeard download page or get a - development version from the treebeard mercurial repository. - 2. Run python setup.py install - 3. Add 'treebeard' to the INSTALLED_APPS section in your django - settings file. - 4. 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). - 5. Run python manage.py syncdb + 1. 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` + 2. Add 'treebeard' to the `INSTALLED_APPS` section in your django + settings file. + 3. 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). + 4. Run `python manage.py syncdb` + 5. (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 diff -r 30ef6b888f70d4f859a4462edb56b9ad91e08057 -r 0ea8c876d30783ef3a0e8b6f9565371c0f13e8a5 docs/conf.py --- a/docs/conf.py Wed Dec 16 23:45:40 2009 -0500 +++ b/docs/conf.py Fri Dec 18 01:27:22 2009 -0500 @@ -42,9 +42,9 @@ # other places throughout the built documents. # # The short X.Y version. -version = '1.51' +version = '1.52' # The full version, including alpha/beta/rc tags. -release = '1.51' +release = '1.52' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: diff -r 30ef6b888f70d4f859a4462edb56b9ad91e08057 -r 0ea8c876d30783ef3a0e8b6f9565371c0f13e8a5 docs/genindex.html --- a/docs/genindex.html Wed Dec 16 23:45:40 2009 -0500 +++ b/docs/genindex.html Fri Dec 18 01:27:22 2009 -0500 @@ -5,13 +5,13 @@ - Index — django-treebeard v1.51 documentation + Index — django-treebeard v1.52 documentation - + @@ -264,12 +264,12 @@
  • modules |
  • -
  • django-treebeard v1.51 documentation »
  • +
  • django-treebeard v1.52 documentation »
  • diff -r 30ef6b888f70d4f859a4462edb56b9ad91e08057 -r 0ea8c876d30783ef3a0e8b6f9565371c0f13e8a5 docs/index.html --- a/docs/index.html Wed Dec 16 23:45:40 2009 -0500 +++ b/docs/index.html Fri Dec 18 01:27:22 2009 -0500 @@ -5,13 +5,13 @@ - treebeard — Efficient tree model implementations for Django — django-treebeard v1.51 documentation + treebeard — Efficient tree model implementations for Django — django-treebeard v1.52 documentation - + @@ -54,16 +54,16 @@ license:Apache License 2.0 -version:1.51 +version:1.52 url:http://code.tabo.pe/django-treebeard/ -documentation:treebeard-docs +documentation:treebeard-docs examples:treebeard-examples -(source) +(source) -tests:treebeard-tests +tests:treebeard-tests benchmarks:treebeard-benchmarks @@ -79,9 +79,12 @@ to let you define your own models. To use django-treebeard:

      -
    1. Download a release from the treebeard download page or get a -development version from the treebeard mercurial repository.
    2. -
    3. Run python setup.py install
    4. +
    5. 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
    6. Add 'treebeard' to the INSTALLED_APPS section in your django settings file.
    7. Create a new model that inherits from one of django-treebeard‘s @@ -89,6 +92,15 @@ ns_tree.NS_Node (nested sets) or al_tree.AL_Node (adjacency list).
    8. Run python manage.py syncdb
    9. +
    10. (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.

    Read the models.Node API reference for detailed info.

    @@ -2132,6 +2144,12 @@

    Changes in django-treebeard

    +
    +

    Release 1.52 (Dec 18, 2009)

    +
      +
    • Really fixed the installation of templates.
    • +
    +
    diff -r 30ef6b888f70d4f859a4462edb56b9ad91e08057 -r 0ea8c876d30783ef3a0e8b6f9565371c0f13e8a5 docs/modindex.html --- a/docs/modindex.html Wed Dec 16 23:45:40 2009 -0500 +++ b/docs/modindex.html Fri Dec 18 01:27:22 2009 -0500 @@ -5,13 +5,13 @@ - Global Module Index — django-treebeard v1.51 documentation + Global Module Index — django-treebeard v1.52 documentation - + @@ -34,7 +34,7 @@
  • modules |
  • -
  • django-treebeard v1.51 documentation »
  • +
  • django-treebeard v1.52 documentation »
  • @@ -121,12 +121,12 @@
  • modules |
  • -
  • django-treebeard v1.51 documentation »
  • +
  • django-treebeard v1.52 documentation »
  • diff -r 30ef6b888f70d4f859a4462edb56b9ad91e08057 -r 0ea8c876d30783ef3a0e8b6f9565371c0f13e8a5 docs/objects.inv --- a/docs/objects.inv Wed Dec 16 23:45:40 2009 -0500 +++ b/docs/objects.inv Fri Dec 18 01:27:22 2009 -0500 @@ -1,6 +1,6 @@ # Sphinx inventory version 1 # Project: django-treebeard -# Version: 1.51 +# Version: 1.52 treebeard.models mod index.html treebeard.al_tree mod index.html treebeard.admin mod index.html diff -r 30ef6b888f70d4f859a4462edb56b9ad91e08057 -r 0ea8c876d30783ef3a0e8b6f9565371c0f13e8a5 docs/search.html --- a/docs/search.html Wed Dec 16 23:45:40 2009 -0500 +++ b/docs/search.html Fri Dec 18 01:27:22 2009 -0500 @@ -5,13 +5,13 @@ - Search — django-treebeard v1.51 documentation + Search — django-treebeard v1.52 documentation - + @@ -83,13 +83,13 @@
  • modules |
  • -
  • django-treebeard v1.51 documentation »
  • +
  • django-treebeard v1.52 documentation »
  • diff -r 30ef6b888f70d4f859a4462edb56b9ad91e08057 -r 0ea8c876d30783ef3a0e8b6f9565371c0f13e8a5 docs/searchindex.js --- a/docs/searchindex.js Wed Dec 16 23:45:40 2009 -0500 +++ b/docs/searchindex.js Fri Dec 18 01:27:22 2009 -0500 @@ -1,1 +1,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,find_problem: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,run: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,"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,abcd: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,taken:0,prev:0,tell:0,reorder:0,more:0,sort:0,python:0,claus:0,benchmark:0,warn:0,particular:0,hole:0,cach:0,must:0,none:0,retriev:0,room:0,restor:0,setup:0,work:0,kwarg:0,can:0,treebeard_test_alphabet:0,dec:0,root:0,overrid:0,sqlite:0,process:0,share:0,indic:0,high:0,liter:0,want:0,descendants_count:0,occur:0,string:0,alwai:0,steplen:0,quot:0,anoth: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,get_last_root_nod: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,handl:0,safe:0,initi:0,number:0,"break":0,framework:0,nov:0,get_par:0,"_meta":0,tempat:0,separ:0,innodb:0,each:0,found:0,unicod:0,complet:0,mean:0,continu: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,directli:0,denorm: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,root_nod:0,parm:0,copi:0,specifi:0,add_sibl:0,than:0,pg83:0,pg82:0,load_bulk:0,target: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,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,stop:0,mainten:0,fastest:0,iso8859:0,report:0,enabl: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,instanc:0,force_upd:0,comment:0,exhibit:0,ubuntu:0,insist: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,inconsist:0,inherit:0,al_testnodesort:0,exampl:0,expens:0,thi:0,model:0,sibl:0,left: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,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,val2:0,automat:0,due: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,order_insertion_bi:0,consid:0,sql:0,"60m":0,vadim:0,faster:0,"51a":0,depth:0,ignor:0,time:0},titles:["treebeard — 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"]}) \ No newline at end of file +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:["treebeard — 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"]}) \ No newline at end of file diff -r 30ef6b888f70d4f859a4462edb56b9ad91e08057 -r 0ea8c876d30783ef3a0e8b6f9565371c0f13e8a5 setup.py --- a/setup.py Wed Dec 16 23:45:40 2009 -0500 +++ b/setup.py Fri Dec 18 01:27:22 2009 -0500 @@ -4,49 +4,7 @@ from distutils.command.install import INSTALL_SCHEMES from distutils.core import setup -version = '1.51' - -def fullsplit(path, result=None): - """ - Split a pathname into components (the opposite of os.path.join) in a - platform-neutral way. - """ - if result is None: - result = [] - head, tail = os.path.split(path) - if head == '': - return [tail] + result - if head == path: - return result - return fullsplit(head, [tail] + result) - - -# Tell distutils to put the data_files in platform-specific installation -# locations. See here for an explanation: -# http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb -for scheme in INSTALL_SCHEMES.values(): - scheme['data'] = scheme['purelib'] - -# Compile the list of packages available, because distutils doesn't have -# an easy way to do this. -packages, data_files = [], [] -root_dir = os.path.dirname(__file__) -tagging_dir = os.path.join(root_dir, 'treebeard') -pieces = fullsplit(root_dir) -if pieces[-1] == '': - len_root_dir = len(pieces) - 1 -else: - len_root_dir = len(pieces) - -for dirpath, dirnames, filenames in os.walk(tagging_dir): - # Ignore dirnames that start with '.' - for i, dirname in enumerate(dirnames): - if dirname.startswith('.'): del dirnames[i] - if '__init__.py' in filenames: - packages.append('.'.join(fullsplit(dirpath)[len_root_dir:])) - elif filenames: - data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]]) - +version = '1.52' classifiers = [ "Development Status :: 5 - Production/Stable", @@ -60,6 +18,7 @@ "Framework :: Django", ] +root_dir = os.path.dirname(__file__) long_desc = open((root_dir if root_dir else '.')+'/README').read() setup( @@ -69,8 +28,9 @@ author='Gustavo Picon', author_email='tabo@tabo.pe', license='Apache License 2.0', - packages = packages, - data_files = data_files, + packages = ['treebeard', 'treebeard.templatetags'], + package_dir={'treebeard': 'treebeard'}, + package_data={'treebeard': ['templates/admin/*.html']}, description='Efficient Materialized Path tree implementation for' ' Django 1.0+', classifiers=classifiers, diff -r 30ef6b888f70d4f859a4462edb56b9ad91e08057 -r 0ea8c876d30783ef3a0e8b6f9565371c0f13e8a5 treebeard/__init__.py --- a/treebeard/__init__.py Wed Dec 16 23:45:40 2009 -0500 +++ b/treebeard/__init__.py Fri Dec 18 01:27:22 2009 -0500 @@ -7,19 +7,19 @@ :synopsys: Efficient Tree implementations for Django 1.0+ :copyright: 2008-2009 by `Gustavo Picon `_ :license: Apache License 2.0 - :version: 1.51 + :version: 1.52 :url: http://code.tabo.pe/django-treebeard/ :documentation: `treebeard-docs - `_ + `_ :examples: `treebeard-examples `_ (`source - `_) + `_) :tests: `treebeard-tests - `_ + `_ :benchmarks: `treebeard-benchmarks <#module-tbbench>`_ ``django-treebeard`` is a library that implements efficient tree @@ -33,16 +33,28 @@ ``django-treebeard`` uses `Django Model Inheritance with abstract classes`_ to let you define your own models. To use ``django-treebeard``: - 1. Download a release from the `treebeard download page`_ or get a - development version from the `treebeard mercurial repository`_. - 2. Run :command:`python setup.py install` - 3. Add ``'treebeard'`` to the ``INSTALLED_APPS`` section in your django + 1. Run :command:`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 + :command:`python setup.py install` + 2. Add ``'treebeard'`` to the ``INSTALLED_APPS`` section in your django settings file. - 4. Create a new model that inherits from one of ``django-treebeard``'s + 3. Create a new model that inherits from one of ``django-treebeard``'s abstract tree models: :class:`mp_tree.MP_Node` (materialized path), :class:`ns_tree.NS_Node` (nested sets) or :class:`al_tree.AL_Node` (adjacency list). - 5. Run :command:`python manage.py syncdb` + 4. Run :command:`python manage.py syncdb` + 5. (Optional) If you are going to use the :class:`admin.TreeAdmin` + class for the django admin, you should install treebeard as a + directory instead of an egg: + :command:`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``. Read the :class:`models.Node` API reference for detailed info. @@ -51,8 +63,10 @@ http://code.tabo.pe/django-treebeard/downloads/ .. _`treebeard mercurial repository`: http://code.tabo.pe/django-treebeard/src/ + .. _`latest treebeard version from PyPi`: + http://pypi.python.org/pypi/django-treebeard/ """ -__version__ = '1.51' +__version__ = '1.52'