diff --git a/hosting/templates/hosting/emails/new_booked_vm.html b/hosting/templates/hosting/emails/new_booked_vm.html index 00430dd5..864cf813 100644 --- a/hosting/templates/hosting/emails/new_booked_vm.html +++ b/hosting/templates/hosting/emails/new_booked_vm.html @@ -3,8 +3,9 @@ {% block email_head %}{{page_header}}{% endblock %} {% block email_body %} {% url 'hosting:orders' order.id as order_url %} -{% blocktrans %}You have ordered a new virtual machine!
-Your order of [{{vm|get_value_from_dict:'name'}}] has been charged.

+{% blocktrans with vm.name as vm_name %}You have ordered a new virtual machine! +
+Your order of [{{vm_name}}] has been charged.

You can view your invoice by clicking the button below.

{% endblocktrans %}
diff --git a/hosting/templates/hosting/emails/new_booked_vm.txt b/hosting/templates/hosting/emails/new_booked_vm.txt index 3c8b06ad..3e90569d 100644 --- a/hosting/templates/hosting/emails/new_booked_vm.txt +++ b/hosting/templates/hosting/emails/new_booked_vm.txt @@ -2,8 +2,8 @@ {% load i18n %} {% block email_head %}{{page_header}}{% endblock %} {% block email_body %} -{% blocktrans %}You have ordered a new virtual machine! -Your order of [{{vm|get_value_from_dict:'name'}}] has been charged. +{% blocktrans with vm.name as vm_name %}You have ordered a new virtual machine! +Your order of [{{vm_name}}] has been charged. You can view your invoice by clicking the link below. diff --git a/hosting/views.py b/hosting/views.py index 465b8419..128bd4db 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -668,7 +668,7 @@ class PaymentVMView(LoginRequiredMixin, FormView): 'context': context, 'template_name': 'new_booked_vm', 'template_path': 'hosting/emails/', - 'from_email': settings.DCL_SUPPORT_FROM_ADDRESS, + 'from_address': settings.DCL_SUPPORT_FROM_ADDRESS, } email = BaseEmail(**email_data) email.send()