コード例 #1
0
ファイル: handlers.py プロジェクト: rvanlaar/easy-transifex
def connect():
    post_save_translation.connect(save_copyrights)
    lotte_save_translation.connect(lotte_copyrights)
コード例 #2
0
ファイル: handlers.py プロジェクト: 593in/transifex
                Q(projects_maintaining=project) |
                Q(team_coordinators__project=project)).distinct()

            # Notification
            context = {'project': release.project, 'release': release,
                'resource': resource}
            if release.project != project:
                context.update({'parent_project': project})

            nt = "project_release_stringfreeze_breakage"
            #TODO: Add support for actionlog without a user author.
            #action_logging(None, [project, release], nt, context=context)
            if settings.ENABLE_NOTICES:
                notification.send(users, nt, context)


# Connect handlers to populate 'all' release (more info in handler docstrings):
signals.post_save.connect(release_all_push, sender=Resource)
signals.post_delete.connect(release_all_pop, sender=Resource)

# Connect handlers to notify people whenever the specific signals from txcron
# are raise.
label = settings.RELEASE_NOTIFICATION_CRON['notify_string_freeze']
getattr(txcron_signals, label).connect(notify_string_freeze)

label = settings.RELEASE_NOTIFICATION_CRON['notify_translation_deadline']
getattr(txcron_signals, label).connect(notify_translation_deadline)

# Connect handler for string freeze breakage to the RLStats post_save signal
post_save_translation.connect(check_and_notify_string_freeze_breakage)
コード例 #3
0
def connect():
    post_save_translation.connect(save_copyrights)
    lotte_save_translation.connect(save_copyrights)
コード例 #4
0
            # Notification
            context = {
                'project': release.project,
                'release': release,
                'resource': resource
            }
            if release.project != project:
                context.update({'parent_project': project})

            nt = "project_release_stringfreeze_breakage"
            #TODO: Add support for actionlog without a user author.
            #action_logging(None, [project, release], nt, context=context)
            if settings.ENABLE_NOTICES:
                notification.send(users, nt, context)


# Connect handlers to populate 'all' release (more info in handler docstrings):
signals.post_save.connect(release_all_push, sender=Resource)
signals.post_delete.connect(release_all_pop, sender=Resource)

# Connect handlers to notify people whenever the specific signals from txcron
# are raise.
label = settings.RELEASE_NOTIFICATION_CRON['notify_string_freeze']
getattr(txcron_signals, label).connect(notify_string_freeze)

label = settings.RELEASE_NOTIFICATION_CRON['notify_translation_deadline']
getattr(txcron_signals, label).connect(notify_translation_deadline)

# Connect handler for string freeze breakage to the RLStats post_save signal
post_save_translation.connect(check_and_notify_string_freeze_breakage)