
    
Ug                     >    d dl mZ d dlZd dlT d dlZd dlZd Zd ZdS )    )FileSystemStorageN)*c                 .   d}t          |          }d}t          j                            | j                  d         }t                      }t          |          t          |          z   }|                    ||           }t          |          dz   |z   S )Nzmedia/trainer_profile)locationz/media/trainer_profile   /)r   ospathsplitextnamerandomStringFunctionForImagestrsave)imagefullPathfs	fullPath2filetypetheNametheImageNamefilenames           7/var/www/html/Alfredo_demo/alfredo/trainer/functions.pyuploadTheProfiler      s    
!***#GUZ((+	%	'	''ll3x==(GGL%((Is8##    c                  ,   d                     d t          d          D                       } | d                     d t          d          D                       z  } t          |           }t          j        |           d                     |          }|S )N c              3   R   K   | ]"}t          j        t          j                  V  #d S N)randomchoicestringascii_letters.0xs     r   	<genexpr>z/randomPasswordStringFunction.<locals>.<genexpr>   s/      GGv344GGGGGGr      c              3   R   K   | ]"}t          j        t          j                  V  #d S r   )r   r    r!   digitsr#   s     r   r&   z/randomPasswordStringFunction.<locals>.<genexpr>   s.      AA1&-..AAAAAAr      )joinrangelistr   shuffle)str1sam_listfinalStrings      r   randomPasswordStringFunctionr2      s    
GGeAhhGGGHHAAaAAA	B	BBJJwwx  r   )django.core.files.storager   r	   admin_panel.common_functionsr   r!   r   r2    r   r   <module>r6      sl    7 7 7 7 7 7 				 * * * *        	$ 	$ 	$    r   