Skip to main content

Django app to support ltree postgres extension

Project description

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

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

Build Status

codecov

Coverage Status

Links

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_ltree-0.5.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

django_ltree-0.5.1-py2.py3-none-any.whl (8.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django_ltree-0.5.1.tar.gz.

File metadata

  • Download URL: django_ltree-0.5.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.1

File hashes

Hashes for django_ltree-0.5.1.tar.gz
Algorithm Hash digest
SHA256 18a8469539768fefe8996277461e2db44a44ac456e2673b7fbc51ec1cf5bf12e
MD5 3980338dadda6e9c4018ecbd9327861d
BLAKE2b-256 c1f5b8f6a2ec873e325e4f9a11d2558c1da9dce95098452e5f07f2c57d234761

See more details on using hashes here.

File details

Details for the file django_ltree-0.5.1-py2.py3-none-any.whl.

File metadata

  • Download URL: django_ltree-0.5.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.1

File hashes

Hashes for django_ltree-0.5.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 837c38a5587c183175f1890130e5740578143dfc2e8eb9f73b2ee0ee5c2f7b95
MD5 5b2a4170673d5d0a9fa9f93b05956507
BLAKE2b-256 c4719ca33b9a85137fd5f63270dc82ad1b376b6e8c0ddfb1eeaaa563c24cbf1d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page