U
    R^t                     @   sL   d dl mZ d dlmZ d dlmZ G dd dejZG dd dejZdS )	    )models)now)RichTextFieldc                   @   s@   e Zd ZdZejddZejdedZdd ZG dd	 d	Z	d
S )Institution))u
University)cZCollege)iZIndustry)nzNational Laboratoryd   
max_length   )r   choicesc                 C   s   | j S )N)nameself r   $/var/www/djphys/colloquium/models.py__str__   s    zInstitution.__str__c                   @   s   e Zd ZdgZdS )zInstitution.Metar   N__name__
__module____qualname__orderingr   r   r   r   Meta   s   r   N)
r   r   r   ZINSTITUTION_KINDSr   	CharFieldr   kindr   r   r   r   r   r   r      s
   r   c                   @   s   e Zd ZejedZejddZejddZ	e
dddZejddZejedejdZejd	d
ddddZejdddZejdddZdd Zdd ZG dd dZdS )Talk)default   r      T)nullblank)r#   )r#   	on_deleteZtalksheightwidth)	upload_toheight_fieldwidth_fieldr#   r"   r   )r"   r   c                 C   s   d | j| jS )Nu   {0} — {1})formatspeakertitler   r   r   r   r   %   s    zTalk.__str__c                 C   s   | j dkr| jS | j S )NZTBA)r,   r+   r   r   r   r   display(   s    
zTalk.displayc                   @   s   e Zd ZdgZdS )z	Talk.Metaz-dateNr   r   r   r   r   r   -   s   r   N)r   r   r   r   	DateFieldr   dater   r+   r,   r   abstractURLFieldurl
ForeignKeyr   CASCADEinst
ImageFieldpicSmallIntegerFieldr%   r&   r   r-   r   r   r   r   r   r      s$     r   N)		django.dbr   django.utils.timezoner   djrichtextfield.modelsr   Modelr   r   r   r   r   r   <module>   s   