:mod:`turbo.decorators` ======================= .. py:module:: turbo.decorators Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: turbo.decorators.register turbo.decorators.post_save_broadcast_model turbo.decorators.post_delete_broadcast_model .. function:: register(*models, site=None) Register the given model(s) classes with the ModelBroadcast. This attaches the on_save and on_delete methods to the provided model signals. .. code-block:: python @turbo.register(Room) class RoomBroadcast(turbo.ModelBroadcast): def on_save(self, room, created, *args, **kwargs): pass def on_delete(self, room, *args, **kwargs): pass .. function:: post_save_broadcast_model(sender, instance, **kwargs) .. function:: post_delete_broadcast_model(sender, instance, **kwargs)