Я использую это: https://github.com/pinax/django-notification/blob/master/docs/usage.txt
Итак, я выполнил все шаги.
from notification import models as notification
#first, create the notification type.
notification.create_notice_type("comment_received", ("Comment Received"), ("You have received a comment."))
#then, send the notification.
notification.send(request.user, "comment_received", {})
Конечно, в своем каталоге шаблонов я создал «уведомление»,точно так же, как говорит документ.
Внутри /templates/notification/comment_received
, у меня есть 4 файла:
- full.txt, short.txt, note.html, full.html
Эти файлы сейчас пустые.Они просто произносят случайное предложение.
Почему я получаю эту ошибку, когда пытаюсь отправить уведомление?
Exception Type: NoReverseMatch at /
Exception Value: Reverse for 'notification_notices' with arguments '()' and keyword arguments '{}' not found.