
    c                     2    d dl mZ d dlZd Zd Zd Zd ZdS )    )FileSystemStorageNc                  Z   dd l } dd l}d}g d}g d}||z   }|                     |          }|                     |          }||z   }t          |dz
            D ]E}	||                     |          z   }|                    d|          }
|                     |
           Fd}|
D ]}	||	z   }|S )Nr   B   )
0123456789)abcdefghijkmnopqrstuvwxyz   r#    )randomarraychoicerangeshuffle)r+   r,   MAX_LENDIGITSLOCASE_CHARACTERSCOMBINED_LIST
rand_digit
rand_lower	temp_passr&   temp_pass_listtokens               2/var/www/html/Sam_Eipo/Eipo/admin_api/functions.pygernateTokenr:      s    
<
<
< P  P  P++mmF##mm-..*$
!

 ! !Q&--666);;sI.....    	
  Q1955    c                  N   dd l dd ld                    fdt          d          D                       } | d                    fdt          d          D                       z  } t	          |           }                    |           d                    |          }|S )Nr   r*   c              3   L   K   | ]}                     j                  V  d S N)r-   ascii_letters.0r&   r+   strings     r9   	<genexpr>z/randomStringFunctionForImage.<locals>.<genexpr>   s2      GGv344GGGGGGr;      c              3   L   K   | ]}                     j                  V  d S r>   )r-   digitsr@   s     r9   rC   z/randomStringFunctionForImage.<locals>.<genexpr>    s1      AA1&--..AAAAAAr;   r)   )r+   rB   joinr.   listr/   )str1sam_listfinalStringr+   rB   s      @@r9   randomStringFunctionForImagerL      s    
GGGGGeAhhGGGHHAAAAAaAAA	B	BBJJwwx  r;   c                 .   d}t          |          }d}t          j                            | j                  d         }t                      }t          |          t          |          z   }|                    ||           }t          |          dz   |z   S )Nzmedia/admin_profilelocation   /r   ospathsplitextnamerL   strsaveimagefullPathfs	fullPath2filetypetheNametheImageNamefilenames           r9   uploadTheProfilerb   &   s    
*** GUZ((+	%	'	''ll3x==(GGL%((Is8##r;   c                 .   d}t          |          }d}t          j                            | j                  d         }t                      }t          |          t          |          z   }|                    ||           }t          |          dz   |z   S )Nzmedia/categoryrN   rP   rQ   rR   rY   s           r9   uploadThecategoryrd   1   s    
***GUZ((+	%	'	''ll3x==(GGL%((Is8##r;   )django.core.files.storager   rS   r:   rL   rb   rd    r;   r9   <module>rg      sf    7 7 7 7 7 7 				  *  $ $ $$ $ $ $ $r;   