How to send notification from admin to user in Django - django

I am building an online shopping website using Django framework. I want to implement an order approval system where Django Admin will approve the order request from the user and at that time a notification or message will be sent to the user.
Currently I have an order request model with an order status field. When the value of that field will be set approved by the admin a notification will be sent to that user.
I want a push notification system here. How can I implement this in Django?

Related

Django: Track specific user actions

How can I track specific user actions with Django.
For example:
user logged in
user changes password
user visited a specific page
rest api call within a specific view took 300ms
user deleted / updated / created a specific model
Is there a nice third party app which can do this for me and display this information in an human readable admin interface or at least in django-admin?
If there is no app out there. How would you do this with Django?

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.

Django auto submit form?

I want to know if I can submit a form in django without user interaction so that it acts just like when a user posts a form. Here is my situation:
User submits data to payment gateway.
Payment gateway responds with data which has to be validated.
User redirected to payment gateway and more data has to be posted to gateway.
One option for me is to render another form for the user after step 2 which can then be used to post the data and redirect for step 3. However the user has to click a button again.
I couldn't find anything relevant to my situation about submitting forms with django.
Is there a way I can do this without the user interacting again for ease of use?

Django admin app to send mail to users

Is there a Django app or extension that can be used from the admin panel to select users and send mails to them?
Possibly with a markup editor?
After a quick google search the only app I found that could fit is django-mailer.
Sample Use Cases
a site admin wants to send a one-off announcement to all users on a site
a site admin wants to send a one-off email to a subset of users (e.g. thank you note to users who completed a survey)
a site admin wants to send an email but wants to defer it to a particular date or time (e.g. send out at 9am tomorrow a reminder of the scheduled downtime at 10am)
a site admin wants to send a regular email to a subset of users (e.g. people who haven’t logged in for over a month)
Another way would be to customize yourself the admin. I invite you to read this thread:
Django Admin Customizing

django-registration with paypal integration

I'm trying to figure out how to integrate django-registration with django-paypal. Being a Django n00b, I'm trying to figure out how to implement a flow like this:
User signs up using django-registation with 'active' flag set to 0
After registering, send user to PayPal for a subscription
When they come back from PayPal successfully, I want to set 'active' to 1
I've been looking at the django-registration documentation and don't quite understand how to use different backends or implement a flow the way I want.
Any tips on how to accomplish this would be greatly appreciated. django-paypal won't be a problem for me as I've done PayPal integration before (in PHP for a self-published book about CakePHP).
To have registration not send an email you pass send_email=False to the RegistrationManager.create_inactive_user call in your view to register a user. After you create the user, you probably want to create a landing page with the paypal buttons for payment. Instruct the user to click a payment button to pay. Generally I send the user.id in the custom field for the payment button.
Then, in django-paypal, use the IPN signal handlers to activate the user based on the user.id in the custom field of the IPN query. You might want to send a modified registration email at this point, welcoming the user to your site and telling them you have received payment and have activated their account, but those are details for you to define.