This ticket
#11574 is open from many years ago. I'm interested to contribute with this new feature but, if this ticket has a lot of time opened, and is very possible that there are some reservations and consideration about this feature. Before use time to build a solution, i think that will be useful discuss about this topic with the community.
Similar to `InlineModelAdmin`, I consider that this feature won't be useful for all models, is really useful for models with few fields. But, adding new records directly in the `changelist` would be util like the feature `InlineModelAdmin`, for little models. For a big model won't be impossible, but the admin form will be more usable.
I have an idea to complete this task and is the following:
- Add a new attribute to the class `ModelAdmin`, to specify how many blank rows will be shown by default when the `changelist` is rendered. The new attribute would be named `list_editable_extra`, as was proposed in the ticket description. This attribute will be used basically to set as `extra` value in ModelAdmin.get_changelist_formset.
- As was described in the ticket; "Adapt the `result_list` template tag in `admin_list.py` to show the extra forms. This can be done by calling `items_for_result` with an empty model for each empty form". I tested that suggestion and works good.
- Avoid to render the `checkbox` "action-select" for the blank rows in the `changelist` action column, in order to avoid problems with changelist's actions.
- Add functionality similar to `InlineModelAdmin`, in order to add or to delete blank rows.
- Add tests for the solution, including `Selenium` tests.
- Add documentation about the new feature.
I evaluated 2 possibilities to reach that, both possibilities with different impact in the Django's code.
- Render in the blank row as editable fields, only the `list_editable` fields. With this solution we need to modify less code's lines to render the blank rows. Is necessary to be clear in the documentation that this feature only will be able if the `list_editable` has been set, and could be edited only the fields added to `list_editable` tuple.
- Render in the blank row as editable fields, all `list_display` fields. With this solution we need to make more adjusts in order to render the blank rows successfully. Is necessary to be clear in the documentation that this feature only will be able if the `list_display` has been set, and could be edited this time only the fields added to `list_display` tuple.
I know that there are some obstacles that I will go finding in the way to reach this goal, but it's a simple resume of my idea. I'm open to better ideas.