Django app to support ltree postgres extension
Project description
django-ltree
A 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
This fork contains a backport to Django 1.11 and Python 2.7.
Links
- Pypi https://pypi-hypernode.com/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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_ltree-0.5.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 244e7e2d0bc631d39f6b6620b2023178b8bbbde9c06f0c8f9777a75223bfaa71 |
|
MD5 | e4c23b89c033cf6543a79957fab0d277 |
|
BLAKE2b-256 | 6294de2555c1e901507c7c685c53e6db3dc9e19ce631fc629043f9a04d679139 |