o
    hi~                     @   s`  d dl mZ d dlmZ G dd dejZG dd dejZG dd dejZG d	d
 d
ejZG dd dejZ	G dd dejZ
G dd dejZG dd dejZG dd dejZG dd dejZG dd dejZG dd dejZG dd dejZG dd dejZG dd  d ejZG d!d" d"ejZG d#d$ d$ejZG d%d& d&ejZd'S )(    )models)slugifyc                       sb   e Zd ZejddZejdddZe Z	ej
dddZG dd	 d	Z fd
dZdd Z  ZS )College   
max_lengthT)r   uniquer   zLower numbers appear first)default	help_textc                   @      e Zd ZddgZdS )zCollege.Metapriority_ordernameN__name__
__module____qualname__ordering r   r   $/var/www/apihucms/colleges/models.pyMeta
       r   c                    s(   | j s	t| j| _ t j|i | d S N)slugr   r   supersave)selfargskwargs	__class__r   r   r      s   zCollege.savec                 C      | j S r   r   r   r   r   r   __str__      zCollege.__str__)r   r   r   r   	CharFieldr   	SlugFieldr   	TextFieldshort_descriptionPositiveIntegerFieldr   r   r   r#   __classcell__r   r   r   r   r      s    r   c                   @   sR   e Zd ZejeejddZejddZ	e
 ZejddZejddZdd Zd	S )
HeroSectionhero_section	on_deleterelated_namer   r   zcollege_images/hero	upload_toc                 C      d| j j S )NzHero Section for colleger   r"   r   r   r   r#         zHeroSection.__str__N)r   r   r   r   OneToOneFieldr   CASCADEr4   r%   titler'   subtitle
ImageFieldbackground_imageadmission_infor#   r   r   r   r   r+      s    r+   c                   @   2   e Zd ZejeejddZejddZ	dd Z
dS )Badgebadgesr-   d   r   c                 C   r    r   textr"   r   r   r   r#   #   r$   zBadge.__str__N)r   r   r   r   
ForeignKeyr+   r7   r,   r%   rB   r#   r   r   r   r   r>          r>   c                   @   >   e Zd ZejeejddZejddZ	ej
ddZdd Zd	S )
AboutSectionabout_sectionr-   r   r   zcollege_images/aboutr0   c                 C   r2   )NzAbout Section for r3   r"   r   r   r   r#   +   r5   zAboutSection.__str__N)r   r   r   r   r6   r   r7   r4   r%   r8   r:   imager#   r   r   r   r   rF   &   
    rF   c                   @   sH   e Zd ZejeejddZe Z	ej
ddZG dd dZdd Zd	S )
AboutContentcontent_paragraphsr-   r   r	   c                   @      e Zd ZdgZdS )zAboutContent.MetaorderNr   r   r   r   r   r   3       
r   c                 C   s   d| j  d| jjj S )Nz
Paragraph  for )rN   rG   r4   r   r"   r   r   r   r#   6   s   zAboutContent.__str__N)r   r   r   r   rC   rF   r7   rG   r'   contentr)   rN   r   r#   r   r   r   r   rJ   .   s    rJ   c                   @   sR   e Zd ZejeejddZejddZ	ejddZ
e ZejddZdd Zd	S )
DirectorSectiondirector_sectionr-   r   r   zcollege_images/directorsr0   c                 C   s   d| j  d| jj  S )Nz
Director: rP   )r   r4   r"   r   r   r   r#   @      zDirectorSection.__str__N)r   r   r   r   r6   r   r7   r4   r%   r   r8   r'   messager:   rH   r#   r   r   r   r   rR   9   s    rR   c                   @   sF   e Zd ZejeejddZejddZ	e
 ZejddZdd Zd	S )
ProgramsSectionprograms_sectionr-   r   r   FrL   c                 C   r2   )NzPrograms Section for r3   r"   r   r   r   r#   I   r5   zProgramsSection.__str__N)r   r   r   r   r6   r   r7   r4   r%   r8   r'   descriptionBooleanFieldhas_doctoral_programsr#   r   r   r   r   rV   C   s    rV   c                   @   st   e Zd ZdZejeejddZej	ddZ
ejdejddddZej	d	ed
ZejddZG dd dZdd ZdS )Program))UGUndergraduate)PGPostgraduate)DPDiplomaprogramsr-   r   r   zcourses.CourseT)r.   r/   nullblank   )r   choicesr   rL   c                   @   r   )zProgram.Metaprogram_typerN   Nr   r   r   r   r   r   Z   r   r   c                 C   s   | j  d|   dS )Nz ())r   get_program_type_displayr"   r   r   r   r#   ]   rT   zProgram.__str__N)r   r   r   PROGRAM_TYPESr   rC   rV   r7   rW   r%   r   courserg   r)   rN   r   r#   r   r   r   r   r[   L   s    r[   c                   @   sN   e Zd ZejeejddZejddZ	e
 Ze
 ZejddZdd Zd	S )
WhyChooseSectionwhy_choose_sectionr-   r   r   zcollege_images/why_chooser0   c                 C   r2   )NzWhy Choose Section for r3   r"   r   r   r   r#   g   r5   zWhyChooseSection.__str__N)r   r   r   r   r6   r   r7   r4   r%   r8   r'   rX   
conclusionr:   rH   r#   r   r   r   r   rl   `   s    rl   c                   @   sL   e Zd ZejeejddZejddZ	ej
ddZG dd dZd	d
 ZdS )Featurefeaturesr-   r   r   r   rL   c                   @   rM   )zFeature.MetarN   Nr   r   r   r   r   r   o   rO   r   c                 C   r    r   rA   r"   r   r   r   r#   r   r$   zFeature.__str__N)r   r   r   r   rC   rl   r7   rm   r%   rB   r)   rN   r   r#   r   r   r   r   ro   j   s    ro   c                   @   :   e Zd ZejeejddZejddZ	e
 Zdd ZdS )FacultySectionfaculty_sectionr-   r   r   c                 C   r2   )NzFaculty Section for r3   r"   r   r   r   r#   z   r5   zFacultySection.__str__Nr   r   r   r   r6   r   r7   r4   r%   r8   r'   rX   r#   r   r   r   r   rr   u   
    rr   c                   @   ^   e Zd ZejeejddZejddZ	ejddZ
