o
    sh                     @   s<   d dl mZ d dlmZmZmZmZmZ G dd deZdS )    )BaseCommand)CourseCourseEligibility	CourseFee	FeeDetail	HostelFeec                   @   s   e Zd ZdZdd ZdS )Commandz2Update BCOM eligibility, fee, and hostel fee data.c           	   
   O   s  d}z	t jj|d}W n t jy$   | j| jd| d Y d S w d}z tjj|d}||_	d|_
d|_|  | j| jd	 W n tjye   tjj||ddd
 | j| jd Y nw z	tjj|d}W n tjy   tjj|ddd}| j| jd Y nw d|_d|_|  | j| jd tjj|dddddddd | j| jd d}tjj|ddd|dd | j| jd d S )Nbcom)slugzCourse with slug "z" not found.z@12th in any stream with at least 50% marks from recognized board)coursez50%NonezEligibility updated.)r   academic_qualificationminimum_marksentrance_examzEligibility created. )r   domesticinternationalzCourseFee created.z:67000/- (1st Year), 50000/- (2nd Year), 50000/- (3rd Year)zContact university for details.zCourseFee updated.zBachelor of Commerce (B.Com)z67000/-z50000/--F)
first_yearsecond_year
third_yearfourth_yearis_one_time)
course_feefee_headdefaultszFeeDetail updated.zThe Hostel fee includes lodging, mess & laundry charges. Student can give maximum of 50 clothes in a month for washing & ironing. The balance of previous month cannot be carried to the next month. Electricity prepaid meters are installed in each room.zFNormal Room: 85000/-, Semi Deluxe Room: 95000/-, Deluxe Room: 105000/-)fee_per_yearac_room_additionalsecurity_depositnotes)r   r   zHostelFee updated.)r   objectsgetDoesNotExiststdoutwritestyleERRORr   r   r   r   saveSUCCESScreater   r   r   r   update_or_creater   )	selfargsoptionscourse_slugr   eligibility_texteligibilityfeer    r2   A/var/www/apihucms/courses/management/commands/update_bcom_fees.pyhandle   sp   
	zCommand.handleN)__name__
__module____qualname__helpr4   r2   r2   r2   r3   r      s    r   N)	django.core.management.baser   courses.modelsr   r   r   r   r   r   r2   r2   r2   r3   <module>   s    