mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-11 17:46:20 +01:00
Notify function
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user