o
    @^hwR                     @   s   d dl Z d dlmZ d dlmZ d dlmZ d dlZd dlm	Z	 d dl
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ d dlmZ G dd	 d	eZdS )
    N)BaseCommand)ContentFile)slugify)settings)CourseCourseEligibility	CourseFee	FeeDetail	HostelFeeSemesterSubjectCareerProspectAdmissionStepDirectAdmission	RecruiterWhyJoinCourseHighlightCourseImageTestimonial)Collegec                   @   s8   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d ZdS )CommandzFSeeds the database with courses for Roorkee College of Allied Sciencesc                    s   j  jd ztjjdd} j  jd|j d|j d W n tj	y;    j  j
d Y d S w tjtjtjdd	d
  f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}|D ]~}t|d/ }g d0}|t|d/ t|  }	d1|	 }
||
d2| }tjj||d/ |d3 |d4 |d5 |d6 dd7\}}|r||_|  |r j  jd8|j  n j  jd9|j   ||  ||  |  || qd S ):Nz(Starting to seed Allied Sciences courses   )idzFound college: z (ID: )z,Allied Sciences college with ID 5 not found.zcourses/bannersT)exist_okc              
      s   z)t | }|jdkr| d}t|j|d}|W S  j jd|   W d S  t	yK } z j j
dt|  W Y d }~d S d }~ww )N   z.jpg)namezFailed to download image from zError downloading image: )requestsgetstatus_coder   contentstdoutwritestyleWARNING	ExceptionERRORstr)url
field_nameresponsefilenameimage_contenteself D/var/www/apihucms/courses/management/commands/seed_allied_courses.pysave_image_from_url!   s   


