Set EMAIL_FROM_ADDRESS from env
This commit is contained in:
		
					parent
					
						
							
								ccf600b620
							
						
					
				
			
			
				commit
				
					
						9ce45e6f56
					
				
			
		
					 2 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -48,6 +48,8 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DEBUG = config('DEBUG', default=False, cast=bool)
 | 
					DEBUG = config('DEBUG', default=False, cast=bool)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					EMAIL_FROM_ADDRESS = config('EMAIL_FROM_ADDRESS')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ALLOWED_HOSTS = config('ALLOWED_HOSTS', cast=Csv())
 | 
					ALLOWED_HOSTS = config('ALLOWED_HOSTS', cast=Csv())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INSTALLED_APPS = [
 | 
					INSTALLED_APPS = [
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -197,7 +197,7 @@ class ResetPassword(View):
 | 
				
			||||||
        # getting epoch for the time now in UTC to spare us headache with timezones
 | 
					        # getting epoch for the time now in UTC to spare us headache with timezones
 | 
				
			||||||
        creationtime = int(datetime.utcnow().timestamp())
 | 
					        creationtime = int(datetime.utcnow().timestamp())
 | 
				
			||||||
        # Construct the data for the email
 | 
					        # Construct the data for the email
 | 
				
			||||||
        email_from = 'Userservice at ungleich <%s>' % config['EMAIL']['EMAILFROM']
 | 
					        email_from = settings.EMAIL_FROM_ADDRESS
 | 
				
			||||||
        to = ['%s <%s>' % (user, email)]
 | 
					        to = ['%s <%s>' % (user, email)]
 | 
				
			||||||
        subject = 'Password reset request for %s' % user
 | 
					        subject = 'Password reset request for %s' % user
 | 
				
			||||||
        link = self.build_reset_link(user, creationtime)
 | 
					        link = self.build_reset_link(user, creationtime)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue