Skip to content

decorators.signals

receiver

1
receiver(signal: str, senders: Union[Type["Model"], List[Type["Model"]]]) -> Callable

Connect given function to all senders for given signal name.

Arguments:

  • signal: name of the signal to register to :type signal: str
  • senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]]

Returns:

returns the original function untouched :rtype: Callable

post_save

1
post_save(senders: Union[Type["Model"], List[Type["Model"]]]) -> Callable

Connect given function to all senders for post_save signal.

Arguments:

  • senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]]

Returns:

returns the original function untouched :rtype: Callable

post_update

1
post_update(senders: Union[Type["Model"], List[Type["Model"]]]) -> Callable

Connect given function to all senders for post_update signal.

Arguments:

  • senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]]

Returns:

returns the original function untouched :rtype: Callable

post_delete

1
post_delete(senders: Union[Type["Model"], List[Type["Model"]]]) -> Callable

Connect given function to all senders for post_delete signal.

Arguments:

  • senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]]

Returns:

returns the original function untouched :rtype: Callable

pre_save

1
pre_save(senders: Union[Type["Model"], List[Type["Model"]]]) -> Callable

Connect given function to all senders for pre_save signal.

Arguments:

  • senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]]

Returns:

returns the original function untouched :rtype: Callable

pre_update

1
pre_update(senders: Union[Type["Model"], List[Type["Model"]]]) -> Callable

Connect given function to all senders for pre_update signal.

Arguments:

  • senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]]

Returns:

returns the original function untouched :rtype: Callable

pre_delete

1
pre_delete(senders: Union[Type["Model"], List[Type["Model"]]]) -> Callable

Connect given function to all senders for pre_delete signal.

Arguments:

  • senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]]

Returns:

returns the original function untouched :rtype: Callable

pre_relation_add

1
pre_relation_add(senders: Union[Type["Model"], List[Type["Model"]]]) -> Callable

Connect given function to all senders for pre_relation_add signal.

Arguments:

  • senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]]

Returns:

returns the original function untouched :rtype: Callable

post_relation_add

1
post_relation_add(senders: Union[Type["Model"], List[Type["Model"]]]) -> Callable

Connect given function to all senders for post_relation_add signal.

Arguments:

  • senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]]

Returns:

returns the original function untouched :rtype: Callable

pre_relation_remove

1
pre_relation_remove(senders: Union[Type["Model"], List[Type["Model"]]]) -> Callable

Connect given function to all senders for pre_relation_remove signal.

Arguments:

  • senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]]

Returns:

returns the original function untouched :rtype: Callable

post_relation_remove

1
post_relation_remove(senders: Union[Type["Model"], List[Type["Model"]]]) -> Callable

Connect given function to all senders for post_relation_remove signal.

Arguments:

  • senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]]

Returns:

returns the original function untouched :rtype: Callable