Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-discover child models and inlines #582

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

piranna
Copy link

@piranna piranna commented Feb 29, 2024

Allow by default to inspect for Model and Inline subclasses to populate the admin forms. Also raise a proper exception in case there are no child models defined.

Fixes #576.

@j-antunes
Copy link
Contributor

Could you also add a unit test?

@piranna
Copy link
Author

piranna commented Feb 29, 2024

Could you also add a unit test?

Where could I add them? polymorphic/tests folder?

@j-antunes
Copy link
Contributor

@piranna - That's a good place!

polymorphic/admin/inlines.py Outdated Show resolved Hide resolved
polymorphic/admin/inlines.py Show resolved Hide resolved
polymorphic/admin/parentadmin.py Outdated Show resolved Hide resolved
@piranna
Copy link
Author

piranna commented Aug 28, 2024

Sorry for keep this open so much time, I have been focused on other parts of our project, but I think we are ready to get this PR merged. What else is needed to do?

@piranna
Copy link
Author

piranna commented Sep 2, 2024

Fixed concerns and linting, only missing one are tests, but I don't see how to run them. Anyway, we have already this PR running on production on our systems.

@piranna piranna requested a review from akx September 5, 2024 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add PolymorphicInlineModelAdmin.get_child_inlines()
3 participants