Skip to main content

django implemention of the ltree postgres extension - this is a backport to Python 2.7/Django 1.11

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.

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_fork-0.4.3.tar.gz (5.0 kB view details)

Uploaded Source

File details

Details for the file django_ltree_fork-0.4.3.tar.gz.

File metadata

  • Download URL: django_ltree_fork-0.4.3.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.5

File hashes

Hashes for django_ltree_fork-0.4.3.tar.gz
Algorithm Hash digest
SHA256 de54ad95c274071aaf0e37b2bbcda9123c8dc6adde4c4c311b5f4c1632809b21
MD5 bd7b9e77e975385aaf119fff113b8a73
BLAKE2b-256 eb0e7fa7703afa3e3ab9c2bc2fbbb65620fd20b76e4d5f41c0f9f83929f85d52

See more details on using hashes here.

Provenance

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