X
X
Xamber2014-01-29 14:40:45
Django
Xamber, 2014-01-29 14:40:45

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

The standard admin interface has a submit button, but after that the module will wait for a command in manage.py
Actually, the question itself is: is it possible to somehow change the standard admin interface of this module without resorting to changing the library itself?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Shikanov, 2014-01-29
@Xamber

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 question

Ask a Question

731 491 924 answers to any question