mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-12 22:10:16 +02:00
Notify function
This commit is contained in:
parent
0622d2f146
commit
1d3d1b53a4
@ -0,0 +1,12 @@
|
|||||||
|
from .models import Notification
|
||||||
|
|
||||||
|
def notify(user, title, message=None, level='info'):
|
||||||
|
notif = Notification()
|
||||||
|
notif.user = user
|
||||||
|
notif.title = title
|
||||||
|
if not message:
|
||||||
|
message = Title
|
||||||
|
notif.message = message
|
||||||
|
notif.level = level
|
||||||
|
notif.save()
|
||||||
|
logger.info("Created notification %s" % notif
|
Loading…
x
Reference in New Issue
Block a user