django-treebeard
needs at least Python 3.6 to run, and Django 2.2 or later.
You have several ways to install django-treebeard
. If you're not sure, just use pip
You can install the release versions from django-treebeard's PyPI page using pip
:
$ pip install django-treebeard
or if for some reason you can't use pip
, you can try easy_install
, (at your own risk):
$ easy_install --always-unzip django-treebeard
Download a release from the treebeard download page and unpack it, then run:
$ python setup.py install
Both Debian and Ubuntu include django-treebeard
as a package, so you can just use:
$ apt-get install python-django-treebeard
or:
$ aptitude install python-django-treebeard
Remember that the packages included in linux distributions are usually not the most recent versions.
Add 'treebeard'
to the :djangoINSTALLED_APPS
section in your django settings file.
Note
If you are going to use the ~treebeard.admin.TreeAdmin
class, you need to add the path to treebeard's templates in :djangoTEMPLATE_DIRS
. Also you need to add django.template.context_processors.request
to :djangoTEMPLATES['OPTIONS']['context_processors']
setting in your django settings file (see https://docs.djangoproject.com/en/1.11/ref/templates/upgrading/ for how to define this setting within the TEMPLATES settings). For more recent versions of Django, use django.core.context_processors.request
instead.