z+Command.handle.<locals>.save_image_from_urlB.PharmzsBachelor of Pharmacy program focusing on pharmaceutical sciences, drug development, and clinical pharmacy practice.am  The Bachelor of Pharmacy (B.Pharm) is a comprehensive undergraduate program designed to provide students with extensive knowledge in pharmaceutical sciences. The curriculum covers pharmacology, pharmaceutical chemistry, pharmacognosy, pharmaceutics, and clinical pharmacy. Students will learn about drug development, manufacturing processes, quality control, and patient care. The program includes practical training in laboratories, hospitals, and pharmaceutical industries. Graduates will be equipped to work as pharmacists, pharmaceutical researchers, drug regulatory affairs specialists, and healthcare professionals.z4 Years (8 Semesters)zPharmaceutical Sciences)titleshort_descriptionoverviewdurationcategoryz
B.Pharm LEzzBachelor of Pharmacy Lateral Entry program for diploma holders, focusing on advanced pharmaceutical sciences and practice.a_  The Bachelor of Pharmacy Lateral Entry (B.Pharm LE) program is designed for diploma holders in pharmacy who wish to advance their qualifications. This program allows students to directly enter the second year of the B.Pharm curriculum. The course covers advanced pharmaceutical sciences, including clinical pharmacy, hospital pharmacy, community pharmacy, and pharmaceutical marketing. Students will gain expertise in drug interactions, patient counseling, pharmaceutical care, and regulatory affairs. The program prepares graduates for leadership roles in the pharmaceutical industry and healthcare sector.z3 Years (6 Semesters)B.Sc. Nursingz~Bachelor of Science in Nursing program preparing compassionate healthcare professionals for patient care and nursing practice.a  The Bachelor of Science in Nursing (B.Sc. Nursing) is a comprehensive program that prepares students to become skilled and compassionate nursing professionals. The curriculum covers anatomy, physiology, pathology, pharmacology, nursing fundamentals, medical-surgical nursing, pediatric nursing, psychiatric nursing, and community health nursing. Students will gain hands-on experience through clinical rotations in hospitals, healthcare centers, and community settings. The program emphasizes evidence-based practice, patient safety, and holistic care. Graduates will be qualified to work as registered nurses in hospitals, clinics, and healthcare institutions.zNursing ScienceszB.Sc. MicrobiologyzyBachelor of Science in Microbiology program exploring microorganisms, their applications, and role in health and disease.a  The Bachelor of Science in Microbiology program provides comprehensive knowledge about microorganisms and their applications in various fields. Students will study bacteriology, virology, mycology, parasitology, immunology, and biotechnology. The curriculum covers microbial genetics, environmental microbiology, industrial microbiology, and clinical microbiology. Laboratory work includes isolation, identification, and characterization of microorganisms. Students will learn about the role of microbes in health, disease, food production, and environmental processes. Graduates will be prepared for careers in healthcare, biotechnology, pharmaceuticals, food industry, and research institutions.zLife SciencesD.PharmznDiploma in Pharmacy program providing foundational knowledge in pharmaceutical sciences and pharmacy practice.a  The Diploma in Pharmacy (D.Pharm) is a foundational program that provides essential knowledge and skills in pharmaceutical sciences. The curriculum covers pharmaceutics, pharmaceutical chemistry, pharmacognosy, pharmacology, and hospital pharmacy. Students will learn about drug formulation, quality control, dispensing practices, and patient counseling. The program includes practical training in community pharmacies and hospitals. Graduates will be qualified to work as registered pharmacists, assist in drug dispensing, maintain pharmacy records, and provide basic healthcare services. This program serves as a stepping stone for further education in pharmacy.z2 Years (4 Semesters)zM.Pharm PharmaceuticszvMaster of Pharmacy in Pharmaceutics specializing in drug formulation, delivery systems, and pharmaceutical technology.a  The Master of Pharmacy in Pharmaceutics is an advanced program focusing on the science and technology of drug formulation and delivery. Students will study advanced pharmaceutics, biopharmaceutics, pharmacokinetics, novel drug delivery systems, and pharmaceutical biotechnology. The curriculum covers tablet technology, capsule formulation, liquid dosage forms, parenteral preparations, and nanotechnology applications. Research work includes developing new formulations, optimizing drug delivery systems, and conducting stability studies. Graduates will be prepared for careers in pharmaceutical research and development, regulatory affairs, and academic institutions.z'Pharmaceutical Sciences - PharmaceuticszM.Sc. Pharmaceutical ChemistryzjMaster of Science in Pharmaceutical Chemistry focusing on drug design, synthesis, and medicinal chemistry.a  The Master of Science in Pharmaceutical Chemistry program provides advanced knowledge in medicinal chemistry and drug design. Students will study organic chemistry, drug metabolism, structure-activity relationships, computer-aided drug design, and analytical techniques. The curriculum covers synthetic organic chemistry, natural product chemistry, and pharmaceutical analysis. Research projects involve drug synthesis, characterization of pharmaceutical compounds, and development of analytical methods. Students will gain expertise in spectroscopic techniques, chromatography, and quality control methods. Graduates will be prepared for careers in pharmaceutical research, drug development, and analytical laboratories.z#Pharmaceutical Sciences - ChemistryzM.Sc. Microbiologyz~Master of Science in Microbiology program advancing knowledge in microbial sciences, biotechnology, and research applications.a  The Master of Science in Microbiology is an advanced program that builds upon foundational microbiology knowledge. Students will study advanced bacteriology, virology, immunology, microbial genetics, and biotechnology applications. The curriculum covers molecular microbiology, microbial biotechnology, environmental microbiology, and clinical microbiology. Research work includes studying microbial pathogenesis, developing biotechnological applications, and environmental microbiology studies. Students will gain expertise in advanced laboratory techniques, molecular biology methods, and research methodology. Graduates will be prepared for careers in research institutions, biotechnology companies, pharmaceutical industries, and academic positions.zLife Sciences - Microbiologyr4   )zpharmacy,medicine,pillsznursing,healthcare,hospitalzmicrobiology,laboratory,sciencezpharmaceutical,research,labzmedical,science,researchz healthcare,medicine,professionalz&https://source.unsplash.com/1200x600/?banner_r5   r6   r7   r8   )slugdefaultszCreated course: zUpdated course: )r!   r"   r#   SUCCESSr   objectsr   r   r   DoesNotExistr&   osmakedirspathjoinr   
MEDIA_ROOTr   hashlenr   update_or_createbanner_imagesaver4   _create_course_eligibility_create_course_fees_create_hostel_fees_create_course_highlights)r/   argsoptionsallied_colleger2   courses_datacourse_datar<   banner_themestheme
banner_urlrI   coursecreatedr0   r.   r1   handle   s   *	>


