welcome user mail
This commit is contained in:
		
					parent
					
						
							
								8307636b9b
							
						
					
				
			
			
				commit
				
					
						d888b260ee
					
				
			
		
					 1 changed files with 15 additions and 16 deletions
				
			
		| 
						 | 
					@ -274,22 +274,21 @@ class SignupValidatedView(SignupValidateView):
 | 
				
			||||||
                    "Your account has been activated."),
 | 
					                    "Your account has been activated."),
 | 
				
			||||||
                login_string=_("You can now"),
 | 
					                login_string=_("You can now"),
 | 
				
			||||||
                lurl=login_url)
 | 
					                lurl=login_url)
 | 
				
			||||||
            if not pre_valid:
 | 
					            email_data = {
 | 
				
			||||||
                email_data = {
 | 
					                'subject': _('Welcome to Data Center Light!'),
 | 
				
			||||||
                    'subject': 'Welcome to Data Center Light!',
 | 
					                'to': self.request.user.email,
 | 
				
			||||||
                    'to': self.request.user.email,
 | 
					                'context': {
 | 
				
			||||||
                    'context': {
 | 
					                    'base_url': "{0}://{1}".format(
 | 
				
			||||||
                        'base_url': "{0}://{1}".format(
 | 
					                        self.request.scheme,
 | 
				
			||||||
                            self.request.scheme,
 | 
					                        self.request.get_host()
 | 
				
			||||||
                            self.request.get_host()
 | 
					                    )
 | 
				
			||||||
                        )
 | 
					                },
 | 
				
			||||||
                    },
 | 
					                'template_name': 'welcome_user',
 | 
				
			||||||
                    'template_name': 'welcome_user',
 | 
					                'template_path': 'datacenterlight/emails/',
 | 
				
			||||||
                    'template_path': 'datacenterlight/emails/',
 | 
					                'from_address': settings.DCL_SUPPORT_FROM_ADDRESS,
 | 
				
			||||||
                    'from_address': settings.DCL_SUPPORT_FROM_ADDRESS,
 | 
					            }
 | 
				
			||||||
                }
 | 
					            email = BaseEmail(**email_data)
 | 
				
			||||||
                email = BaseEmail(**email_data)
 | 
					            email.send()
 | 
				
			||||||
                email.send()
 | 
					 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            home_url = '<a href="' + \
 | 
					            home_url = '<a href="' + \
 | 
				
			||||||
                       reverse('datacenterlight:index') + \
 | 
					                       reverse('datacenterlight:index') + \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue