
    wg                     $    d dl mZ d dlZd Zd Zy)    )FileSystemStorageNc                  
   dd l dd ldj                  fdt        d      D              } | dj                  fdt        d      D              z  } t	        |       }j                  |       dj                  |      }|S )Nr    c              3   T   K   | ]  }j                  j                         ! y wN)choiceascii_letters.0xrandomstrings     6/var/www/html/lionshead-backend/panel_api/functions.py	<genexpr>z/randomStringFunctionForImage.<locals>.<genexpr>   s!     JAFMM&"6"67   %(   c              3   T   K   | ]  }j                  j                         ! y wr   )r   digitsr
   s     r   r   z/randomStringFunctionForImage.<locals>.<genexpr>   s     D8aV]]6==18r      )r   r   joinrangelistshuffle)str1sam_listfinalStringr   r   s      @@r   randomStringFunctionForImager      sd    77JqJKDBGGD58DEEDDzH
NN8''(#K    c                    d}t        |      }d}t        j                  j                  | j                        d   }t               }t        |      t        |      z   }|j                  ||       }t        |      dz   |z   S )Nzmedia/user_profile)locationz/media/user_profile   /)r   ospathsplitextnamer   strsave)imagefullPathfs	fullPath2filetypetheNametheImageNamefilenames           r   uploadTheProfiler1      sq    
* GGUZZ(+	%	''l3x=(GGL%(Is8##r   )django.core.files.storager   r#   r   r1    r   r   <module>r4      s    7 	$r   