baseplate-admin / django-ltree-2

Postgres LTree support for django

Home Page:https://django-ltree-2.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

django-ltree

Downloads Documentation Status CI Pypi Badge pre-commit.ci status

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-2

Then add django_ltree to INSTALLED_APPS in your Django project settings.

INSTALLED_APPS = [
    ...,
    'django_ltree',
    ...
]

Then use it like this:

from django_ltree.models import TreeModel


class CustomTree(TreeModel):
    ...

Requires

  • Django 3.2 or superior
  • Python 3.9 or higher

About

Postgres LTree support for django

https://django-ltree-2.readthedocs.io/en/latest/

License:MIT License


Languages

Language:Python 94.3%Language:Dockerfile 4.9%Language:Makefile 0.8%