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

Feature Request: Support for inlines #3

Open
sandro-qiang opened this issue Nov 14, 2024 · 3 comments
Open

Feature Request: Support for inlines #3

sandro-qiang opened this issue Nov 14, 2024 · 3 comments
Labels
feature New feature or request

Comments

@sandro-qiang
Copy link

No description provided.

@michalpokusa
Copy link
Owner

Could you elaborate on the idea?

@sandro-qiang
Copy link
Author

I need to implement something like stackinline in modeladmin, the main form for some options, and a related formset for none or one or more additional options group.

@michalpokusa
Copy link
Owner

I think I understand what you mean.

Inlines are not part of the standard Django forms api, in ModelAdmin they represent instances of other models, but in this case, they would probably be passed as a list of dicts, where each dict represent one record in inline.

I will have to check, how cumbersome it would be to implement them, but this is definitely not a quick thing to do.

To be honest, I am not 100% sure that this should be implemented, if it turns out it requires a lot of hacks or partial/complete rewrite of Django original logic, I might pass on that.

Nevertheless, I will check what can be done here.

PS. Another approach to you problem might be to create models that represent your options structure, and create objects of them, on which you can later can run actions, even without this library. Of course, it is not as straightforward, but might be worth looking into. 🙂

@michalpokusa michalpokusa added the feature New feature or request label Nov 15, 2024
@michalpokusa michalpokusa changed the title Can support multiple forms or formset ? Feature Request: Support for inlines Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants