コード例 #1
0
ファイル: models.py プロジェクト: willvongeldern/596acres
def send_organizer_watcher_update(sender, created=False, instance=None, **kwargs):
    """
    Send organizers and watchers of a given lot updates.
    """
    if instance and created:
        notify_organizers_and_watchers(instance)
        notify_facilitators(instance)
コード例 #2
0
ファイル: models.py プロジェクト: ssomnoremac/596acres
def send_organizer_watcher_update(sender, created=False, instance=None, **kwargs):
    """
    Send organizers and watchers of a given lot updates.
    """
    if instance and created:
        notify_organizers_and_watchers(instance)

        if isinstance(instance, Note):
            notify_managers(instance)
コード例 #3
0
def send_organizer_watcher_update(sender,
                                  created=False,
                                  instance=None,
                                  **kwargs):
    """
    Send organizers and watchers of a given lot updates.
    """
    if instance and created:
        notify_organizers_and_watchers(instance)
        notify_facilitators(instance)
コード例 #4
0
ファイル: forms.py プロジェクト: ssomnoremac/596acres
    def save(self, force_insert=False, force_update=False, commit=True):
        is_creating = False
        if not self.instance.id:
            is_creating = True

        organizer = super(self.__class__, self).save()
        if is_creating:
            notify_managers(organizer)
            notify_organizers_and_watchers(organizer)
        return organizer
コード例 #5
0
def create_organizer(sender, instance, **kwargs):
    """
    Once an Organizer is moderated and approved, make it official and let
    everyone know.
    """
    if not instance.is_approved:
        return

    add_action(sender, created=True, instance=instance, **kwargs)
    notify_organizers_and_watchers(instance)
    notify_facilitators(instance)
コード例 #6
0
ファイル: models.py プロジェクト: ebrelsford/596acres
def create_organizer(sender, instance, **kwargs):
    """
    Once an Organizer is moderated and approved, make it official and let
    everyone know.
    """
    if not instance.is_approved:
        return

    add_action(sender, created=True, instance=instance, **kwargs)
    notify_organizers_and_watchers(instance)
    notify_facilitators(instance)