Added hosting_utils.py
This commit is contained in:
		
					parent
					
						
							
								9a56b66282
							
						
					
				
			
			
				commit
				
					
						75a778e65f
					
				
			
		
					 1 changed files with 11 additions and 0 deletions
				
			
		
							
								
								
									
										11
									
								
								utils/hosting_utils.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								utils/hosting_utils.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,11 @@ | |||
| from hosting.models import UserHostingKey | ||||
| 
 | ||||
| 
 | ||||
| def get_all_public_keys(customer): | ||||
|     """ | ||||
|     Returns all the public keys of the user | ||||
|     :param customer: The customer whose public keys are needed | ||||
|     :return: A list of public keys | ||||
|     """ | ||||
|     return UserHostingKey.objects.filter( | ||||
|         user__site__customuser=customer).values_list("public_key", flat=True) | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue