I am working on two separate Django apps.
We are sending mail in Django. Due to some mistakes in the mail, sometimes it is required to edit the queued mail. But for some reason, one of the apps allows editing the queued mail, whereas the other app won't allow editing the contents of queued mail. Also, sending emails from the admin panel is disabled.
I am new to Django and don't know how to solve this thing. Below are the screenshots.
add email disabled
edit is disabled
Related
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.
I have a django project where I want to create users, and some time later be able to send a welcome email with a link inviting them to log in and set a password.
I'm using django-allauth. I found this SO question which shows how to call allauth's password reset form, which is close to what I need, except that:
I want to send a "welcome" email, which would be worded differently.
I want it to send them to a "welcome" page, which would be different to a password reset (although perhaps operate the same way in that it use a token etc...)
I'm thinking I could somehow hijack that, but am not sure how or where that email gets sent.
django-allauth docs mention the routes /accounts/password/set/ and /accounts/password/set/ but I can't access either without logging in first.
This is an existing project I inherited, and I do have a template for "/account/password_reset_from_key.html". Just not sure how it all gets wired together.
Has anyone done anything similar?
You mention:
...and some time later be able to send a welcome email with a link inviting them to log in and set a password.
If sometime later, then you might be interested in queues like Celery to do that for you.
Here's an approach you might take:
Listen to the save django model signal on the User model. Send an email to a user whenever that is triggered (this will happen immediately. However with your "some time later" thing, then you add that sending to the user to a celery job queue for later
Send a dynamic email with html. With this, you can customize the design etc to your taste.
I have a social marketing admin for my clients. I want to be able to update the admin when there is a new notification on their facebook fan page or a check in at their location.
Currently facebook sends me an email notification (for example when someone posts on the fan page wall). What I need is for a script to run that updates my admin whenever there is a unread notification.
What I don't want is to have to run a cron job every minute that grabs notifications. I have a lot of clients and a lot of fan pages. This would become very taxing.
Is there a way for facebook to push the notification to my script page instantly instead of querying every minute?
Real-time updates for pages do not cover feed content yet.
Currently facebook sends me an email notification (for example when someone posts on the fan page wall). What I need is for a script to run that updates my admin whenever there is a unread notification.
You could pipe incoming mail to a script, have it analyze the mail body (what page it was send for), and then trigger the notification …
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
Today our website emails the user for every "event" who needs to be notified, but the number of "notifications" is becoming huge, annoying our users with tons of daily emails. Instead, I want to aggregate the notifications and send only one email every day.
I found this project, who seems to be exactly what I need: http://code.google.com/p/django-mailer/
A reusable Django app for queuing and throttling of email sending, scheduled sending, consolidation of multiple notifications into single emails and logging of mail failures.
Sample Use Cases:
(...)
a user doesn't want individual emails for each notification but wants them in digest form (e.g. a daily digest of new posts or a weekly update on friends who have joined)
(...)
NOTE: Now moved to http://github.com/jtauber/django-mailer/
Looks cool, but there are no code at all doing this at the Github repo and there are no more code at Google Code.
Do you know some alternative? (other than code it myself)
You'll need some service running in the background, otherwise what would trigger the email batch? I would use django celery email to do this. You'll need to set up celery first.