Esempio n. 1
0
def reviews_notification(self, creator, template, context, action):
    recipients = list(action.target.node.contributors)
    time_now = action.date_created if action is not None else timezone.now()
    node = action.target.node
    emails.notify_global_event(event='global_reviews',
                               sender_user=creator,
                               node=node,
                               timestamp=time_now,
                               recipients=recipients,
                               template=template,
                               context=context)
Esempio n. 2
0
def reviews_notification(self, creator, template, context, action):
    # Avoid AppRegistryNotReady error
    from website.notifications.emails import notify_global_event
    recipients = list(action.target.node.contributors)
    time_now = action.created if action is not None else timezone.now()
    node = action.target.node
    notify_global_event(event='global_reviews',
                        sender_user=creator,
                        node=node,
                        timestamp=time_now,
                        recipients=recipients,
                        template=template,
                        context=context)
Esempio n. 3
0
def reviews_notification(self, creator, template, context, action):
    # Avoid AppRegistryNotReady error
    from website.notifications.emails import notify_global_event
    recipients = list(action.target.node.contributors)
    time_now = action.created if action is not None else timezone.now()
    node = action.target.node
    notify_global_event(
        event='global_reviews',
        sender_user=creator,
        node=node,
        timestamp=time_now,
        recipients=recipients,
        template=template,
        context=context
    )