decorators
Module with all decorators that are exposed for users.
Currently only:
- predefined signals decorators (pre/post + save/update/delete)
post_bulk_update(senders)
Connect given function to all senders for post_bulk_update signal.
:param senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]] :return: returns the original function untouched :rtype: Callable
Source code in ormar/decorators/signals.py
176 177 178 179 180 181 182 183 184 185 186 |
|
post_delete(senders)
Connect given function to all senders for post_delete signal.
:param senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]] :return: returns the original function untouched :rtype: Callable
Source code in ormar/decorators/signals.py
70 71 72 73 74 75 76 77 78 79 80 |
|
post_relation_add(senders)
Connect given function to all senders for post_relation_add signal.
:param senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]] :return: returns the original function untouched :rtype: Callable
Source code in ormar/decorators/signals.py
135 136 137 138 139 140 141 142 143 144 145 |
|
post_relation_remove(senders)
Connect given function to all senders for post_relation_remove signal.
:param senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]] :return: returns the original function untouched :rtype: Callable
Source code in ormar/decorators/signals.py
161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
post_save(senders)
Connect given function to all senders for post_save signal.
:param senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]] :return: returns the original function untouched :rtype: Callable
Source code in ormar/decorators/signals.py
44 45 46 47 48 49 50 51 52 53 54 |
|
post_update(senders)
Connect given function to all senders for post_update signal.
:param senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]] :return: returns the original function untouched :rtype: Callable
Source code in ormar/decorators/signals.py
57 58 59 60 61 62 63 64 65 66 67 |
|
pre_delete(senders)
Connect given function to all senders for pre_delete signal.
:param senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]] :return: returns the original function untouched :rtype: Callable
Source code in ormar/decorators/signals.py
109 110 111 112 113 114 115 116 117 118 119 |
|
pre_relation_add(senders)
Connect given function to all senders for pre_relation_add signal.
:param senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]] :return: returns the original function untouched :rtype: Callable
Source code in ormar/decorators/signals.py
122 123 124 125 126 127 128 129 130 131 132 |
|
pre_relation_remove(senders)
Connect given function to all senders for pre_relation_remove signal.
:param senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]] :return: returns the original function untouched :rtype: Callable
Source code in ormar/decorators/signals.py
148 149 150 151 152 153 154 155 156 157 158 |
|
pre_save(senders)
Connect given function to all senders for pre_save signal.
:param senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]] :return: returns the original function untouched :rtype: Callable
Source code in ormar/decorators/signals.py
83 84 85 86 87 88 89 90 91 92 93 |
|
pre_update(senders)
Connect given function to all senders for pre_update signal.
:param senders: one or a list of "Model" classes that should have the signal receiver registered :type senders: Union[Type["Model"], List[Type["Model"]]] :return: returns the original function untouched :rtype: Callable
Source code in ormar/decorators/signals.py
96 97 98 99 100 101 102 103 104 105 106 |
|