zCommand.handlec                 C   s   d|j v s
d|j v rd|j v rd}d}d}nId}d}d	}nBd
|j v r5d|j v r.d}d}d}n1d}d}d}n*d|j v rAd}d}d}nd|j v rMd}d}d}nd|j v rYd}d}d}nd}d}d}tjj||||dd dS )z*Create eligibility criteria for the courseM.PharmM.Sc.PharmzEBachelor's degree in Pharmacy (B.Pharm) from a recognized university.z5Minimum 55% aggregate in B.Pharm (50% for SC/ST/OBC).zCGPAT (Graduate Pharmacy Aptitude Test) or University entrance test.z`Bachelor's degree in Life Sciences, Microbiology, or related field from a recognized university.z8Minimum 55% aggregate in graduation (50% for SC/ST/OBC).z7University entrance test or national level examination.r3   LEz<Diploma in Pharmacy (D.Pharm) from a recognized institution.z5Minimum 50% aggregate in D.Pharm (45% for SC/ST/OBC).z2University entrance test or merit-based admission.z]10+2 (Senior Secondary) with Physics, Chemistry, Biology/Mathematics from a recognized board.z?Minimum 50% aggregate in 10+2 with PCM/PCB (45% for SC/ST/OBC).z%JEE Main or University entrance test.r9   zQ10+2 (Senior Secondary) with Physics, Chemistry, Biology from a recognized board.z;Minimum 50% aggregate in 10+2 with PCB (45% for SC/ST/OBC).z!NEET or University entrance test.B.Sc.r:   z010+2 (Senior Secondary) from a recognized board.z2Minimum 50% aggregate in 10+2 (45% for SC/ST/OBC).z.Merit-based admission or entrance examination.)academic_qualificationminimum_marksentrance_examrW   r=   N)r4   r   r?   rH   )r/   rW   rS   academic_qualr`   ra   r0   r0   r1   rK      sL   






z"Command._create_course_eligibilityc                 C   s   d|j v s
d|j v rd}d}n6d|j v r#d|j v rd}d}n'd	}d
}n"d|j v r-d}d}nd|j v r7d}d}nd|j v rAd}d}nd}d}tjj|||dd dS )z#Create fee structure for the courserZ   r[   u   ₹2,00,000 per yearz$7,000 per yearr3   r]   u   ₹1,60,000 per yearz$5,800 per yearu   ₹1,70,000 per yearz$6,200 per yearr9   u   ₹1,80,000 per yearz$6,500 per yearr^   u   ₹1,30,000 per yearz$4,800 per yearr:   u   ₹1,10,000 per yearz$4,000 per yearu   ₹1,20,000 per yearz$4,500 per year)domesticinternationalrb   N)r4   r   r?   rH   )r/   rW   rS   domestic_feeinternational_feer0   r0   r1   rL      s4   





zCommand._create_course_feesc                 C   s   t jj|dddddd dS )z*Create hostel fee structure for the courseu	   ₹80,000u	   ₹20,000u	   ₹15,000zHostel fees include accommodation, meals, laundry, and basic amenities. AC rooms are available with additional charges. Security deposit is refundable at the time of leaving the hostel.)fee_per_yearac_room_additionalsecurity_depositnotesrb   N)r
   r?   rH   )r/   rW   r0   r0   r1   rM      s   
zCommand._create_hostel_feesc                 C   s  g }d|j v rddddddddd	d
ddddddg}nNd|j v r:ddddddddddddddddg}n2d|j v rVdddddd d!dd"d#d$dd%d&d'dg}nd(d)d*dd+d,ddd-d.d/dd0d1d2dg}|D ]}tjj||d3 |d4 |d5 d6d7 qn| j| jd8 d9S ):zCreate course highlightsr\   zModern LaboratorieszSState-of-the-art pharmaceutical laboratories with latest equipment and instruments.flask)r4   descriptioniconzIndustry TrainingzHInternships and training programs with leading pharmaceutical companies.industryzClinical ExposurezSPractical training in hospitals and community pharmacies for real-world experience.hospitalzResearch OpportunitieszVOpportunities to participate in pharmaceutical research and drug development projects.
microscopeNursingzClinical TrainingzQExtensive clinical rotations in multi-specialty hospitals and healthcare centers.zuser-mdzSimulation LabszLAdvanced nursing simulation laboratories for skill development and practice.	heartbeatzCommunity HealthzFHands-on experience in community health programs and rural healthcare.userszProfessional DevelopmentzGComprehensive training in nursing ethics, leadership, and patient care.zgraduation-capMicrobiologyzAdvanced LaboratorieszNWell-equipped microbiology labs with modern instruments and safety facilities.zResearch ProjectszQOpportunities to work on cutting-edge research in microbiology and biotechnology.searchzIndustry ConnectionszDStrong partnerships with biotechnology and pharmaceutical companies.	handshakezField StudieszQPractical exposure through field studies and environmental microbiology projects.leafzExpert FacultyzELearn from experienced faculty with industry and research background.zuser-graduatezModern Facilitiesz6State-of-the-art laboratories and research facilities.zPractical Trainingz3Extensive hands-on training and practical exposure.cogszCareer Supportz7Comprehensive career guidance and placement assistance.	briefcaser4   rm   rn   )rm   rn   )rW   r4   r=   z0Successfully seeded all Allied Sciences courses!N)r4   r   r?   rH   r!   r"   r#   r>   )r/   rW   rS   highlights_datahighlight_datar0   r0   r1   rN      sB   


















	z!Command._create_course_highlightsN)	__name__
__module____qualname__helprY   rK   rL   rM   rN   r0   r0   r0   r1   r      s     ."r   )rA   django.core.management.baser   django.core.files.baser   django.utils.textr   r   django.confr   courses.modelsr   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   colleges.modelsr   r   r0   r0   r0   r1   <module>   s    D