1

Using django-notification from https://github.com/pinax/django-notification, I'm trying to attach extra content to my notifcation like so:

       notification.send_now([b.person], 
                          "employee_access_request", 
                          {"from_user": request.user.email,
                           "time_sent": timezone.localtime(timezone.now())}
                          )

Only problem is I have no idea on how to access this extra content, like "from_user" for example, and the documentation doesnt really explain it. I have tried something like

notices = notification.NoticeSetting.objects.filter(user = user)
for notice in notices:
    print(notice.from_user)

but thats not right. Can anyone help?

ryan
  • 1,451
  • 11
  • 27
  • Where are you trying to access it? It doesn't look like the fact that a notification was sent, or what was in it, is stored anywhere; it just sends it. You should be able to use that context in templates if you make your own backend. – Stephen Feb 13 '14 at 23:46

0 Answers0