shinneider / django-admin-inline-paginator

MIT License
128 stars 21 forks source link

support nested_admin #31

Open MahmoodAbuIssa96 opened 1 year ago

MahmoodAbuIssa96 commented 1 year ago

will you add support for nested_admin ?

diamonddev107 commented 1 year ago

@MahmoodAbuIssa96 can you elaborate what you mean by support?

coldcloudgold commented 1 year ago

@diamonddev107

I would also like to see support for the django-nested-admin package Something like:

from django_admin_inline_paginator.admin import InlinePaginated
from nested_admin.nested import NestedModelAdmin, NestedStackedInline

class NestedStackedInlinePaginated(InlinePaginated, NestedStackedInline):
    pass

class MyModel1StackedInlinePaginatedAdmin(NestedStackedInlinePaginated):
    model = MyModel1
    ...

class MyModel2StackedInlinePaginatedAdmin(NestedStackedInlinePaginated):
    model = MyModel2
    inlines = (MyModel1StackedInlinePaginatedAdmin,)
    ...

@admin.register(MyModel3)
class MyModel3StackedInlinePaginatedAdmin(NestedModelAdmin):
    inlines = (MyModel2StackedInlinePaginatedAdmin,)
    ...