• Florian Sachs's avatar
    Support Mass-delete with multiple pks · 1c7b8137
    Florian Sachs authored
    `contrib.sqla.view.ModelView.action_delete()` now is able to mass-delete models with multiple primary keys. Therefore, two new helper functions has been introduced in `contribg.sqla.tools`:
    
    * `tuple_operator_in()` that fakes the `sqlalchemy.tuple_` operator for engines, that do not support the `tuple_` operator. (like sqlite)
    * `get_query_for_ids()` that returns a query, object that contains all objects identified by the `ids`.
    
    Both functions have docstrings with more information.
    
    The logic of the `action_delete()` did not change, as for objects with a single primary key, the codepath did not change at all.
    1c7b8137
Name
Last commit
Last update
..
contrib Loading commit data...
form Loading commit data...
model Loading commit data...
static Loading commit data...
templates/admin Loading commit data...
tests Loading commit data...
translations Loading commit data...
__init__.py Loading commit data...
_backwards.py Loading commit data...
_compat.py Loading commit data...
actions.py Loading commit data...
babel.py Loading commit data...
base.py Loading commit data...
helpers.py Loading commit data...
tools.py Loading commit data...