ó
OWc           @   s3   d  d l  Td  d l Td   Z d   Z d   Z d S(   i˙˙˙˙(   t   *c         C   sL  yT t  j j d d  } | j | j } | j } t | j | | | j j	 | j	  Wn t
 k
 ro } |  n Xyź t  j j d d  } | j j r§ d | j   } n d } | j | j | j | j	 | j | |  j d t d d | j j | j g f } | j } t | j | | | j j	 | j    Wn t
 k
 rG} |  n Xd  S(	   Nt   keyt   exam_application_submittedt    exam_application_submitted_admins(   <br/><strong>Payment Method:</strong> %st    t	   HTTP_HOSTt   admin_exam_view_applicationt   args(   t   EmailTemplatet   objectst   gett   contentt   examt   subjectt	   send_mailR   t   from_addresst   email_addresst	   Exceptiont   payment_amountt   get_payment_type_displayt
   first_namet   surnamet   METAt   reverset   idt   get_to_addresses(   t   requestt   exam_applicationt   templatet   messageR   t   et   extra(    (    s=   /var/www/svtgbi.org/svtgbi/modules/exam_application/emails.pyt   application_form_completed   s"    	&
P	)c         C   s7  yT t  j j d d  } | j | j } | j } t | j | | | j j	 | j	  Wn t
 k
 ro } |  n Xy§ t  j j d d  } d | j   } | j | j | j | j	 | j | |  j d t d d | j j | j g f } | j } t | j | | | j j	 | j    Wn t
 k
 r2} |  n Xd  S(   NR   t!   exam_application_submitted_unpaidR   s(   <br/><strong>Payment Method:</strong> %sR   R   R   (   R   R	   R
   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   (   R   R   R   R   R   R   R   (    (    s=   /var/www/svtgbi.org/svtgbi/modules/exam_application/emails.pyt!   application_form_completed_unpaid   s    	&
P	)c         C   st   yT t  j j d d  } | j | j } | j } t | j | | | j j	 | j	  Wn t
 k
 ro } |  n Xd  S(   NR   t   exam_application_paid(   R   R	   R
   R   R   R   R   R   R   R   R   (   R   R   R   R   R   R   (    (    s=   /var/www/svtgbi.org/svtgbi/modules/exam_application/emails.pyt   application_form_paid7   s    	&N(   t   modelst   modules.notifications.modelsR    R"   R$   (    (    (    s=   /var/www/svtgbi.org/svtgbi/modules/exam_application/emails.pyt   <module>   s   

		