o
    61]hs                     @   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 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 G dd	 d	eZdS )
    N)BaseCommand)ContentFile)slugify)BytesIO)settings)CourseCourseEligibility	CourseFee	FeeDetail	HostelFeeSemesterSubjectCareerProspectAdmissionStepDirectAdmission	RecruiterWhyJoinCourseHighlightCourseImageTestimonialc                   @   sh   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d Zdd Z	dd Z
dd Zdd Zdd Zdd ZdS )Commandz=Creates comprehensive content for all Smart Computing coursesc                 O   s   | j | jd tjjddd}|D ]H}| j d|j d | 	| | 
| | | | | | | | | | | | | | | | j | jd|j  q| j | jd d S )	Nz6Starting to create content for Smart Computing coursesz"btech-computer-science-engineering)slugidz
--- Creating content for: z ---u   ✓ Completed content for uC   
🎉 Successfully created content for all Smart Computing courses!)stdoutwritestyleSUCCESSr   objectsexcludeorder_bytitle_create_semesters_and_subjects_create_career_prospects_create_admission_steps_create_direct_admission_create_fee_details_create_hostel_fee_create_recruiters_create_why_join_create_testimonials)selfargsoptionscoursescourse r/   O/var/www/apihucms/courses/management/commands/create_smart_computing_content.pyhandle   s   








zCommand.handlec              	   C   s   d|j v rd}nd|j v rd}n
d|j v rd}nd}td|d D ]2}tjj||dd	| id
\}}| ||}|D ]}tjj||d |d |d |d dd q;q!dS )z2Create semesters and subjects based on course typez4 Years   z3 Years   z2 Years      namez	Semester )r.   numberdefaultscodecreditsdescription)r6   r:   r;   )semesterr9   r8   N)durationranger   r   get_or_create_get_subjects_for_semesterr   )r*   r.   num_semesterssem_numr<   createdsubjectssubject_datar/   r/   r0   r!   :   s2   



z&Command._create_semesters_and_subjectsc              	   C   s   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dddddddddddddddddddgd }d!|j v rod"d#dd$dd%d&dd'dd(d)dd*dgd+d,dd-dd.d/dd0dd1d2dd3dgd4}|| nd5|j v syd6|j v rd7d8dd9dd:d;dd<dd=d>dd?dgd@dAddBddCdDddEddFdGddHdgd4}|| nbdI|j v rdJdKddLddMdNddOddPdQddRdgdSdTddUddVdWddXddYdZdd[dgd4}|| n.d(d\dd]dd1d^dd_dd`daddbdgdcd2dd3ddddeddfddgdhddidgd4}|| ||g S )jz.Get subjects based on course type and semesterMA101zEngineering Mathematics Ir4   z>Calculus, differential equations, linear algebra fundamentals.)r9   r6   r:   r;   PH101zEngineering Physics   z5Mechanics, thermodynamics, waves, and modern physics.CH101zEngineering Chemistryz8Chemical bonding, thermodynamics, and materials science.HU101zCommunication Skills   z@English proficiency, technical writing, and presentation skills.ME101zEngineering Drawingz;Technical drawing, CAD basics, and geometric constructions.MA102zEngineering Mathematics IIz5Advanced calculus, statistics, and numerical methods.EC101zDigital Electronicsz9Logic gates, combinational circuits, and digital systems.CS102zData Structuresz8Arrays, linked lists, stacks, queues, trees, and graphs.HU102zProfessional EthicszCEngineering ethics, professional responsibility, and social impact.)r5   rK   AI & MLAI201z'Introduction to Artificial IntelligencezAAI fundamentals, search algorithms, and knowledge representation.ML201zMachine Learning Fundamentalsz0Supervised and unsupervised learning algorithms.CS201zAlgorithm Designz,Advanced algorithms and complexity analysis.AI202zDeep Learningz9Neural networks, backpropagation, and deep architectures.ML202zPattern Recognitionz>Feature extraction, classification, and clustering techniques.CS202zDatabase Management Systemsz/Relational databases, SQL, and database design.)rH   r4   Cyber SecurityIOTCS301zNetwork Securityz9Cryptography, network protocols, and security mechanisms.CS302zInternet of Thingsz6IoT architecture, sensors, and connectivity protocols.CS303zBlockchain Technologyz8Distributed ledger, cryptocurrency, and smart contracts.CS304zEthical HackingzEPenetration testing, vulnerability assessment, and security auditing.CS305zDigital Forensicsz7Evidence collection, analysis, and forensic procedures.CS306zCloud Securityz:Cloud computing security, compliance, and risk management.	AnimationAN301z2D AnimationzGTraditional animation principles, keyframing, and digital 2D animation.AN302z3D Modelingz13D modeling techniques, texturing, and rendering.AN303zGraphic Designz8Design principles, typography, and visual communication.AN304z3D Animationz1Character animation, rigging, and motion capture.AN305zVisual Effectsz3Compositing, particle systems, and special effects.AN306zGame Designz4Game mechanics, level design, and interactive media.zObject-Oriented Programmingz8OOP concepts, design patterns, and software engineering.zComputer Networksz6Network protocols, OSI model, and network programming.CS203zOperating Systemsz8Process management, memory management, and file systems.CS204CS205zSoftware Engineeringz&SDLC, testing, and project management.CS206zWeb Technologiesz*HTML, CSS, JavaScript, and web frameworks.)r    updateget)r*   r.   semester_numbase_subjectsai_subjectssecurity_subjectsanimation_subjectscs_subjectsr/   r/   r0   r@   [   sp   


