-
-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
130f042
commit 948bb40
Showing
1 changed file
with
3 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import django_rq | ||
import rows | ||
from django.core.management.base import BaseCommand | ||
from django.template import Context, Template | ||
|
@@ -24,7 +25,8 @@ def handle(self, *args, **kwargs): | |
context = Context(row._asdict()) | ||
rendered_template = template_obj.render(context=context) | ||
if not kwargs["dry_run"]: | ||
send_email( | ||
django_rq.enqueue( | ||
send_email, | ||
subject="Subject", | ||
body=rendered_template, | ||
from_email="[email protected]", | ||
|