--- id: django-nonrelated-inlines version: "0.2" license: MIT license_treatment: permissive maintenance: dormant --- # django-nonrelated-inlines — Django admin inlines for unrelated models License: permissive · Maintenance: dormant · Downloads: 172.3K/mo ## What it is and what it does django-nonrelated-inlines extends Django's admin interface to support inline editing of models that have no direct foreign key relationship. Normally, Django inlines require a ForeignKey linking the child model to the parent; this package removes that constraint by letting you define custom logic to determine which child objects belong to a parent and how to save that association. You subclass either NonrelatedStackedInline or NonrelatedTabularInline and implement two methods: get_form_queryset() to return the child objects to display for a given parent, and save_new_instance() to establish the relationship when a new child is saved. This is useful when models are related by a shared attribute (like email address) rather than an explicit database key, or when the relationship is computed or stored elsewhere. Use it for: - Display invoices linked to a customer by email address in the customer admin page without a ForeignKey field. - Show related records from a legacy database where relationships are stored outside the ORM. - Manage many-to-many-like associations stored in a separate table or external system. - Build admin inlines for models related by computed logic rather than direct foreign keys. - Prototype admin interfaces quickly when the relationship model is not yet finalized. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Django admin inline classes that let you display and edit models without explicit foreign key relationships, using custom queryset and save logic you define. Yes, if you need nonrelated inlines and are using Django 2.0–4.0 on Python 3.6–3.10. The package is dormant (no updates since June 2022), so compatibility with newer Django or Python releases is uncertain. Test thoroughly in your environment before relying on it in production. For active maintenance and support, consider whether a custom admin solution or a maintained alternative would be safer. ## Install pip install django-nonrelated-inlines uv add django-nonrelated-inlines poetry add django-nonrelated-inlines ## Installing django-nonrelated-inlines Before you install: Low install friction with a single dependency on Django. Maintenance is dormant—last release was 2022-06-06 and the repository has not been updated since 2024-10-02, so expect no active support or updates for newer Django versions. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions. Quickstart: pip install django-nonrelated-inlines from django_nonrelated_inlines.admin import NonrelatedStackedInline class MyInline(NonrelatedStackedInline): model = MyModel def get_form_queryset(self, obj): return MyModel.objects.filter(some_field=obj.some_field) def save_new_instance(self, parent, instance): instance.some_field = parent.some_field Requires Django to be installed; package is dormant and may not support the latest Django versions. Verify before relying: - Compatibility with Django versions released after 4.0 (latest classifier in fact sheet). - Whether the package works with current Python 3.10+ minor releases and future versions. - Active maintenance status and responsiveness to issues or pull requests. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 172.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django admin inlines unrelated models, django inline without foreign key, django admin custom relationship, django nonrelated inline forms, django admin inline queryset filter, django stacked tabular inline custom, django admin inline save logic, django-admin, orm-extension [View on SkillFed](https://skillfed.io/packages/django-nonrelated-inlines) · [View on PyPI](https://pypi.org/project/django-nonrelated-inlines/)