o
    'ch                     @   s  d dl mZ d dlmZmZmZ d dlmZ d dlZddddd	d
dddddd
dddddd
dddddd
dddddd
dddddd
dddddd
dddddd
dddddd
dddddd
d dddd!d
d"dddd#d
d$dddd%d
d&dddd'd
gZ	G d(d) d)eZ
dS )*    )BaseCommand)CollegeFacultySectionFaculty)settingsNzDr. Himanshu Vermaz:Associate Professor & HOD (Computer Science & Engineering)zSmart Computing zHimanshu.jpg)nameposition
departmentqualificationsimage_filenamezDr. Rohit Kumarz0Associate Professor & HOD (Computer Application)zRohithod.jpgzDr. Vipin Kumar Saini	Professorz	Vipin.jpgzDr. Ravinder AryazRavinder.jpgzDr. SulochanazAssistant ProfessorzSulochna.jpgzMr. Lalit Mohan Joshiz	Lalit.jpgzMs. Mrinalinee SinghzMrinalinee.jpgzMr. Bhanu Pratapz	Bhanu.jpgzMr. Abhishek ParmarzAbhishekh.jpgzMs. Pooja Parmarz	Pooja.jpgzMr. Narayan JeezNarayan.jpgzMr. Rajiv Ranjan Patelz	Rajiv.jpgzMr. Vikalpa TyagizVikalpa.jpgzMr. Mukesh Kumarz
Mukesh.jpgc                   @   s   e Zd ZdZdd ZdS )CommandzAAutomate Our Faculty data for Roorkee College of Smart Computing.c              
   O   s  d}z	t jj|d}W n t jy$   | j| jd| d Y d S w tjj	|dddd\}}|s?| j| j
d	 n
| j| jd
 tD ]~}tjtjd|d }tj|sl| j| jd|  qKt|dP}	tjj	||d |d |d |d |d dd\}
}|r|
j|d |	 |
  | j| jd|d   n| j| j
d|d   W d    n1 sw   Y  qK| j| jd d S )Nz"roorkee-college-of-smart-computing)slugzCollege with slug "z" not found.zOur Facultyz"Meet our esteemed faculty members.)titledescription)collegedefaultsz6FacultySection already exists. Adding faculty members.zFacultySection created.	rawimagesr   zImage not found: rbr   r	   r
   r   )r	   r
   r   image)faculty_sectionr   r   zAdded faculty: zFaculty already exists: z!Faculty data automation complete.)r   objectsgetDoesNotExiststdoutwritestyleERRORr   get_or_createWARNINGSUCCESSFACULTY_DATAospathjoinr   BASE_DIRexistsopenr   r   save)selfargsoptionscollege_slugr   r   createdfaculty_data
image_pathimg_filefaculty_obj r3   R/var/www/apihucms/colleges/management/commands/automate_smart_computing_faculty.pyhandlen   sP   


 zCommand.handleN)__name__
__module____qualname__helpr5   r3   r3   r3   r4   r   k   s    r   )django.core.management.baser   colleges.modelsr   r   r   django.confr   r#   r"   r   r3   r3   r3   r4   <module>   s    e