Continual of django-ltree
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 is a continuation of the work done by mariocesar
on django-ltree
and merges the work done by simkimsia
on greendeploy-django-ltree
Install
pip install django-ltree
Then add django_ltree
to INSTALLED_APPS
in your Django project settings.
INSTALLED_APPS = [
...,
'django_ltree',
...
]
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 5.0 or superior
- Python 3.10 or higher
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_2-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8430c6d5e2eb431c8cab8f59c2bf46413242a233a50cc06c4ac5ace7fc44f30 |
|
MD5 | f6a8ba0bf66cb6a8feb31378fb877adc |
|
BLAKE2b-256 | a56ed5e67a28d41e9087cbd7cf44bacec12b544a4f2684ee28d7ea9e39f4d55b |