Include pricing_name in the email sent to admin
This commit is contained in:
		
					parent
					
						
							
								8e28756bd8
							
						
					
				
			
			
				commit
				
					
						1b37eed53d
					
				
			
		
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -19,6 +19,8 @@ from utils.forms import UserBillingAddressForm
 | 
				
			||||||
from utils.mailer import BaseEmail
 | 
					from utils.mailer import BaseEmail
 | 
				
			||||||
from utils.models import BillingAddress
 | 
					from utils.models import BillingAddress
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from .models import VMPricing
 | 
				
			||||||
 | 
					
 | 
				
			||||||
logger = get_task_logger(__name__)
 | 
					logger = get_task_logger(__name__)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -137,6 +139,10 @@ def create_vm_task(self, vm_template_id, user, specs, template,
 | 
				
			||||||
            'vm_id': vm['vm_id'],
 | 
					            'vm_id': vm['vm_id'],
 | 
				
			||||||
            'order_id': order.id
 | 
					            'order_id': order.id
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        if 'pricing_name' in specs:
 | 
				
			||||||
 | 
					            context['pricing'] = str(VMPricing.get_vm_pricing_by_name(
 | 
				
			||||||
 | 
					                name=specs['pricing_name']
 | 
				
			||||||
 | 
					            ))
 | 
				
			||||||
        email_data = {
 | 
					        email_data = {
 | 
				
			||||||
            'subject': settings.DCL_TEXT + " Order from %s" % context['email'],
 | 
					            'subject': settings.DCL_TEXT + " Order from %s" % context['email'],
 | 
				
			||||||
            'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
 | 
					            'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue