mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
Merge branch 'master' into 'master'
Add an example to the notification documentation See merge request allianceauth/allianceauth!1652
This commit is contained in:
commit
90fcc4a811
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user