ķ
ÔŦÄVc           @   s/   d  d l  Td  d l Z d  d l Z d   Z d S(   i˙˙˙˙(   t   *Nc          C   st   xm t  ro d j d   t d  D  }  t j j i |  d 6  j   r t j j i |  d 6  j   r |  Sq Wd  S(   Nt    c         s   s(   |  ] } t  j t j t j  Vq d  S(   N(   t   randomt   choicet   stringt   ascii_uppercaset   digits(   t   .0t   x(    (    s9   /var/www/svtgbi.org/svtgbi/modules/elections/functions.pys	   <genexpr>   s    i2   t   sponsor_key_1t   sponsor_key_2(   t   Truet   joint   ranget   ElectionCandidatet   objectst   filtert   count(   t
   random_str(    (    s9   /var/www/svtgbi.org/svtgbi/modules/elections/functions.pyt   random_string_unique_sponsor   s    	@(   t   modelsR   R   R   (    (    (    s9   /var/www/svtgbi.org/svtgbi/modules/elections/functions.pyt   <module>   s   
