예제 #1
0
def handle_abuse_message(message):
    message = json.loads(message)
    admins = []
    if message.get('instance'):
        instance = model.Instance.find(message.get('instance'))
        admins = get_instance_admins(instance)
    else:
        admins = get_global_admins()
    for admin in admins:
        i18n.user_language(admin)
        subject = _("Abuse report: %s") % message.get('url')
        body = _("%(user)s has reported abuse on the page %(url)s:"
                 "\r\n\r\n%(message)s")
        body = body % message
        mail.to_user(admin, subject, body)
예제 #2
0
파일: notification.py 프로젝트: alkadis/vcv
 def language_context(self):
     from adhocracy import i18n
     return i18n.user_language(self.user)
예제 #3
0
 def language_context(self):
     return i18n.user_language(self.user)
예제 #4
0
 def language_context(self):
     return i18n.user_language(self.user)
예제 #5
0
파일: notification.py 프로젝트: alkadis/vcv
 def language_context(self):
     from adhocracy import i18n
     return i18n.user_language(self.user)