How can i create a notification system by django - django

Is there anyway to create a notification system for my website by django without django channels.
If there is way how?

If you only need to send something (not in realtime) you can configure django to send emails.
If you don't need realtime you can save the notification in your DB like a model and inform the user with a badge somewhere in your front-end to invite him to read it.
But if you want realtime notification to clients on your app I think Websoket and Django Channels are the easier way.

Related

how to create realtime notification in django without using django channels

For every action such as-
log in
sign up
password reset
Notifications should be seen to the user with a notification bell icon (just like Facebook)
where real-time notifications are shown according to each action performed.
Also, an email should be sent to that user.
Note - (YOU CAN USE ANY DJANGO LIBRARY EXCEPT DJANGO CHANNELS)
this is the question that I want to solve. please help me.
You can use the Google Firebase Cloud Messaging service. There a lot of packages that work with this service. I recommend you to use fcm-django package for simplicity.

How to make notifications from one app to another app in django?

I am making one e-commerce website and i am just trying to make notifications from admin side to user side both are diffrent app in django...
My problems is how to make notifications in admin side (one app)when i click the button send the messages and display the notifications or message in userside(other app)
If I understood your question correctly, you want to notify all the users ( for example for a new offer) when they login to their accounts.
For this matter, you must create a model for the notification (and if it's user-specified there is need for a foreign key to the user in the notification model or maybe you want to show the notification to all users by date this varies duo to your application) and in the profile view just make a query on notifications and show them to the user.
but if you want a chat room like notification (show notification to online users only) just use Django channels.

Using Firebase to make a simple group chat app, alongside an already existing django-react app

I have a basic project which uses django as backend and reactJS as frontend. Basically, it just shows a home page when a user logs in, and that's it. The sign up of new users is handled through the django.admin panel.
Now, I want to create a group chat for my users who are currently logged in using firebase. Here's the problem since I can't really understand the workflow on how I should proceed. My basic idea is that,
frontend gets the username and password from backend,
frontend posts them to firebase
firebase sends a unique id token to the frontend,
now frontend is logged in with both django and firebase,
users who are logged in joins in the group chat
Is there any guidelines on how I should proceed with this? I have read the docs but I can't really understand what I should be doing to go through with this.
You want to look at the docs for firebase.database().ref().on(<event here>) where <event here> is one of the firebase database events such as on, child_added, value
basically what you'll be doing is rendering a database ref, say: firebase.database().ref('livechat').on('value', snap => {render the snapshot}) to every client (to view the chat). Then, a user posts to the 'livechat' ref. You can add as much additional info to the users posted data (like uid) so that you can later filter the 'livechat' node by uid (or the like). Make sense?
Where it gets a bit trickier is when you want to have 1 on 1 chats. You can accomplish this in much the same way - maybe use one of the users uid as the ref. Like: firebase.database().ref(`chat/${user.uid}`).push(message_here so that when you render the chat in the client you have individual conversations.

What scaleable way to send notification emails in django?

On a custom django app I'd like to send notification email on many events, e.g. when a user's comment is being liked or comment is posted on her profile.
However I am worried that this will have scaling implications for the app so I am wondering what is the best way to do it so that it does not block the views.
Use Django-Celery to put it in a Task Queue, that way it all happens in the background.
http://celery.readthedocs.org/en/latest/django/first-steps-with-django.html
Here is a good video link on how to use Celery with Django:
https://godjango.com/63-deferred-tasks-and-scheduled-jobs-with-celery-31-django-17-and-redis/

Facebook like notification updates using django signal or notification

How can i use django-notifications or django-signals to make something like facebook updates notification that shows in the user profile if any other user likes or posts comments on user's blog or posts?
For the activity feed, we use https://github.com/justquick/django-activity-stream Documentation: http://justquick.github.com/django-activity-stream/
For the js widget and live notifications, we use https://github.com/subsume/django-subscription yourlabs example, it depends on redis but you can easily add a model backend if you really want to. Redis is a good choices it's half a megabyte of dependency. Documentation: http://django-social.rtfd.org
There is no application that does meta-notifications ("notification groupping") properly but a lot of research has been done. Basically you need another app, with a MetaNotification model, and something (management command, signal ...) that will visit notifications and create MetaNotification instances. Then you should display MetaNotification lists rather than Activity or notification list.
Finnaly, if you want configurable email notifications then you can use django-notifications: https://github.com/jtauber/django-notification or this app which looks nicer: http://www.tomaz.me/django-notifications/
I'm not aware of any app that does it all. It is going to be some work for you.
"It's a long way to the top if you wanna rock'n'roll" or as I like to say "patience and perseverance" :)
https://pypi.python.org/pypi/feedly allows you to build newsfeed and notification systems using Cassandra and/or Redis. Examples of what you can build are applications like the Facebook newsfeed, your Twitter stream or your Pinterest following page.