ó
Ÿ¡ÏXc           @   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 ƒ  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   theory_exam_submittedt   theory_exam_submitted_admins(   <br/><strong>Payment Method:</strong> %st    t	   HTTP_HOSTt"   admin_theory_exam_view_applicationt   args(   t   EmailTemplatet   objectst   gett   contentt   examt   subjectt	   send_mailR   t   from_addresst   email_addresst	   Exceptiont   get_payment_amountt   get_payment_type_displayt
   first_namet   surnamet   METAt   reverset   idt   get_to_addresses(   t   requestt   exam_applicationt   templatet   messageR   t   et   extra(    (    s8   /var/www/svtgbi.org/svtgbi/modules/theory_exam/emails.pyt!   theory_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   theory_exam_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   (    (    s8   /var/www/svtgbi.org/svtgbi/modules/theory_exam/emails.pyt(   theory_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   theory_exam_paid(   R   R	   R
   R   R   R   R   R   R   R   R   (   R   R   R   R   R   R   (    (    s8   /var/www/svtgbi.org/svtgbi/modules/theory_exam/emails.pyt   theory_application_form_paid7   s    	&N(   t   modelst   modules.notifications.modelsR    R"   R$   (    (    (    s8   /var/www/svtgbi.org/svtgbi/modules/theory_exam/emails.pyt   <module>   s   

		