Answer the question
In order to leave comments, you need to log in
What is an alternative way to send a django newsletter?
In the django-newsletter module, the following command is used to send all scheduled mailings: It is manage.py runjob submit
recommended to use cron jobs for sending, but I would like to provide the ability to send letters in the mailing list through the web interface.
I did everything trite:
sub = Submission.objects.get(id = int(sub_id))
if not sub.sent:
try:
sub.submit()
sub.prepared = True
sub.save()
except:
pass
Answer the question
In order to leave comments, you need to log in
The problem is that in the admin panel you have to wait a long time until the letters are sent, did I understand correctly? If yes, then I recommend only running a command in the admin panel that will perform mailing in the background. For example, this can be done using Celery.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question