Skip to main content

Django Admin addon to navigate through hierarchies

Project description

https://github.com/idlesign/django-admirarchy

release lic coverage

Description

Django Admin addon to navigate through hierarchies.

Have you ever wanted Django Admin to be able to navigate through hierarchies?

Without existing models modifications? Yeah!

Admirarchy does it in an old-school way, just like Norton Commander and Co - one level at a time.

Hierarchies described as adjacency lists and nested sets are supported.

# admin.py of your application
from django.contrib import admin

from admirarchy.toolbox import HierarchicalModelAdmin

from .models import MyModel  # Let's say this model represents a hierarchy.


# Inherit from HierarchicalModelAdmin instead of admin.ModelAdmin
@admin.register(MyModel)
class MyModelAdmin(HierarchicalModelAdmin):

    hierarchy = True  # This enables hierarchy handling.

Done. Go navigate %)

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-admirarchy-1.2.2.tar.gz (16.4 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page