Merge branch 'master' into 'master'

Add an example to the notification documentation

See merge request allianceauth/allianceauth!1652
This commit is contained in:
Ariel Rin 2024-10-04 12:05:17 +00:00
commit 90fcc4a811

View File

@ -1 +1,21 @@
"""
Example
=======
.. code-block:: python
from allianceauth.notifications.models import Notification
def notify_user_view(request):
'''Simple view sending a notification to the user'''
Notification.objects.notify_user(
user=request.user,
title="Some title",
message="Some message",
level=Notification.Level.INFO,
)
"""
from .core import notify # noqa: F401