I have been developing in django for sometime now, and have developed a neat website having functionality such as writing blogs, posting questions, sharing content etc. However there is still one thing that is missing and i.e. creating notification for users.
What I want to do is to inform users in their profiles, whenever somebody comments on their posts, or if they are following a particular post and there is an update on it, then inform the user of that update. I have looked around many applications but I am still very confused about how to do it.
In case of using django-notification I seem to have an impression(which can be wrong) that I can use this only to inform the user via email, i.e. I cannot show these notifications in the user profile, just like we have on facebook.
Firstly I would like to know if I am wrong, and then I really need some proper tutorial or guidance on how to go about doing it. I know how to register a notification and send it on proper signal but there is no documentation on how to show these notices in a template, if this can be done.
Any guidance/tutorial/getting started doc will be deeply appreciated.
Yes django-notifications is only designed for email notifications.
Here is a signal slot that you can add to your models.py and tweak to your own needs:
Now for templates, pretty easy.
templates/notification/new_comment/short.txt
templates/notification/new_comment/notice.html
templates/notification/new_comment/full.txt
Warning: it’s a very simplified, untested adaptation of our production code.
Note : Django-1.7 deprecated the post_syncdb signal
Here are some more information: