Add an example to the notification documentation

This commit is contained in:
r0kym 2024-09-23 13:15:19 +02:00
parent 42ee06470c
commit 07c62ed32a

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