z"Command._get_subjects_for_semesterc                 C   s  d|j v rddddddddd	d
ddddddg}nSd|j v s&d|j v r=ddddddddddddddddg}n2d|j v rYd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d0dd1dg}|D ]}tjj||d2 |d3 |d4 d5d6 qqd7S )8z,Create career prospects based on course typerQ   zMachine Learning Engineeru   ₹8-25 LPAz<Design and implement ML algorithms for various applications.)r    salary_ranger;   Data Scientistu   ₹6-20 LPAzFAnalyze complex data to extract insights and drive business decisions.zAI Research Scientistu   ₹12-35 LPAz8Conduct research in AI and develop innovative solutions.zDeep Learning Specialistu   ₹10-30 LPAz1Develop neural networks and deep learning models.rX   rY   zCybersecurity Analystu   ₹5-18 LPAz5Monitor and protect organizations from cyber threats.zIoT Solutions Architectz/Design and implement IoT systems and solutions.zBlockchain Developeru   ₹6-22 LPAz4Develop blockchain applications and smart contracts.zInformation Security Managerz4Lead security initiatives and manage security teams.r`   z3D Animatoru   ₹4-15 LPAz4Create animated content for films, games, and media.z
VFX Artistz2Develop visual effects for movies and advertising.zGame Designeru   ₹4-16 LPAz2Design game mechanics and interactive experiences.zMultimedia Specialistu   ₹3-12 LPAz0Create multimedia content for various platforms.zSoftware Developeru   ₹4-18 LPAz*Develop software applications and systems.zFull Stack Developeru   ₹5-20 LPAz.Work on both frontend and backend development.zSystem Administratoru   ₹3-15 LPAz2Manage and maintain computer systems and networks.zTechnical Consultantz5Provide technical expertise and solutions to clients.r    rs   r;   )rs   r;   r.   r    r8   N)r    r   r   r?   )r*   r.   	prospectsprospect_datar/   r/   r0   r"      s@   

















z Command._create_career_prospectsc                 C   s   d|j v r!ddddddddd	d
ddddddddddg}nFd|j v s0d|j v s0d|j v rLddddd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d%d&ddd'd(ddg}|D ]}tjj||d) |d* d+|d+ id, qid-S ).z%Create admission steps for the courseLEzEligibility CheckzPEnsure you have completed diploma in relevant field with minimum required marks.r5   )r    r;   orderzApplication SubmissionzFSubmit online application with required documents and application fee.rK   zLateral Entry TestzGAppear for lateral entry entrance examination or merit-based selection.rH   zCounseling ProcesszBParticipate in counseling based on entrance test results or merit.r4   zDocument VerificationzNSubmit original documents for verification and complete admission formalities.   M.TechM.ScMCAzEligibility Verificationz9Check graduation requirements and minimum marks criteria.zEntrance Examinationz;Qualify GATE/NET or university entrance test for admission.zApplication ProcesszGComplete online application with academic transcripts and certificates.zInterview Roundz?Attend personal interview and technical assessment if required.zFinal AdmissionzMComplete admission formalities including fee payment and document submission.zApplication FormzHFill out the online application form with personal and academic details.zDocument UploadzHUpload scanned copies of required documents including 10+2 certificates.zEntrance TestzEAppear for entrance examination or provide JEE/state entrance scores.z
Merit ListzICheck merit list based on entrance test performance and academic records.zCounseling & AdmissionzBAttend counseling session and complete admission with fee payment.r    ry   r;   )r.   r    ry   r8   N)r    r   r   r?   )r*   r.   steps	step_datar/   r/   r0   r#      s8   











	




zCommand._create_admission_stepsc                 C   sJ   d|j v r
d}d}nd|j v rd}d}nd}d}tjj|||dd d	S )
z#Create direct admission informationHonszDirect admission available for meritorious students with exceptional academic performance in 10+2 or equivalent examinations. Students with JEE Main scores above 85 percentile are eligible for direct admission without entrance test.TDiplomazDirect admission available based on 10th standard marks. Students with 80% or above in 10th standard can apply for direct admission.zDirect admission available for students meeting minimum eligibility criteria and cut-off marks. Merit-based selection process ensures quality admissions.)r;   is_availabler.   r8   N)r    r   r   r?   )r*   r.   r;   r   r/   r/   r0   r$      s   


z Command._create_direct_admissionc                 C   s  z#|j }d|jv sd|jv r: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}nd|jv rjd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}nd|jv rd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}n_d|jv sd|jv rd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}n*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jj||d |d |d |d  |d! |d" d#d$ qW d'S  tyK } z| j| j	d%|j d&t
|  W Y d'}~d'S d'}~ww )(zCreate detailed fee structurer{   r|   zTuition Feeu   ₹1,50,000u   ₹0F)fee_head
first_yearsecond_year
third_yearfourth_yearis_one_timezRegistration Feeu   ₹5,000TzLaboratory Fee	   ₹15,000zLibrary FeezExamination Feer}   u   ₹1,30,000zComputer Lab Fee	   ₹20,000u   ₹3,000u   ₹2,000zB.Techu   ₹1,40,000u	   ₹10,000zDevelopment FeeBCAzB.Scu	   ₹90,000u	   ₹60,000r   r   r   r   r   r   )r   r   r   r   r   )
course_feer   r8   z!Could not create fee details for z: N)feesr    r
   r   r?   	Exceptionr   r   r   WARNINGstr)r*   r.   r   fee_detailsfee_dataer/   r/   r0   r%     sj   

	
4zCommand._create_fee_detailsc                 C   s   t jj|dddddd dS )zCreate hostel fee informationu	   ₹80,000r   r   zHostel 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notesr   N)r   r   r?   )r*   r.   r/   r/   r0   r&   K  s   
zCommand._create_hostel_feec                 C   s~   d|j v r
g d}nd|j v sd|j v rg d}nd|j v r#g d}ng d}|D ]}tjj||d	d
|  did q)dS )zCreate recruiter informationrQ   )
Google	MicrosoftAmazonIBMNVIDIAIntelAdobeFlipkartZomatoPaytmrX   rY   )
Ciscor   	AccentureDeloitteEYKPMGWiproTCSInfosysHCLr`   )
DisneyPixar
DreamWorksTechnicolorzPrime FocuszRed Chillies VFXToonzzReliance AnimationzMaya Entertainment	Digitoonz)
r   r   r   	Cognizantr   r   r   r   r   r   logozcourses/recruiters/z.png)r.   r6   r8   N)r    r   r   r?   lower)r*   r.   
recruitersrecruiter_namer/   r/   r0   r'   W  s   




