Started with VM cancellation template

This commit is contained in:
PCoder 2017-09-03 02:33:05 +05:30
commit f041a4047d
4 changed files with 20 additions and 140 deletions

View file

@ -895,14 +895,16 @@ class VirtualMachineView(LoginRequiredMixin, View):
context = {
'vm': vm,
'base_url': "{0}://{1}".format(self.request.scheme,
self.request.get_host())
self.request.get_host()),
'page_header': _('Virtual Machine Cancellation')
}
email_data = {
'subject': 'Virtual machine plan canceled',
'subject': context['page_header'],
'to': self.request.user.email,
'context': context,
'template_name': 'vm_status_changed',
'template_path': 'hosting/emails/'
'template_name': 'vm_canceled',
'template_path': 'hosting/emails/',
'from_address': settings.DCL_SUPPORT_FROM_ADDRESS,
}
email = BaseEmail(**email_data)
email.send()