mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-05 22:56:20 +01:00
Bulk of the profile work is done.
This commit is contained in:
@@ -19,14 +19,15 @@ class NotificationHandler(logging.Handler):
|
||||
message += "\n\n"
|
||||
message = message + record.exc_text
|
||||
|
||||
users = User.objects.filter(Q(groups__permissions=perm) | Q(user_permissions=perm) | Q(is_superuser=True)).distinct()
|
||||
users = User.objects.filter(
|
||||
Q(groups__permissions=perm) | Q(user_permissions=perm) | Q(is_superuser=True)).distinct()
|
||||
|
||||
for user in users:
|
||||
notify(
|
||||
user,
|
||||
"%s [%s:%s]" % (record.levelname, record.funcName, record.lineno),
|
||||
level = str([item[0] for item in Notification.LEVEL_CHOICES if item[1] == record.levelname][0]),
|
||||
message = message
|
||||
level=str([item[0] for item in Notification.LEVEL_CHOICES if item[1] == record.levelname][0]),
|
||||
message=message
|
||||
)
|
||||
except Permission.DoesNotExist:
|
||||
pass
|
||||
|
||||
20
notifications/migrations/0003_auto_20170322_2335.py
Normal file
20
notifications/migrations/0003_auto_20170322_2335.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.5 on 2017-03-22 23:35
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('notifications', '0002_auto_20160910_1649'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='notification',
|
||||
name='level',
|
||||
field=models.CharField(choices=[('danger', 'CRITICAL'), ('danger', 'ERROR'), ('warning', 'WARN'), ('info', 'INFO'), ('success', 'DEBUG')], max_length=10),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user