zCommand._create_recruitersc                 C   s   d|j v rdddddddddd	d
dg}nGd|j v s"d|j v r5ddddddddddddg}n*d|j v rMd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g}|D ]}tjj||d& d'|d' id( qad)S )*zCreate why join reasonsrQ   zCutting-edge Curriculumz\Learn the latest AI and ML technologies with hands-on projects and industry-relevant skills.)r    r;   zResearch OpportunitieszPEngage in groundbreaking research with faculty and contribute to AI advancement.zIndustry PartnershipszMAccess to leading tech companies and startups for internships and placements.zState-of-the-art LabszOWork with high-performance computing resources and latest AI development tools.rX   rY   zHigh Demand FieldzPCybersecurity and IoT are among the fastest-growing technology sectors globally.zPractical TrainingzPHands-on experience with real-world security challenges and IoT implementations.zIndustry CertificationszROpportunity to earn recognized certifications from leading security organizations.zCareer SecurityzGStrong job security and growth prospects in the cybersecurity industry.r`   zCreative Industry FocuszVJoin the booming animation and multimedia industry with creative career opportunities.zPortfolio DevelopmentzJBuild a strong professional portfolio with guidance from industry experts.zLatest Software TrainingzNMaster industry-standard software and tools used by leading animation studios.zGlobal OpportunitieszDAccess to international animation and gaming industry opportunities.zIndustry-Ready SkillszQDevelop practical skills that are directly applicable in the technology industry.zStrong FoundationzHBuild a solid foundation in computer science principles and programming.zCareer FlexibilityzTMultiple career paths available in software development, consulting, and management.zContinuous LearningzQStay updated with latest technologies and industry trends throughout the program.r    r;   ru   N)r    r   r   r?   )r*   r.   reasonsreason_datar/   r/   r0   r(   i  s<   


zCommand._create_why_joinc              	   C   s   dddd|j  ddddd	d
d|j  ddddddd|j  dddg}|D ]}tjj||d |d |d |d |d dd q(dS )zCreate student testimonialszPriya SharmazSoftware Engineerr   zThe z program provided me with excellent technical skills and industry exposure. The faculty support and practical approach helped me secure a great position at Microsoft.zcourses/testimonials/priya.jpg)r6   positioncompanycontentphotozRahul KumarzTechnical Leadr   zSI am grateful for the comprehensive curriculum and hands-on learning experience in z;. The program prepared me well for my career in technology.zcourses/testimonials/rahul.jpgzSneha Patelrt   r   z program exceeded my expectations. The blend of theoretical knowledge and practical projects gave me a competitive edge in the job market.zcourses/testimonials/sneha.jpgr6   r   r   r   r   )r   r   )r.   r6   r   r   r8   N)r    r   r   r?   )r*   r.   testimonialstestimonial_datar/   r/   r0   r)     s<   zCommand._create_testimonialsN)__name__
__module____qualname__helpr1   r!   r@   r"   r#   r$   r%   r&   r'   r(   r)   r/   r/   r/   r0   r      s    (!Q)#?&r   )osdjango.core.management.baser   django.core.files.baser   django.utils.textr   requestsior   django.confr   courses.modelsr   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r/   r/   r/   r0   <module>   s    D