Fixed an error and from address in new vm email template
This commit is contained in:
parent
e38df305c4
commit
b5120040d3
3 changed files with 5 additions and 4 deletions
|
@ -4,7 +4,7 @@
|
||||||
{% block email_body %}
|
{% block email_body %}
|
||||||
{% url 'hosting:orders' order.id as order_url %}
|
{% url 'hosting:orders' order.id as order_url %}
|
||||||
{% blocktrans %}You have ordered a new virtual machine!<br/>
|
{% blocktrans %}You have ordered a new virtual machine!<br/>
|
||||||
Your order of [{{vm.name}}] has been charged.<br/><br/>
|
Your order of [{{vm|get_value_from_dict:'name'}}] has been charged.<br/><br/>
|
||||||
You can view your invoice by clicking the button below.<br/><br/>
|
You can view your invoice by clicking the button below.<br/><br/>
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
<div class="button" style="border-collapse: collapse; font-family: 'Lato', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; padding: 30px 0;" align="center">
|
<div class="button" style="border-collapse: collapse; font-family: 'Lato', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; padding: 30px 0;" align="center">
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{% block email_head %}{{page_header}}{% endblock %}
|
{% block email_head %}{{page_header}}{% endblock %}
|
||||||
{% block email_body %}
|
{% block email_body %}
|
||||||
{% blocktrans %}You have ordered a new virtual machine!
|
{% blocktrans %}You have ordered a new virtual machine!
|
||||||
Your order of [{{vm.name}}] has been charged.
|
Your order of [{{vm|get_value_from_dict:'name'}}] has been charged.
|
||||||
|
|
||||||
You can view your invoice by clicking the link below.
|
You can view your invoice by clicking the link below.
|
||||||
|
|
||||||
|
|
|
@ -660,14 +660,15 @@ class PaymentVMView(LoginRequiredMixin, FormView):
|
||||||
request.get_host()),
|
request.get_host()),
|
||||||
'page_header': _(
|
'page_header': _(
|
||||||
'Your New VM {vm_name} at Data Center Light'.format(
|
'Your New VM {vm_name} at Data Center Light'.format(
|
||||||
vm_name=vm.name))
|
vm_name=vm.get('name')))
|
||||||
}
|
}
|
||||||
email_data = {
|
email_data = {
|
||||||
'subject': context.get('page_header'),
|
'subject': context.get('page_header'),
|
||||||
'to': request.user.email,
|
'to': request.user.email,
|
||||||
'context': context,
|
'context': context,
|
||||||
'template_name': 'new_booked_vm',
|
'template_name': 'new_booked_vm',
|
||||||
'template_path': 'hosting/emails/'
|
'template_path': 'hosting/emails/',
|
||||||
|
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
|
||||||
}
|
}
|
||||||
email = BaseEmail(**email_data)
|
email = BaseEmail(**email_data)
|
||||||
email.send()
|
email.send()
|
||||||
|
|
Loading…
Reference in a new issue