Metadata-Version: 2.1
Name: django-ltree
Version: 0.5.1
Summary: Django app to support ltree postgres extension
Home-page: https://github.com/mariocesar/django-ltree
Author: Mario César Señoranis Ayala
Author-email: mariocesar@humanzilla.com
License: MIT
Project-URL: Source, https://github.com/mariocesar/django_ltree
Project-URL: Tracker, https://github.com/mariocesar/django_ltree/issues
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.11
Classifier: Framework :: Django :: 2.1
Classifier: Framework :: Django :: 2.2
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=2.7
Description-Content-Type: text/markdown
Requires-Dist: django (>=1.11)
Requires-Dist: six
Provides-Extra: develop
Requires-Dist: twine ; extra == 'develop'
Requires-Dist: tox ; extra == 'develop'

# django-ltree

An tree extension implementation to support hierarchical tree-like data in Django models,
using the native Postgres extension `ltree`.

Postgresql has already a optimized and very useful tree implementation for data.
The extension is [ltree](https://www.postgresql.org/docs/9.6/static/ltree.html)

This fork contains a backport to Django 1.11 and Python 2.7.

[![Build Status](https://travis-ci.org/mariocesar/django-ltree.svg?branch=master)](https://travis-ci.org/mariocesar/django-ltree)

[![codecov](https://codecov.io/gh/mariocesar/django-ltree/branch/master/graph/badge.svg)](https://codecov.io/gh/mariocesar/django-ltree)

[![Coverage Status](https://coveralls.io/repos/github/mariocesar/django-ltree/badge.svg?branch=master)](https://coveralls.io/github/mariocesar/django-ltree?branch=master)


## Links

 - Pypi https://pypi.org/project/django-ltree/
 - Source code https://github.com/mariocesar/django-ltree
 - Bugs https://github.com/mariocesar/django-ltree/issues
 - Contribute https://github.com/mariocesar/django-ltree/pulls
 - Documentation `TODO`

## Install

```
pip install django-ltree
```

Then add `django_ltree` to `INSTALLED_APPS` in your Django project settings.

And make sure to run `django_ltree` migrations before you added the `PathField`

```
python manage.py migrate django_ltree
```

`django_ltree` migrations will install the `ltree` extension if not exist.

You can alternatively specify the `django_ltree` dependency in the migrations of
your applications that requires `PathField`, and run migrations smoothly.

```
class Migration(migrations.Migration):
    dependencies = [
            ('django_ltree', '__latest__'),
    ]
```

## Requires

- Django 1.11 or superior
- Python 2

## Testing

Make sure you have Postgres installed. Then simply run `tox` in the root directory of the project.


