Skip to content

Instantly share code, notes, and snippets.

View manuelep's full-sized avatar

Manuele Pesenti manuelep

  • Gter (https://www.gter.it/)
  • Genova (GE)
View GitHub Profile
@transaction.commit_on_success
def _action(action, o):
getattr(o,action)()
o.is_processing = False
o.save()
def _bulk_action(action, objs):
for o in objs:
_action(action,o)