-
Couldn't load subscription status.
- Fork 1.2k
Closed
Description
For example, when sending pre_save:
mongoengine/mongoengine/document.py
Line 301 in b42b760
| signals.pre_save.send(self.__class__, document=self) |
it would be convenient if kwargs was passed as well, so that application code could pass information from save to signal handlers, like:
self.save('some_flag'=True)
...
def pre_save(self, **kwargs):
...
if kwargs.get('some_flag'):
...
Workaround right now is to hang it off of _data:
self._data['_some_flag']=True
self.save()
...
def pre_save(self, **kwargs):
...
if self._data.get('_some_flag'):
...
Metadata
Metadata
Assignees
Labels
No labels