Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Update email sending to use celery
michalb31193289e36
diff --git a/saleor/dashboard/staff/emails.py b/saleor/dashboard/staff/emails.pyindex f134351cd6..ecb9724a43 100644--- a/saleor/dashboard/staff/emails.py+++ b/saleor/dashboard/staff/emails.py@@ -3,14 +3,17 @@ from django.utils.encoding import force_bytesfrom django.utils.http import urlsafe_base64_encodefrom templated_email import send_templated_mail+from celery import shared_taskfrom ...settings import DEFAULT_FROM_EMAIL, get_host+from ...site.utils import get_site_name+@shared_taskdef send_set_password_email(staff):ctx = {'protocol': 'http','domain': get_host(),- 'site_name': 'saleor',+ 'site_name': get_site_name(),'uid': urlsafe_base64_encode(force_bytes(staff.pk)),'token': default_token_generator.make_token(staff)}send_templated_mail(