ejddZe ZejddZdd Zd	S )
Facultyfaculty_membersr-   r   r   zcollege_images/facultyr0   c                 C   s   | j  d| j S Nz - )r   positionr"   r   r   r   r#      s   zFaculty.__str__N)r   r   r   r   rC   rr   r7   rs   r%   r   rz   
departmentr'   qualificationsr:   rH   r#   r   r   r   r   rw   }       rw   c                   @   r=   )TestimonialSectiontestimonial_sectionr-   r   r   c                 C   r2   )NzTestimonial Section for r3   r"   r   r   r   r#      r5   zTestimonialSection.__str__Nr   r   r   r   r6   r   r7   r4   r%   r8   r#   r   r   r   r   r~      rD   r~   c                   @   rv   )
Testimonialtestimonialsr-   r   r   zcollege_images/testimonialsr0   c                 C   s   d| j  S )NzTestimonial from r!   r"   r   r   r   r#      s   zTestimonial.__str__N)r   r   r   r   rC   r~   r7   r   r%   r   rk   companyr'   testimonialr:   rH   r#   r   r   r   r   r      r}   r   c                   @   r=   )RecruitersSectionrecruiters_sectionr-   r   r   c                 C   r2   )NzRecruiters Section for r3   r"   r   r   r   r#      r5   zRecruitersSection.__str__Nr   r   r   r   r   r      rD   r   c                   @   rE   )
	Recruiter
recruitersr-   r   r   zcollege_images/recruitersr0   c                 C   r    r   r!   r"   r   r   r   r#      r$   zRecruiter.__str__N)r   r   r   r   rC   r   r7   r   r%   r   r:   logor#   r   r   r   r   r      rI   r   c                   @   rq   )InfrastructureSectioninfrastructure_sectionr-   r   r   c                 C   r2   )NzInfrastructure Section for r3   r"   r   r   r   r#      r5   zInfrastructureSection.__str__Nrt   r   r   r   r   r      ru   r   c                   @   s`   e Zd ZejeejddZejddZ	e
 ZejddZejddZG d	d
 d
Zdd ZdS )Facility
facilitiesr-   r   r   zcollege_images/facilitiesr0   r   rL   c                   @   s   e Zd ZdgZdZdS )zFacility.MetarN   
FacilitiesN)r   r   r   r   verbose_name_pluralr   r   r   r   r      s    r   c                 C   s   | j  d| jjj S ry   )r8   r   r4   r   r"   r   r   r   r#      rT   zFacility.__str__N)r   r   r   r   rC   r   r7   r   r%   r8   r'   rX   r:   rH   r)   rN   r   r#   r   r   r   r   r      s    r   N)	django.dbr   django.utils.textr   Modelr   r+   r>   rF   rJ   rR   rV   r[   rl   ro   rr   rw   r~   r   r   r   r   r   r   r   r   r   <module>   s(    

	
