This commit is contained in:
collerek
2021-06-08 14:34:02 +02:00
parent a1557273b0
commit 96c9615229
49 changed files with 1917 additions and 994 deletions

View File

@ -12,13 +12,13 @@ Connect given function to all senders for given signal name.
**Arguments**:
- `signal (str)`: name of the signal to register to
- `senders (Union[Type["Model"], List[Type["Model"]]])`: one or a list of "Model" classes
that should have the signal receiver registered
- `signal` (`str`): name of the signal to register to
- `senders` (`Union[Type["Model"], List[Type["Model"]]]`): one or a list of "Model" classes
**Returns**:
`(Callable)`: returns the original function untouched
`Callable`: returns the original function untouched
<a name="decorators.signals.post_save"></a>
#### post\_save
@ -31,12 +31,12 @@ Connect given function to all senders for post_save signal.
**Arguments**:
- `senders (Union[Type["Model"], List[Type["Model"]]])`: one or a list of "Model" classes
that should have the signal receiver registered
- `senders` (`Union[Type["Model"], List[Type["Model"]]]`): one or a list of "Model" classes
**Returns**:
`(Callable)`: returns the original function untouched
`Callable`: returns the original function untouched
<a name="decorators.signals.post_update"></a>
#### post\_update
@ -49,12 +49,12 @@ Connect given function to all senders for post_update signal.
**Arguments**:
- `senders (Union[Type["Model"], List[Type["Model"]]])`: one or a list of "Model" classes
that should have the signal receiver registered
- `senders` (`Union[Type["Model"], List[Type["Model"]]]`): one or a list of "Model" classes
**Returns**:
`(Callable)`: returns the original function untouched
`Callable`: returns the original function untouched
<a name="decorators.signals.post_delete"></a>
#### post\_delete
@ -67,12 +67,12 @@ Connect given function to all senders for post_delete signal.
**Arguments**:
- `senders (Union[Type["Model"], List[Type["Model"]]])`: one or a list of "Model" classes
that should have the signal receiver registered
- `senders` (`Union[Type["Model"], List[Type["Model"]]]`): one or a list of "Model" classes
**Returns**:
`(Callable)`: returns the original function untouched
`Callable`: returns the original function untouched
<a name="decorators.signals.pre_save"></a>
#### pre\_save
@ -85,12 +85,12 @@ Connect given function to all senders for pre_save signal.
**Arguments**:
- `senders (Union[Type["Model"], List[Type["Model"]]])`: one or a list of "Model" classes
that should have the signal receiver registered
- `senders` (`Union[Type["Model"], List[Type["Model"]]]`): one or a list of "Model" classes
**Returns**:
`(Callable)`: returns the original function untouched
`Callable`: returns the original function untouched
<a name="decorators.signals.pre_update"></a>
#### pre\_update
@ -103,12 +103,12 @@ Connect given function to all senders for pre_update signal.
**Arguments**:
- `senders (Union[Type["Model"], List[Type["Model"]]])`: one or a list of "Model" classes
that should have the signal receiver registered
- `senders` (`Union[Type["Model"], List[Type["Model"]]]`): one or a list of "Model" classes
**Returns**:
`(Callable)`: returns the original function untouched
`Callable`: returns the original function untouched
<a name="decorators.signals.pre_delete"></a>
#### pre\_delete
@ -121,12 +121,12 @@ Connect given function to all senders for pre_delete signal.
**Arguments**:
- `senders (Union[Type["Model"], List[Type["Model"]]])`: one or a list of "Model" classes
that should have the signal receiver registered
- `senders` (`Union[Type["Model"], List[Type["Model"]]]`): one or a list of "Model" classes
**Returns**:
`(Callable)`: returns the original function untouched
`Callable`: returns the original function untouched
<a name="decorators.signals.pre_relation_add"></a>
#### pre\_relation\_add
@ -139,12 +139,12 @@ Connect given function to all senders for pre_relation_add signal.
**Arguments**:
- `senders (Union[Type["Model"], List[Type["Model"]]])`: one or a list of "Model" classes
that should have the signal receiver registered
- `senders` (`Union[Type["Model"], List[Type["Model"]]]`): one or a list of "Model" classes
**Returns**:
`(Callable)`: returns the original function untouched
`Callable`: returns the original function untouched
<a name="decorators.signals.post_relation_add"></a>
#### post\_relation\_add
@ -157,12 +157,12 @@ Connect given function to all senders for post_relation_add signal.
**Arguments**:
- `senders (Union[Type["Model"], List[Type["Model"]]])`: one or a list of "Model" classes
that should have the signal receiver registered
- `senders` (`Union[Type["Model"], List[Type["Model"]]]`): one or a list of "Model" classes
**Returns**:
`(Callable)`: returns the original function untouched
`Callable`: returns the original function untouched
<a name="decorators.signals.pre_relation_remove"></a>
#### pre\_relation\_remove
@ -175,12 +175,12 @@ Connect given function to all senders for pre_relation_remove signal.
**Arguments**:
- `senders (Union[Type["Model"], List[Type["Model"]]])`: one or a list of "Model" classes
that should have the signal receiver registered
- `senders` (`Union[Type["Model"], List[Type["Model"]]]`): one or a list of "Model" classes
**Returns**:
`(Callable)`: returns the original function untouched
`Callable`: returns the original function untouched
<a name="decorators.signals.post_relation_remove"></a>
#### post\_relation\_remove
@ -193,10 +193,10 @@ Connect given function to all senders for post_relation_remove signal.
**Arguments**:
- `senders (Union[Type["Model"], List[Type["Model"]]])`: one or a list of "Model" classes
that should have the signal receiver registered
- `senders` (`Union[Type["Model"], List[Type["Model"]]]`): one or a list of "Model" classes
**Returns**:
`(Callable)`: returns the original function untouched
`Callable`: returns the original function untouched

View File

@ -12,11 +12,11 @@ Checks if function accepts **kwargs.
**Arguments**:
- `func (function)`: function which signature needs to be checked
- `func` (`function`): function which signature needs to be checked
**Returns**:
`(bool)`: result of the check
`bool`: result of the check
<a name="signals.signal.make_id"></a>
#### make\_id
@ -29,11 +29,11 @@ Creates id of a function or method to be used as key to store signal
**Arguments**:
- `target (Any)`: target which id we want
- `target` (`Any`): target which id we want
**Returns**:
`(int)`: id of the target
`int`: id of the target
<a name="signals.signal.Signal"></a>
## Signal Objects
@ -61,7 +61,7 @@ or not accept **kwargs
**Arguments**:
- `receiver (Callable)`: receiver function
- `receiver` (`Callable`): receiver function
<a name="signals.signal.Signal.disconnect"></a>
#### disconnect
@ -74,11 +74,11 @@ Removes the receiver function from the signal.
**Arguments**:
- `receiver (Callable)`: receiver function
- `receiver` (`Callable`): receiver function
**Returns**:
`(bool)`: flag if receiver was removed
`bool`: flag if receiver was removed
<a name="signals.signal.Signal.send"></a>
#### send
@ -91,8 +91,8 @@ Notifies all receiver functions with given kwargs
**Arguments**:
- `sender (Type["Model"])`: model that sends the signal
- `kwargs (Any)`: arguments passed to receivers
- `sender` (`Type["Model"]`): model that sends the signal
- `kwargs` (`Any`): arguments passed to receivers
<a name="signals.signal.SignalEmitter"></a>
## SignalEmitter Objects