
xW                 @   sU   d  d l  m Z d  d l m Z d d   Z Gd d   d e j  Z d d   Z d	 S)
    )models)Personc              C   s\   d d  l  }  |  j  j   } d d  l } | j t t |  d d  j   } | d d  S)Nr   encodingzutf-8      i)datetimenowbase64	b64encodebytesstrdecode)r   r	   r
   the_id r   /var/www/djphys/igor/models.py	Make_Hash   s
    'r   c               @   s   e  Z d  Z e j e  Z e j d d  Z e j	 d d d e
  Z e j d d d d d d  Z d	 d
   Z d d   Z d S)Downloadauto_nowT
max_length
   defaultFnullblankc             C   s   d j  |  j |  j  S)Nz{0}, {1})formatsentperson)selfr   r   r   __str__   s    zDownload.__str__c             C   s   |  j  j } d d l m } d } | |  j 7} | d 7} | d 7} | d 7} | d 7} | d 7} y  | d	 | d
 | g d d Wn Yn Xd  S)Nr   )	send_mailzOEnter the following key on the download form and click the appropriate button

z=

After you have downloaded and unpacked Igor Pro, launch it zBand enter the following code to unlock the newly installed copy:

zSerial Number: 33612
z>Activation Key for version 7: CHRJ-YYTH-LJXX-JZEL-ZACL-CERF-S
z


Don't use the following unless you installed the older version
[Activation Key for older version 6: TXTE-LNAJ-TRLJ-MYJH-HR]
zIgor Pro Download Codezsaeta@g.hmc.edufail_silentlyF)r   emaildjango.core.mailr   key)r   addressr   bodyr   r   r   send   s    




 zDownload.sendN)__name__
__module____qualname__r   
ForeignKeyr   r   DateTimeFieldr   	CharFieldr   r#   Z	retrievedr   r&   r   r   r   r   r      s   r   c               C   s   t  d j t     d  S)NzTesting Make_Hash(): {0})printr   r   r   r   r   r   test*   s    r.   N)	django.dbr   people.modelsr   r   Modelr   r.   r   r   r   r   <module>   s   