crccheck / django-object-actions

A Django app for easily adding object tools in the Django admin
https://pypi.org/project/django-object-actions/
Apache License 2.0
680 stars 82 forks source link

New feature: inline forms #147

Open wlatanowicz opened 1 year ago

wlatanowicz commented 1 year ago

This PR adds an option to add a simple inline form next to the action button:

Screenshot 2022-11-18 at 11 34 42
crccheck commented 1 year ago

interesting. It would be nice to switch from a GET to a POST see #16 I'd want to split this PR into that first before adding a new feature.

For this specific use case of sending additional values to the action, I always thought about using an interstitial page instead of expanding what the button can do. I'm not so sure about adding this kind of functionality since Django Admin Actions don't have an equivalent

wlatanowicz commented 1 year ago

Thanks for the comment. I'll create a separate PR for POST. It's already in a separate commit.

For inline forms: Adding inline forms does not prevent you from using interstitial pages. IMO It's just handy to have the option to add a simple input instead of building a separate two-stage form. You gave me something to think about, though. I'm going to rename the property to inline_form for sure. Another thing is that maybe I can easily use a similar concept to build interstitial pages, so you don't have to struggle with templates on your own. Give me a couple of days to play around with it.