Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot] 4a34d81248
Merge e19468185e into 7ef5c9aac4 2023-10-29 18:34:03 +05:30
33 changed files with 1095 additions and 2350 deletions

BIN
.DS_Store vendored

Binary file not shown.

2
.gitignore vendored
View File

@ -130,7 +130,6 @@ dmypy.json
/venv/ /venv/
./CDC_Backend/static ./CDC_Backend/static
CDC_Backend/static_url*
./CDC_Backend/Storage ./CDC_Backend/Storage
/CDC_Backend/CDC_Backend/__pycache__/ /CDC_Backend/CDC_Backend/__pycache__/
/CDC_Backend/APIs/__pycache__/ /CDC_Backend/APIs/__pycache__/
@ -145,4 +144,3 @@ dev.env
#vscode settings #vscode settings
.vscode/ .vscode/
.DS_Store

BIN
CDC_Backend.zip Normal file

Binary file not shown.

BIN
CDC_Backend/.DS_Store vendored

Binary file not shown.

View File

@ -83,7 +83,7 @@ class Student(StudentAdmin):
class PlacementResources(resources.ModelResource): class PlacementResources(resources.ModelResource):
class Meta: class Meta:
model = Placement model = Placement
exclude = ('changed_by', 'is_company_details_pdf', 'is_description_pdf', exclude = ('id','changed_by', 'is_company_details_pdf', 'is_description_pdf',
'is_compensation_details_pdf', 'is_selection_procedure_details_pdf') 'is_compensation_details_pdf', 'is_selection_procedure_details_pdf')
class AdminAdmin(ExportMixin, SimpleHistoryAdmin): class AdminAdmin(ExportMixin, SimpleHistoryAdmin):
resource_class = PlacementResources resource_class = PlacementResources
@ -92,7 +92,7 @@ class AdminAdmin(ExportMixin, SimpleHistoryAdmin):
class PlacementResources(resources.ModelResource): class PlacementResources(resources.ModelResource):
class Meta: class Meta:
model = Placement model = Placement
exclude = ( 'changed_by', 'is_company_details_pdf', 'is_description_pdf', exclude = ('id', 'changed_by', 'is_company_details_pdf', 'is_description_pdf',
'is_compensation_details_pdf', 'is_selection_procedure_details_pdf') 'is_compensation_details_pdf', 'is_selection_procedure_details_pdf')
@ -103,7 +103,7 @@ class AdminAdmin(ExportMixin, SimpleHistoryAdmin):
class PlacementResources(resources.ModelResource): class PlacementResources(resources.ModelResource):
class Meta: class Meta:
model = Placement model = Placement
exclude = ('changed_by', 'is_company_details_pdf', 'is_description_pdf', exclude = ('id', 'changed_by', 'is_company_details_pdf', 'is_description_pdf',
'is_compensation_details_pdf', 'is_selection_procedure_details_pdf') 'is_compensation_details_pdf', 'is_selection_procedure_details_pdf')

View File

@ -13,7 +13,6 @@ urlpatterns = [
path('getApplications/', adminViews.getApplications, name="Get Applications"), path('getApplications/', adminViews.getApplications, name="Get Applications"),
path("submitApplication/", adminViews.submitApplication, name="Submit Application"), path("submitApplication/", adminViews.submitApplication, name="Submit Application"),
path('generateCSV/', adminViews.generateCSV, name="Generate CSV"), path('generateCSV/', adminViews.generateCSV, name="Generate CSV"),
path('downloadResume/', adminViews.downloadResume, name="Download Resume"),
path('addPPO/', adminViews.addPPO, name="Add PPO"), path('addPPO/', adminViews.addPPO, name="Add PPO"),
path('getStudentApplication/', adminViews.getStudentApplication, name="Get student application"), path('getStudentApplication/', adminViews.getStudentApplication, name="Get student application"),
path('getStats/', adminViews.getStats, name="Get Stats"), path('getStats/', adminViews.getStats, name="Get Stats"),

View File

@ -1,5 +1,4 @@
import csv import csv
import zipfile
from rest_framework.decorators import api_view from rest_framework.decorators import api_view
@ -125,8 +124,7 @@ def updateDeadline(request, id, email, user_type):
opening.deadline_datetime = datetime.datetime.strptime(data[DEADLINE_DATETIME], '%Y-%m-%d %H:%M:%S %z') opening.deadline_datetime = datetime.datetime.strptime(data[DEADLINE_DATETIME], '%Y-%m-%d %H:%M:%S %z')
opening.changed_by = get_object_or_404(User, id=id) opening.changed_by = get_object_or_404(User, id=id)
opening.save() opening.save()
if opening.offer_accepted: send_opening_to_notifications_service(id=opening.id,name=opening.company_name,deadline=data[DEADLINE_DATETIME],role=opening.designation)
send_opening_to_notifications_service(id=opening.id,name=opening.company_name,deadline=data[DEADLINE_DATETIME],role=opening.designation,opening_type=opening_type)
return Response({'action': "Update Deadline", 'message': "Deadline Updated"}, return Response({'action': "Update Deadline", 'message': "Deadline Updated"},
status=status.HTTP_200_OK) status=status.HTTP_200_OK)
except Http404: except Http404:
@ -149,17 +147,22 @@ def updateOfferAccepted(request, id, email, user_type):
opening_type= data[OPENING_TYPE] opening_type= data[OPENING_TYPE]
else: else:
opening_type= "Placement" opening_type= "Placement"
if DEADLINE_DATETIME in data:
deadline_datetime = datetime.datetime.strptime(data[DEADLINE_DATETIME], '%Y-%m-%d %H:%M:%S %z')
else:
deadline_datetime = timezone.localtime(timezone.now()).replace(hour=0, minute=0, second=0, microsecond=0) + datetime.timedelta(days=2)
if opening_type == "Internship": if opening_type == "Internship":
opening = get_object_or_404(Internship, pk=data[OPENING_ID]) opening = get_object_or_404(Internship, pk=data[OPENING_ID])
else: else:
opening = get_object_or_404(Placement, pk=data[OPENING_ID]) opening = get_object_or_404(Placement, pk=data[OPENING_ID])
if opening.offer_accepted is None: if opening.offer_accepted is None:
opening.offer_accepted = offer_accepted == "true" opening.offer_accepted = offer_accepted == "true"
opening.deadline_datetime = deadline_datetime
opening.changed_by = get_object_or_404(User, id=id) opening.changed_by = get_object_or_404(User, id=id)
opening.save() opening.save()
if opening.offer_accepted: if opening.offer_accepted:
deadline_datetime = datetime.datetime.strftime(opening.deadline_datetime, '%Y-%m-%d %H:%M:%S %z') deadline=deadline_datetime.strftime('%Y-%m-%d %H:%M:%S %z')
send_opening_to_notifications_service(id=opening.id,name=opening.company_name,deadline=deadline_datetime,role=opening.designation,opening_type=opening_type) send_opening_to_notifications_service(id=opening.id,name=opening.company_name,deadline=deadline,role=opening.designation)
send_opening_notifications(opening.id,opening_type) send_opening_notifications(opening.id,opening_type)
else: else:
raise ValueError("Offer Status already updated") raise ValueError("Offer Status already updated")
@ -310,17 +313,13 @@ def submitApplication(request, id, email, user_type):
try: try:
data = request.data data = request.data
if OPENING_TYPE in data: if OPENING_TYPE in data:
if data[OPENING_TYPE] == "Internship": opening_type= data[OPENING_TYPE]
opening_type= "Internship"
elif data[OPENING_TYPE] == "placements":
opening_type= "Placement"
else: else:
opening_type= "Placement" opening_type= "Placement"
if opening_type == "Internship": if opening_type == "Internship":
opening = get_object_or_404(Internship, pk=data[OPENING_ID]) opening = get_object_or_404(Internship, pk=data[OPENING_ID])
else: else:
opening = get_object_or_404(Placement, pk=data[OPENING_ID]) opening = get_object_or_404(Placement, pk=data[OPENING_ID])
# print(opening);
student = get_object_or_404(Student, pk=data[STUDENT_ID]) student = get_object_or_404(Student, pk=data[STUDENT_ID])
# opening = get_object_or_404(Placement, pk=data[OPENING_ID]) # opening = get_object_or_404(Placement, pk=data[OPENING_ID])
student_user = get_object_or_404(User, id=student.id) student_user = get_object_or_404(User, id=student.id)
@ -450,7 +449,8 @@ def generateCSV(request, id, email, user_type):
row_details.append(apl.selected) row_details.append(apl.selected)
for i in opening.additional_info: for i in opening.additional_info:
row_details.append(json.loads(apl.additional_info).get(i, '')) row_details.append(json.loads(apl.additional_info)[i])
writer.writerow(row_details) writer.writerow(row_details)
f.close() f.close()
file_path = LINK_TO_APPLICATIONS_CSV + urllib.parse.quote_plus(filename + ".csv") file_path = LINK_TO_APPLICATIONS_CSV + urllib.parse.quote_plus(filename + ".csv")
@ -462,42 +462,6 @@ def generateCSV(request, id, email, user_type):
status=status.HTTP_400_BAD_REQUEST) status=status.HTTP_400_BAD_REQUEST)
@api_view(['POST'])
@isAuthorized(allowed_users=[ADMIN])
@precheck(required_data=[OPENING_ID])
def downloadResume(request, id, email, user_type):
try:
data = request.data
if OPENING_TYPE in data:
opening_type= data[OPENING_TYPE]
if opening_type == "Internship":
opening = get_object_or_404(Internship, id=data[OPENING_ID])
applications = InternshipApplication.objects.filter(internship=opening)
else:
opening = get_object_or_404(Placement, id=data[OPENING_ID])
applications = PlacementApplication.objects.filter(placement=opening)
zip_filename = generateRandomString() + ".zip"
if not os.path.isdir(STORAGE_DESTINATION_RESUME_ZIP):
os.makedirs(STORAGE_DESTINATION_RESUME_ZIP, exist_ok=True)
resumes = {}
for apl in applications:
resumes[apl.student.roll_no] = STORAGE_DESTINATION_RESUMES + apl.student.id + '/' + apl.resume # Check if the folder name is student id or user id
with zipfile.ZipFile(STORAGE_DESTINATION_RESUME_ZIP + zip_filename, 'w', zipfile.ZIP_DEFLATED) as zip_file:
for student_roll_no, resume_path in resumes.items():
zip_file.write(resume_path, os.path.basename(str(student_roll_no) + ".pdf"))
file_path = LINK_TO_RESUMES_ZIP + urllib.parse.quote_plus(zip_filename)
return Response({'action': "Download resumes", 'message': "Resumes zip created", 'file': file_path},
status=status.HTTP_200_OK)
except:
logger.warning("Create csv: " + str(sys.exc_info()))
return Response({'action': "Create csv", 'message': "Something Went Wrong"},
status=status.HTTP_400_BAD_REQUEST)
@api_view(['POST']) @api_view(['POST'])
@isAuthorized(allowed_users=[ADMIN]) @isAuthorized(allowed_users=[ADMIN])
@precheck(required_data=[COMPANY_NAME, COMPENSATION_GROSS, OFFER_ACCEPTED, STUDENT_ID, DESIGNATION, TIER]) @precheck(required_data=[COMPANY_NAME, COMPENSATION_GROSS, OFFER_ACCEPTED, STUDENT_ID, DESIGNATION, TIER])
@ -626,17 +590,6 @@ def getStats(request, id, email, user_type):
"psu":0, "psu":0,
}, },
"EP":{
"1":0,
"2":0,
"3":0,
"4":0,
"5":0,
"6":0,
"7":0,
"8":0,
"psu":0,
},
"Total": { "Total": {
"1":0, "1":0,
"2":0, "2":0,
@ -653,7 +606,6 @@ def getStats(request, id, email, user_type):
"CSE": 0, "CSE": 0,
"EE": 0, "EE": 0,
"MMAE": 0, "MMAE": 0,
"EP": 0,
"Total": 0, "Total": 0,
} }
number_of_students_with_multiple_offers = 0 number_of_students_with_multiple_offers = 0
@ -661,26 +613,22 @@ def getStats(request, id, email, user_type):
"CSE": 0, "CSE": 0,
"EE": 0, "EE": 0,
"MMAE": 0, "MMAE": 0,
"EP": 0,
"Total": 0, "Total": 0,
} }
max_CTC = { max_CTC = {
"CSE": 0, "CSE": 0,
"EE": 0, "EE": 0,
"MMAE": 0, "MMAE": 0
"EP": 0,
} }
average_CTC = { average_CTC = {
"CSE": 0, "CSE": 0,
"EE": 0, "EE": 0,
"MMAE": 0, "MMAE": 0
"EP": 0,
} }
count = { count = {
"CSE": 0, "CSE": 0,
"EE": 0, "EE": 0,
"MMAE": 0, "MMAE": 0
"EP": 0,
} }
@ -802,6 +750,7 @@ def getStats(request, id, email, user_type):
status=status.HTTP_200_OK) status=status.HTTP_200_OK)
except: except:
logger.warning("Get Stats: " + str(sys.exc_info())) logger.warning("Get Stats: " + str(sys.exc_info()))
print(sys.exc_info())
return Response({'action': "Get Stats", 'message': "Something Went Wrong"}, return Response({'action': "Get Stats", 'message': "Something Went Wrong"},
status=status.HTTP_400_BAD_REQUEST) status=status.HTTP_400_BAD_REQUEST)
@ -817,11 +766,7 @@ def get_eligible_students(request):
opening_type= data[OPENING_TYPE] opening_type= data[OPENING_TYPE]
else: else:
opening_type= "Placement" opening_type= "Placement"
if "send_all" in data: eligible_students=get_eligible_emails(opening_id=opening_id, opening_type=opening_type)
send_all = "True"==data["send_all"]
else:
send_all = False
eligible_students=get_eligible_emails(opening_id=opening_id, opening_type=opening_type, send_all=send_all)
return Response({'action': "Get Eligible Students", 'message': "Eligible Students Fetched", return Response({'action': "Get Eligible Students", 'message': "Eligible Students Fetched",
'eligible_students': eligible_students}, 'eligible_students': eligible_students},
status=status.HTTP_200_OK) status=status.HTTP_200_OK)

View File

@ -11,14 +11,12 @@ logger = logging.getLogger('db')
IS_COMPANY_DETAILS_PDF, CONTACT_PERSON_NAME, PHONE_NUMBER, EMAIL, CITY, STATE, COUNTRY, PINCODE, DESIGNATION, IS_COMPANY_DETAILS_PDF, CONTACT_PERSON_NAME, PHONE_NUMBER, EMAIL, CITY, STATE, COUNTRY, PINCODE, DESIGNATION,
DESCRIPTION, DESCRIPTION,
IS_DESCRIPTION_PDF, COMPENSATION_CTC, COMPENSATION_GROSS, COMPENSATION_TAKE_HOME, COMPENSATION_BONUS, IS_DESCRIPTION_PDF, COMPENSATION_CTC, COMPENSATION_GROSS, COMPENSATION_TAKE_HOME, COMPENSATION_BONUS,
IS_COMPENSATION_DETAILS_PDF, ALLOWED_BRANCH, ELIGIBLESTUDENTS, SELECTION_PROCEDURE_ROUNDS, IS_COMPENSATION_DETAILS_PDF, ALLOWED_BRANCH, RS_ELIGIBLE, SELECTION_PROCEDURE_ROUNDS,
SELECTION_PROCEDURE_DETAILS, SELECTION_PROCEDURE_DETAILS,
IS_SELECTION_PROCEDURE_DETAILS_PDF, TENTATIVE_DATE_OF_JOINING, TENTATIVE_NO_OF_OFFERS, OTHER_REQUIREMENTS, IS_SELECTION_PROCEDURE_DETAILS_PDF, TENTATIVE_DATE_OF_JOINING, TENTATIVE_NO_OF_OFFERS, OTHER_REQUIREMENTS,
RECAPTCHA_VALUE, JOB_LOCATION,PSYCHOMETRIC_TEST,MEDICAL_TEST,NUMBER_OF_EMPLOYEES,BACKLOG_ELIGIBLE,PWD_ELIGIBLE,CPI,EXPECTED_NO_OF_OFFERS]) RECAPTCHA_VALUE, JOB_LOCATION
])
def addPlacement(request): def addPlacement(request):
logger.info("JNF filled by " + str(request.data['email']))
logger.info(request.data)
try: try:
data = request.data data = request.data
files = request.FILES files = request.FILES
@ -36,35 +34,11 @@ def addPlacement(request):
opening.website = data[WEBSITE] opening.website = data[WEBSITE]
opening.company_details = data[COMPANY_DETAILS] opening.company_details = data[COMPANY_DETAILS]
opening.is_company_details_pdf = data[IS_COMPANY_DETAILS_PDF] opening.is_company_details_pdf = data[IS_COMPANY_DETAILS_PDF]
# if data[RS_ELIGIBLE] == 'Yes': if data[RS_ELIGIBLE] == 'Yes':
# opening.rs_eligible = True opening.rs_eligible = True
# else: else:
# opening.rs_eligible = False opening.rs_eligible = False
if data[ELIGIBLESTUDENTS] is None:
raise ValueError('Eligible Students cannot be empty')
elif set(json.loads(data[ELIGIBLESTUDENTS])).issubset(ELIGIBLE):
opening.eligiblestudents = json.loads(data[ELIGIBLESTUDENTS])
else:
raise ValueError('Allowed Branch must be a subset of ' + str(ELIGIBLE))
if data[PWD_ELIGIBLE] == 'Yes':
opening.pwd_eligible = True
else:
opening.pwd_eligible = False
if data[BACKLOG_ELIGIBLE] == 'Yes':
opening.backlog_eligible = True
else:
opening.backlog_eligible = False
if data[PSYCHOMETRIC_TEST] == 'Yes':
opening.psychometric_test = True
else:
opening.psychometric_test = False
if data[MEDICAL_TEST] == 'Yes':
opening.medical_test = True
else:
opening.medical_test = False
opening.cpi_eligible = data[CPI]
if opening.is_company_details_pdf: if opening.is_company_details_pdf:
company_details_pdf = [] company_details_pdf = []
for file in files.getlist(COMPANY_DETAILS_PDF): for file in files.getlist(COMPANY_DETAILS_PDF):
@ -83,8 +57,10 @@ def addPlacement(request):
# Add a contact person details in the opening # Add a contact person details in the opening
opening.contact_person_name = data[CONTACT_PERSON_NAME] opening.contact_person_name = data[CONTACT_PERSON_NAME]
# Check if Phone number is Integer # Check if Phone number is Integer
if data[PHONE_NUMBER].isdigit():
opening.phone_number = data[PHONE_NUMBER] opening.phone_number = int(data[PHONE_NUMBER])
else:
raise ValueError('Phone number should be integer')
opening.email = data[EMAIL] opening.email = data[EMAIL]
@ -135,18 +111,6 @@ def addPlacement(request):
opening.compensation_CTC = None opening.compensation_CTC = None
else: else:
raise ValueError('Compensation CTC must be an integer') raise ValueError('Compensation CTC must be an integer')
# Newly added
if data[COMPANY_TURNOVER].isdigit():
opening.company_turnover = int(data[COMPANY_TURNOVER])
elif data[COMPANY_TURNOVER] is None or data[COMPANY_TURNOVER] == '':
opening.company_turnover = None
else:
# Handle the case where the data is not a valid number or None/empty
# You can raise an error, set a default value, or log a warning
opening.company_turnover = None # Or some default value or error handling
# Check if compensation_gross is integer # Check if compensation_gross is integer
if data[COMPENSATION_GROSS].isdigit(): if data[COMPENSATION_GROSS].isdigit():
@ -229,14 +193,6 @@ def addPlacement(request):
# Convert to date object # Convert to date object
opening.tentative_date_of_joining = datetime.datetime.strptime(data[TENTATIVE_DATE_OF_JOINING], opening.tentative_date_of_joining = datetime.datetime.strptime(data[TENTATIVE_DATE_OF_JOINING],
'%d-%m-%Y').date() '%d-%m-%Y').date()
establishment_date_str = data.get('ESTABLISHMENT_DATE', '')
if establishment_date_str:
try:
opening.establishment_date = datetime.datetime.strptime(establishment_date_str, '%d-%m-%Y').date()
except ValueError:
opening.establishment_date = None
else:
opening.establishment_date = None
# Only Allowing Fourth Year for Placement # Only Allowing Fourth Year for Placement
opening.allowed_batch = [FOURTH_YEAR,] opening.allowed_batch = [FOURTH_YEAR,]
@ -255,17 +211,8 @@ def addPlacement(request):
opening.tentative_no_of_offers = None opening.tentative_no_of_offers = None
else: else:
raise ValueError('Tentative No Of Offers must be an integer') raise ValueError('Tentative No Of Offers must be an integer')
# newly added
if data[EXPECTED_NO_OF_OFFERS].isdigit():
opening.expected_no_of_offers = int(data[EXPECTED_NO_OF_OFFERS])
elif data[EXPECTED_NO_OF_OFFERS] == 'null':
opening.expected_no_of_offers = None
opening.other_requirements = data[OTHER_REQUIREMENTS] opening.other_requirements = data[OTHER_REQUIREMENTS]
# newly added
if data[NUMBER_OF_EMPLOYEES].isdigit():
opening.number_of_employees = int(data[NUMBER_OF_EMPLOYEES])
elif data[NUMBER_OF_EMPLOYEES] == 'null':
opening.number_of_employees = None
opening.save() opening.save()
@ -286,19 +233,20 @@ def addPlacement(request):
except ValueError as e: except ValueError as e:
store_all_files(request) store_all_files(request)
exception_email(data)
logger.warning("ValueError in addPlacement: " + str(e)) logger.warning("ValueError in addPlacement: " + str(e))
logger.warning(traceback.format_exc()) logger.warning(traceback.format_exc())
return Response({'action': "Add Placement", 'message': str(e)}, return Response({'action': "Add Placement", 'message': str(e)},
status=status.HTTP_400_BAD_REQUEST) status=status.HTTP_400_BAD_REQUEST)
except Exception as e: except:
store_all_files(request) store_all_files(request)
logger.warning("Add New Placement: " + str(e)) exception_email(data)
logger.warning("Add New Placement: " + str(sys.exc_info()))
logger.warning(traceback.format_exc()) logger.warning(traceback.format_exc())
return Response({'action': "Add Placement", 'message': "Something went wrong: " + str(e)}, return Response({'action': "Add Placement", 'message': "Something went wrong"},
status=status.HTTP_400_BAD_REQUEST) status=status.HTTP_400_BAD_REQUEST)
@api_view(['POST']) @api_view(['POST'])
@precheck([TOKEN]) @precheck([TOKEN])
def verifyEmail(request): def verifyEmail(request):
@ -399,13 +347,12 @@ def autoFillInf(request):
@precheck([COMPANY_NAME, WEBSITE, IS_COMPANY_DETAILS_PDF, COMPANY_DETAILS, ADDRESS, @precheck([COMPANY_NAME, WEBSITE, IS_COMPANY_DETAILS_PDF, COMPANY_DETAILS, ADDRESS,
CITY, STATE, COUNTRY, PINCODE, COMPANY_TYPE, NATURE_OF_BUSINESS, IS_DESCRIPTION_PDF, CITY, STATE, COUNTRY, PINCODE, COMPANY_TYPE, NATURE_OF_BUSINESS, IS_DESCRIPTION_PDF,
DESIGNATION, INTERNSHIP_LOCATION, DESCRIPTION, SEASON, START_DATE, END_DATE, WORK_TYPE, DESIGNATION, INTERNSHIP_LOCATION, DESCRIPTION, SEASON, START_DATE, END_DATE, WORK_TYPE,
ALLOWED_BRANCH, ELIGIBLESTUDENTS, NUM_OFFERS, IS_STIPEND_DETAILS_PDF, STIPEND, ALLOWED_BRANCH, SOPHOMORES_ELIIGIBLE, RS_ELIGIBLE, NUM_OFFERS, IS_STIPEND_DETAILS_PDF, STIPEND,
FACILITIES, OTHER_FACILITIES, SELECTION_PROCEDURE_ROUNDS, SELECTION_PROCEDURE_DETAILS, IS_SELECTION_PROCEDURE_DETAILS_PDF, FACILITIES, OTHER_FACILITIES, SELECTION_PROCEDURE_ROUNDS, SELECTION_PROCEDURE_DETAILS, IS_SELECTION_PROCEDURE_DETAILS_PDF,
SELECTION_PROCEDURE_DETAILS, OTHER_REQUIREMENTS, SELECTION_PROCEDURE_DETAILS, OTHER_REQUIREMENTS,
CONTACT_PERSON_NAME, PHONE_NUMBER, EMAIL, RECAPTCHA_VALUE ,ESTABLISHMENT_DATE,PWD_ELIGIBLE,BACKLOG_ELIGIBLE,PSYCHOMETRIC_TEST,MEDICAL_TEST,CPI,EXPECTED_NO_OF_OFFERS,NUMBER_OF_EMPLOYEES,COMPANY_TURNOVER]) CONTACT_PERSON_NAME, PHONE_NUMBER, EMAIL, RECAPTCHA_VALUE])
def addInternship(request): def addInternship(request):
logger.info("INF filled by " + str(request.data['email'])) logger.info("INF filled by " + str(request.data['email']))
logger.info(request.data)
try: try:
data = request.data data = request.data
files = request.FILES files = request.FILES
@ -463,25 +410,18 @@ def addInternship(request):
raise ValueError('Season must be a subset of ' + str(SEASONS)) raise ValueError('Season must be a subset of ' + str(SEASONS))
internship.interning_period_from = datetime.datetime.strptime(data[START_DATE], '%d-%m-%Y').date() internship.interning_period_from = datetime.datetime.strptime(data[START_DATE], '%d-%m-%Y').date()
internship.interning_period_to = datetime.datetime.strptime(data[END_DATE], '%d-%m-%Y').date() internship.interning_period_to = datetime.datetime.strptime(data[END_DATE], '%d-%m-%Y').date()
establishment_date_str = data.get('ESTABLISHMENT_DATE', '')
if establishment_date_str:
try:
internship.establishment_date = datetime.datetime.strptime(establishment_date_str, '%d-%m-%Y').date()
except ValueError:
internship.establishment_date = None
else:
internship.establishment_date = None
if data[WORK_TYPE] == 'Work from home': if data[WORK_TYPE] == 'Work from home':
internship.is_work_from_home = True internship.is_work_from_home = True
else: else:
internship.is_work_from_home = False internship.is_work_from_home = False
if ALLOWED_BATCH in data and (data[ALLOWED_BATCH] is None or json.loads(data[ALLOWED_BATCH]) == ""):
raise ValueError('Allowed Batches cannot be empty') if data[ALLOWED_BATCH] is None or json.loads(data[ALLOWED_BATCH]) == "":
elif ALLOWED_BATCH in data and set(json.loads(data[ALLOWED_BATCH])).issubset(BATCHES): raise ValueError('Allowed Branch cannot be empty')
elif set(json.loads(data[ALLOWED_BATCH])).issubset(BATCHES):
internship.allowed_batch = json.loads(data[ALLOWED_BATCH]) internship.allowed_batch = json.loads(data[ALLOWED_BATCH])
else: else:
internship.allowed_batch = ['2021'] raise ValueError('Allowed Batch must be a subset of ' + str(BATCHES))
if data[ALLOWED_BRANCH] is None or json.loads(data[ALLOWED_BRANCH]) == "": if data[ALLOWED_BRANCH] is None or json.loads(data[ALLOWED_BRANCH]) == "":
raise ValueError('Allowed Branch cannot be empty') raise ValueError('Allowed Branch cannot be empty')
@ -490,35 +430,14 @@ def addInternship(request):
else: else:
raise ValueError('Allowed Branch must be a subset of ' + str(BRANCHES)) raise ValueError('Allowed Branch must be a subset of ' + str(BRANCHES))
# if data[SOPHOMORES_ELIIGIBLE] == 'Yes': if data[SOPHOMORES_ELIIGIBLE] == 'Yes':
# internship.sophomore_eligible = True internship.sophomore_eligible = True
# else:
# internship.sophomore_eligible = False
if data[ELIGIBLESTUDENTS] is None:
raise ValueError('Eligible Students cannot be empty')
elif set(json.loads(data[ELIGIBLESTUDENTS])).issubset(ELIGIBLE):
internship.eligiblestudents = json.loads(data[ELIGIBLESTUDENTS])
else: else:
raise ValueError('Allowed Branch must be a subset of ' + str(ELIGIBLE)) internship.sophomore_eligible = False
if data[RS_ELIGIBLE] == 'Yes':
if data[PWD_ELIGIBLE] == 'Yes': internship.rs_eligible = True
internship.pwd_eligible = True
else: else:
internship.pwd_eligible = False internship.rs_eligible = False
if data[BACKLOG_ELIGIBLE] == 'Yes':
internship.backlog_eligible = True
else:
internship.backlog_eligible = False
if data[PSYCHOMETRIC_TEST] == 'Yes':
internship.psychometric_test = True
else:
internship.psychometric_test = False
if data[MEDICAL_TEST] == 'Yes':
internship.medical_test = True
else:
internship.medical_test = False
internship.cpi_eligible = data[CPI]
if data[NUM_OFFERS].isdigit(): if data[NUM_OFFERS].isdigit():
internship.tentative_no_of_offers = int(data[NUM_OFFERS]) internship.tentative_no_of_offers = int(data[NUM_OFFERS])
else: else:
@ -540,26 +459,6 @@ def addInternship(request):
internship.stipend = int(data[STIPEND]) internship.stipend = int(data[STIPEND])
else: else:
raise ValueError('Stipend must be an integer') raise ValueError('Stipend must be an integer')
# Newly added
if data[COMPANY_TURNOVER].isdigit():
internship.company_turnover = int(data[COMPANY_TURNOVER])
elif data[COMPANY_TURNOVER] is None or data[COMPANY_TURNOVER] == '':
internship.company_turnover = None
else:
# Handle the case where the data is not a valid number or None/empty
# You can raise an error, set a default value, or log a warning
internship.company_turnover = None # Or some default value or error handling
# newly added
if data[EXPECTED_NO_OF_OFFERS].isdigit():
internship.expected_no_of_offers = int(data[EXPECTED_NO_OF_OFFERS])
elif data[EXPECTED_NO_OF_OFFERS] == 'null':
internship.expected_no_of_offers = None
internship.other_requirements = data[OTHER_REQUIREMENTS]
# newly added
if data[NUMBER_OF_EMPLOYEES].isdigit():
internship.number_of_employees = int(data[NUMBER_OF_EMPLOYEES])
elif data[NUMBER_OF_EMPLOYEES] == 'null':
internship.number_of_employees = None
if data[FACILITIES] != "" : if data[FACILITIES] != "" :
if json.loads(data[FACILITIES]) == "": if json.loads(data[FACILITIES]) == "":
internship.facilities_provided = [] internship.facilities_provided = []
@ -624,15 +523,15 @@ def addInternship(request):
status=status.HTTP_200_OK) status=status.HTTP_200_OK)
except ValueError as e: except ValueError as e:
store_all_files(request) store_all_files(request)
# exception_email(data)
logger.warning("ValueError in addInternship: " + str(e)) logger.warning("ValueError in addInternship: " + str(e))
logger.warning(traceback.format_exc()) logger.warning(traceback.format_exc())
return Response({'action': "Add Internship", 'message': str(e)}, return Response({'action': "Add Internship", 'message': str(e)},
status=status.HTTP_400_BAD_REQUEST) status=status.HTTP_400_BAD_REQUEST)
except Exception as e: except:
store_all_files(request) store_all_files(request)
logger.warning("Add New Internship: " + str(e)) # exception_email(data)
logger.warning("Add New Internship: " + str(sys.exc_info()))
logger.warning(traceback.format_exc()) logger.warning(traceback.format_exc())
return Response({'action': "Add Internship", 'message': "Something went wrong: " + str(e)}, return Response({'action': "Add Internship", 'message': "Something went wrong"},
status=status.HTTP_400_BAD_REQUEST) status=status.HTTP_400_BAD_REQUEST)

View File

@ -10,14 +10,7 @@ BRANCH_CHOICES = [
['EP', 'EP'], ['EP', 'EP'],
['CIVIL', 'CIVIL'], ['CIVIL', 'CIVIL'],
['CHEMICAL', 'CHEMICAL'], ['CHEMICAL', 'CHEMICAL'],
['MNC','MNC'] ['BSMS', 'BSMS'],
]
ELIGIBLE_CHOICES = [
["Btech", "Btech"],
["MS", "MS"],
["MTech", "MTech"],
["PHD", "PHD"],
["BSMS", "BSMS"],
] ]
BRANCHES = [ BRANCHES = [
"CSE", "CSE",
@ -26,13 +19,6 @@ BRANCHES = [
"EP", "EP",
"CIVIL", "CIVIL",
"CHEMICAL", "CHEMICAL",
"MNC",
]
ELIGIBLE =[
"Btech",
"MS",
"MTech",
"PHD",
"BSMS", "BSMS",
] ]
BATCHES = [ #change it accordingly BATCHES = [ #change it accordingly
@ -42,7 +28,6 @@ BATCHES = [ #change it accordingly
"2020", "2020",
] ]
BATCH_CHOICES = [ BATCH_CHOICES = [
["2023","2023"],
["2022", "2022"], ["2022", "2022"],
["2021", "2021"], ["2021", "2021"],
["2020", "2020"], ["2020", "2020"],
@ -67,8 +52,7 @@ TIERS = [
['7', 'Tier 7'], ['7', 'Tier 7'],
['8', 'Open Tier'], ['8', 'Open Tier'],
] ]
bTech = 'Btech'
# not being used anywhere
DEGREE_CHOICES = [ DEGREE_CHOICES = [
['bTech', 'B.Tech'], ['bTech', 'B.Tech'],
['ms/phd', 'MS/ PhD'], ['ms/phd', 'MS/ PhD'],
@ -81,15 +65,13 @@ TOTAL_BATCHES = 6 # Total No of Batches
CDC_REPS_EMAILS = [ CDC_REPS_EMAILS = [
"cdc@iitdh.ac.in", "cdc@iitdh.ac.in",
"cdcfic@iitdh.ac.in", "cdcfic@iitdh.ac.in",
"priyanka.naga@iitdh.ac.in",
"vandana@iitdh.ac.in", "vandana@iitdh.ac.in",
"sairam@iitdh.ac.in", "sairam@iitdh.ac.in",
"satyapriya.gupta@iitdh.ac.in", "satyapriya.gupta@iitdh.ac.in",
"dhriti.ghosh@iitdh.ac.in", "dhriti.ghosh@iitdh.ac.in",
"suvamay.jana@iitdh.ac.in", "suvamay.jana@iitdh.ac.in",
"ramesh.nayaka@iitdh.ac.in", "ramesh.nayaka@iitdh.ac.in"
"210010003@iitdh.ac.in",
"210010046@iitdh.ac.in",
"210030035@iitdh.ac.in",
] ]
CDC_REPS_EMAILS_FOR_ISSUE=[ #add reps emails CDC_REPS_EMAILS_FOR_ISSUE=[ #add reps emails
"cdc.support@iitdh.ac.in", "cdc.support@iitdh.ac.in",
@ -107,7 +89,6 @@ PLACEMENT_OPENING_URL = "https://cdc.iitdh.ac.in/portal/student/dashboard/placem
LINK_TO_STORAGE_COMPANY_ATTACHMENT = "https://cdc.iitdh.ac.in/storage/Company_Attachments/" LINK_TO_STORAGE_COMPANY_ATTACHMENT = "https://cdc.iitdh.ac.in/storage/Company_Attachments/"
LINK_TO_STORAGE_RESUME = "https://cdc.iitdh.ac.in/storage/Resumes/" LINK_TO_STORAGE_RESUME = "https://cdc.iitdh.ac.in/storage/Resumes/"
LINK_TO_APPLICATIONS_CSV = "https://cdc.iitdh.ac.in/storage/Application_CSV/" LINK_TO_APPLICATIONS_CSV = "https://cdc.iitdh.ac.in/storage/Application_CSV/"
LINK_TO_RESUMES_ZIP = "https://cdc.iitdh.ac.in/storage/Resume_Zips/"
LINK_TO_EMAIl_VERIFICATION_API = "https://cdc.iitdh.ac.in/portal/company/verifyEmail?token={token}" LINK_TO_EMAIl_VERIFICATION_API = "https://cdc.iitdh.ac.in/portal/company/verifyEmail?token={token}"
PDF_FILES_SERVING_ENDPOINT = 'https://cdc.iitdh.ac.in/storage/Company_Attachments/' # TODO: Change this to actual URL PDF_FILES_SERVING_ENDPOINT = 'https://cdc.iitdh.ac.in/storage/Company_Attachments/' # TODO: Change this to actual URL
@ -123,7 +104,7 @@ SERVICE= 'service'
COMPANY = 'company' COMPANY = 'company'
TIER = 'tier' TIER = 'tier'
# To be Configured Properly # To be Configured Properly
FOURTH_YEAR = '2021' FOURTH_YEAR = '2020'
MAX_OFFERS_PER_STUDENT = 2 MAX_OFFERS_PER_STUDENT = 2
MAX_RESUMES_PER_STUDENT = 3 MAX_RESUMES_PER_STUDENT = 3
EMAIL_VERIFICATION_TOKEN_TTL = 48 # in hours EMAIL_VERIFICATION_TOKEN_TTL = 48 # in hours
@ -135,7 +116,6 @@ JNF_SMALLTEXT_MAX_CHARACTER_COUNT = 50
STORAGE_DESTINATION_RESUMES = "./Storage/Resumes/" STORAGE_DESTINATION_RESUMES = "./Storage/Resumes/"
STORAGE_DESTINATION_COMPANY_ATTACHMENTS = './Storage/Company_Attachments/' STORAGE_DESTINATION_COMPANY_ATTACHMENTS = './Storage/Company_Attachments/'
STORAGE_DESTINATION_APPLICATION_CSV = './Storage/Application_CSV/' STORAGE_DESTINATION_APPLICATION_CSV = './Storage/Application_CSV/'
STORAGE_DESTINATION_RESUME_ZIP = './Storage/Resume_Zips/'
TOKEN = 'token' TOKEN = 'token'
RESUME_FILE_NAME = 'resume_file_name' RESUME_FILE_NAME = 'resume_file_name'
@ -175,7 +155,6 @@ IS_DESCRIPTION_PDF = 'is_description_pdf'
OPENING_TYPE = 'opening_type' OPENING_TYPE = 'opening_type'
JOB_LOCATION = 'job_location' JOB_LOCATION = 'job_location'
COMPENSATION_CTC = 'compensation_ctc' COMPENSATION_CTC = 'compensation_ctc'
COMPANY_TURNOVER = 'company_turnover' # newly added field
COMPENSATION_GROSS = 'compensation_gross' COMPENSATION_GROSS = 'compensation_gross'
COMPENSATION_TAKE_HOME = 'compensation_take_home' COMPENSATION_TAKE_HOME = 'compensation_take_home'
COMPENSATION_BONUS = 'compensation_bonus' COMPENSATION_BONUS = 'compensation_bonus'
@ -185,13 +164,7 @@ COMPENSATION_DETAILS_PDF_NAMES = 'compensation_details_pdf_names'
IS_COMPENSATION_DETAILS_PDF = 'is_compensation_details_pdf' IS_COMPENSATION_DETAILS_PDF = 'is_compensation_details_pdf'
ALLOWED_BATCH = 'allowed_batch' ALLOWED_BATCH = 'allowed_batch'
ALLOWED_BRANCH = 'allowed_branch' ALLOWED_BRANCH = 'allowed_branch'
# RS_ELIGIBLE = 'rs_eligible' removed RS_ELIGIBLE = 'rs_eligible'
ELIGIBLESTUDENTS= 'eligiblestudents'# newly adde field
PWD_ELIGIBLE = 'pwd_eligible' # newly added field
BACKLOG_ELIGIBLE = 'backlog_eligible' # newly added field
PSYCHOMETRIC_TEST = 'pyschometric_test' # newly added field
MEDICAL_TEST = 'medical_test' # newly added field
CPI = 'cpi' # newly added field
BOND_DETAILS = 'bond_details' BOND_DETAILS = 'bond_details'
SELECTION_PROCEDURE_ROUNDS = 'selection_procedure_rounds' SELECTION_PROCEDURE_ROUNDS = 'selection_procedure_rounds'
SELECTION_PROCEDURE_DETAILS = 'selection_procedure_details' SELECTION_PROCEDURE_DETAILS = 'selection_procedure_details'
@ -199,10 +172,7 @@ SELECTION_PROCEDURE_DETAILS_PDF = 'selection_procedure_details_pdf'
SELECTION_PROCEDURE_DETAILS_PDF_NAMES = 'selection_procedure_details_pdf_names' SELECTION_PROCEDURE_DETAILS_PDF_NAMES = 'selection_procedure_details_pdf_names'
IS_SELECTION_PROCEDURE_DETAILS_PDF = 'is_selection_procedure_details_pdf' IS_SELECTION_PROCEDURE_DETAILS_PDF = 'is_selection_procedure_details_pdf'
TENTATIVE_DATE_OF_JOINING = 'tentative_date_of_joining' TENTATIVE_DATE_OF_JOINING = 'tentative_date_of_joining'
ESTABLISHMENT_DATE = 'establishment_date' # newly added field
TENTATIVE_NO_OF_OFFERS = 'tentative_no_of_offers' TENTATIVE_NO_OF_OFFERS = 'tentative_no_of_offers'
EXPECTED_NO_OF_OFFERS = 'expected_no_of_offers' # newly added field
NUMBER_OF_EMPLOYEES = 'number_of_employees' # newly added field
OTHER_REQUIREMENTS = 'other_requirements' OTHER_REQUIREMENTS = 'other_requirements'
DEADLINE_DATETIME = 'deadline_datetime' DEADLINE_DATETIME = 'deadline_datetime'
OFFER_ACCEPTED = 'offer_accepted' OFFER_ACCEPTED = 'offer_accepted'

View File

@ -1,63 +0,0 @@
from .models import *
from .utils import *
import shutil
import logging
import traceback
logger=logging.getLogger('db')
def clean_up_tests():
# Delete all the test internships and placements created
try:
internships= Internship.objects.filter(company_name="test company",email="notifications@cdc-iitdh.tech")
hits_internship=len(internships)
for internship in internships:
#count number of file
files = os.listdir(STORAGE_DESTINATION_COMPANY_ATTACHMENTS+internship.id)
if len(files) == 4:
print("working fine")
else:
print("not working fine")
logger.error("files submitted in inf are not getting stored for test case"+internship.description)
#remove folder from the server
print("removing folder ",STORAGE_DESTINATION_COMPANY_ATTACHMENTS+internship.id)
shutil.rmtree(STORAGE_DESTINATION_COMPANY_ATTACHMENTS+internship.id)
internship.delete()
placements= Placement.objects.filter(company_name="test company",email="notifications@cdc-iitdh.tech")
hits_placement=len(placements)
for placement in placements:
#count number of file
files = os.listdir(STORAGE_DESTINATION_COMPANY_ATTACHMENTS+placement.id)
if len(files) == 4:
print("working fine")
else:
print("not working fine")
logger.error("files submitted in inf are not getting stored for test case"+placement.description)
#remove folder from the server
print("removing folder ",STORAGE_DESTINATION_COMPANY_ATTACHMENTS+internship.id)
shutil.rmtree(STORAGE_DESTINATION_COMPANY_ATTACHMENTS+placement.id)
placement.delete()
if hits_internship >= 6:
print("all hits are working fine")
else:
print("some hits are not working fine")
logger.error("some test hits are not working fine for internship")
if hits_placement >= 6:
print("all hits are working fine")
else:
print("some hits are not working fine")
logger.error("some test hits are not working fine for placement")
except :
logger.error("error in clean up function")
logger.error(traceback.format_exc())

View File

@ -26,17 +26,15 @@ class Student(models.Model):
roll_no = models.CharField(blank=False, max_length=15, unique=True) roll_no = models.CharField(blank=False, max_length=15, unique=True)
name = models.CharField(blank=False, max_length=JNF_TEXT_MAX_CHARACTER_COUNT) name = models.CharField(blank=False, max_length=JNF_TEXT_MAX_CHARACTER_COUNT)
batch = models.CharField(max_length=10, choices=BATCH_CHOICES, blank=False) batch = models.CharField(max_length=10, choices=BATCH_CHOICES, blank=False)
branch = models.CharField(choices=BRANCH_CHOICES, blank=True,default=None, null=True, max_length=10) branch = models.CharField(choices=BRANCH_CHOICES, blank=False, max_length=10)
phone_number = models.PositiveBigIntegerField(blank=True, default=None, null=True) phone_number = models.PositiveBigIntegerField(blank=True, default=None, null=True)
resumes = ArrayField(models.CharField(null=True, default=None, max_length=JNF_TEXT_MAX_CHARACTER_COUNT), size=10, resumes = ArrayField(models.CharField(null=True, default=None, max_length=JNF_TEXT_MAX_CHARACTER_COUNT), size=10,
default=list, blank=True) default=list, blank=True)
cpi = models.DecimalField(decimal_places=2, max_digits=4) cpi = models.DecimalField(decimal_places=2, max_digits=4)
can_apply = models.BooleanField(default=True, verbose_name='Registered') can_apply = models.BooleanField(default=True, verbose_name='Registered')
can_apply_internship = models.BooleanField(default=True, verbose_name='Internship Registered') can_apply_internship = models.BooleanField(default=True, verbose_name='Internship Registered') #added for internship
changed_by = models.ForeignKey(User, blank=True, on_delete=models.RESTRICT, default=None, null=True) changed_by = models.ForeignKey(User, blank=True, on_delete=models.RESTRICT, default=None, null=True)
degree = models.CharField(choices=ELIGIBLE_CHOICES, blank=False, max_length=10, default=ELIGIBLE_CHOICES[0][0]) # should be ELIGIBLE_CHOICES degree = models.CharField(choices=DEGREE_CHOICES, blank=False, max_length=10, default=DEGREE_CHOICES[0][0])
isPwd = models.BooleanField(default=False, verbose_name='Person with Disability')
isBacklog = models.BooleanField(default=False, verbose_name='Has Backlog')
history = HistoricalRecords(user_model=User) history = HistoricalRecords(user_model=User)
def __str__(self): def __str__(self):
@ -92,14 +90,13 @@ class Placement(models.Model):
default=list, blank=True) default=list, blank=True)
is_company_details_pdf = models.BooleanField(blank=False, default=False) is_company_details_pdf = models.BooleanField(blank=False, default=False)
contact_person_name = models.CharField(blank=False, max_length=JNF_TEXT_MAX_CHARACTER_COUNT) contact_person_name = models.CharField(blank=False, max_length=JNF_TEXT_MAX_CHARACTER_COUNT)
phone_number = models.CharField(max_length=15, blank=False) phone_number = models.PositiveBigIntegerField(blank=False)
email = models.CharField(blank=False, max_length=JNF_SMALLTEXT_MAX_CHARACTER_COUNT, default="") email = models.CharField(blank=False, max_length=JNF_SMALLTEXT_MAX_CHARACTER_COUNT, default="")
city = models.CharField(blank=False, max_length=JNF_SMALLTEXT_MAX_CHARACTER_COUNT, default="") city = models.CharField(blank=False, max_length=JNF_SMALLTEXT_MAX_CHARACTER_COUNT, default="")
state = models.CharField(blank=False, max_length=JNF_SMALLTEXT_MAX_CHARACTER_COUNT, default="") state = models.CharField(blank=False, max_length=JNF_SMALLTEXT_MAX_CHARACTER_COUNT, default="")
country = models.CharField(blank=False, max_length=JNF_SMALLTEXT_MAX_CHARACTER_COUNT, default="") country = models.CharField(blank=False, max_length=JNF_SMALLTEXT_MAX_CHARACTER_COUNT, default="")
pin_code = models.IntegerField(blank=False, default=None, null=True) pin_code = models.IntegerField(blank=False, default=None, null=True)
city_type = models.CharField(blank=False, max_length=15, choices=OFFER_CITY_TYPE) city_type = models.CharField(blank=False, max_length=15, choices=OFFER_CITY_TYPE)
cpi_eligible = models.DecimalField(decimal_places=2, default=0.00, max_digits=4) #newly added field
# Job Details # Job Details
designation = models.CharField(blank=False, max_length=JNF_TEXT_MAX_CHARACTER_COUNT, default=None, null=True) designation = models.CharField(blank=False, max_length=JNF_TEXT_MAX_CHARACTER_COUNT, default=None, null=True)
description = models.CharField(blank=False, max_length=JNF_TEXTAREA_MAX_CHARACTER_COUNT, default=None, null=True) description = models.CharField(blank=False, max_length=JNF_TEXTAREA_MAX_CHARACTER_COUNT, default=None, null=True)
@ -109,7 +106,6 @@ class Placement(models.Model):
blank=True) blank=True)
is_description_pdf = models.BooleanField(blank=False, default=False) is_description_pdf = models.BooleanField(blank=False, default=False)
compensation_CTC = models.IntegerField(blank=False, default=None, null=True) # Job - Per Year compensation_CTC = models.IntegerField(blank=False, default=None, null=True) # Job - Per Year
company_turnover = models.IntegerField(blank=True, default=None, null=True) # newly added field
compensation_gross = models.IntegerField(blank=False, default=None, null=True) compensation_gross = models.IntegerField(blank=False, default=None, null=True)
compensation_take_home = models.IntegerField(blank=False, default=None, null=True) compensation_take_home = models.IntegerField(blank=False, default=None, null=True)
compensation_bonus = models.IntegerField(blank=True, default=None, null=True) compensation_bonus = models.IntegerField(blank=True, default=None, null=True)
@ -128,7 +124,6 @@ class Placement(models.Model):
is_selection_procedure_details_pdf = models.BooleanField(blank=False, default=False) is_selection_procedure_details_pdf = models.BooleanField(blank=False, default=False)
tier = models.CharField(blank=False, choices=TIERS, max_length=10, default=None, null=True) tier = models.CharField(blank=False, choices=TIERS, max_length=10, default=None, null=True)
tentative_date_of_joining = models.DateField(blank=False, verbose_name="Tentative Date", default=timezone.now) tentative_date_of_joining = models.DateField(blank=False, verbose_name="Tentative Date", default=timezone.now)
establishment_date = models.DateField(blank=True, default=None, null=True) # newly added field
allowed_batch = ArrayField( allowed_batch = ArrayField(
models.CharField(max_length=10, choices=BATCH_CHOICES), models.CharField(max_length=10, choices=BATCH_CHOICES),
size=TOTAL_BATCHES, size=TOTAL_BATCHES,
@ -141,17 +136,7 @@ class Placement(models.Model):
default=list default=list
) )
tentative_no_of_offers = models.IntegerField(blank=False, default=None, null=True) tentative_no_of_offers = models.IntegerField(blank=False, default=None, null=True)
expected_no_of_offers = models.IntegerField(blank=False , default=None , null=True) # newly added rs_eligible = models.BooleanField(blank=False, default=False)
number_of_employees = models.IntegerField(blank=True, default=None, null=True) # newly added field
eligiblestudents = ArrayField(
models.CharField(choices=ELIGIBLE_CHOICES, blank=False, max_length=10),
size=10,
default=list
) #newly added field
pwd_eligible = models.BooleanField(blank=True, default=False) #newly added field
backlog_eligible = models.BooleanField(blank=True, default=False) #newly added field
psychometric_test = models.BooleanField(blank=True, default=False) #newly added field
medical_test = models.BooleanField(blank=True, default=False) #newly added field
other_requirements = models.CharField(blank=True, max_length=JNF_TEXTAREA_MAX_CHARACTER_COUNT, default="") other_requirements = models.CharField(blank=True, max_length=JNF_TEXTAREA_MAX_CHARACTER_COUNT, default="")
additional_info = ArrayField(models.CharField(blank=True, max_length=JNF_TEXTMEDIUM_MAX_CHARACTER_COUNT), size=15, additional_info = ArrayField(models.CharField(blank=True, max_length=JNF_TEXTMEDIUM_MAX_CHARACTER_COUNT), size=15,
default=list, blank=True) default=list, blank=True)
@ -339,21 +324,9 @@ class Internship(models.Model):
size=TOTAL_BATCHES, size=TOTAL_BATCHES,
default=list default=list
) )
eligiblestudents = ArrayField( sophomore_eligible = models.BooleanField(blank=False, default=False)
models.CharField(choices=ELIGIBLE_CHOICES, blank=False, max_length=10), rs_eligible = models.BooleanField(blank=False, default=False)
size=10,
default=list
)
tentative_no_of_offers = models.IntegerField(blank=False, default=None, null=True) tentative_no_of_offers = models.IntegerField(blank=False, default=None, null=True)
company_turnover = models.IntegerField(blank=True, default=None, null=True) # newly added field
establishment_date = models.DateField(blank=True, default=None, null=True) # newly added field
expected_no_of_offers = models.IntegerField(blank=True , default=None , null=True) # newly added
number_of_employees = models.IntegerField(blank=True, default=None, null=True) # newly added field
pwd_eligible = models.BooleanField(blank=True, default=False) #newly added field
backlog_eligible = models.BooleanField(blank=True, default=False) #newly added field
psychometric_test = models.BooleanField(blank=True, default=False) #newly added field
medical_test = models.BooleanField(blank=True, default=False) #newly added field
cpi_eligible = models.DecimalField(decimal_places=2, default=0.00, max_digits=4) #newly added field
is_stipend_description_pdf = models.BooleanField(blank=False, default=False) is_stipend_description_pdf = models.BooleanField(blank=False, default=False)
stipend_description_pdf_names=ArrayField( stipend_description_pdf_names=ArrayField(
models.CharField(null=True, default=None, max_length=JNF_TEXT_MAX_CHARACTER_COUNT), size=5, default=list, models.CharField(null=True, default=None, max_length=JNF_TEXT_MAX_CHARACTER_COUNT), size=5, default=list,
@ -383,7 +356,7 @@ class Internship(models.Model):
is_selection_procedure_details_pdf = models.BooleanField(blank=False, default=False) is_selection_procedure_details_pdf = models.BooleanField(blank=False, default=False)
#contact details of company person #contact details of company person
contact_person_name = models.CharField(blank=False, max_length=JNF_TEXT_MAX_CHARACTER_COUNT) contact_person_name = models.CharField(blank=False, max_length=JNF_TEXT_MAX_CHARACTER_COUNT)
phone_number = models.CharField(max_length=15, blank=False) phone_number = models.PositiveBigIntegerField(blank=False)
email = models.EmailField(blank=False) email = models.EmailField(blank=False)
# contact_person_designation = models.CharField(blank=False, max_length=JNF_SMALLTEXT_MAX_CHARACTER_COUNT, default="") # contact_person_designation = models.CharField(blank=False, max_length=JNF_SMALLTEXT_MAX_CHARACTER_COUNT, default="")
# telephone_number = models.PositiveBigIntegerField(blank=True, default=None, null=True) # telephone_number = models.PositiveBigIntegerField(blank=True, default=None, null=True)

View File

@ -1,6 +1,4 @@
from datetime import datetime as dt
from rest_framework.decorators import api_view from rest_framework.decorators import api_view
from django.db.models import Q
from .serializers import * from .serializers import *
from .utils import * from .utils import *
@ -50,7 +48,7 @@ def refresh(request):
@isAuthorized(allowed_users=[STUDENT]) @isAuthorized(allowed_users=[STUDENT])
def studentProfile(request, id, email, user_type): def studentProfile(request, id, email, user_type):
try: try:
#print(id)
studentDetails = get_object_or_404(Student, id=id) studentDetails = get_object_or_404(Student, id=id)
data = StudentSerializer(studentDetails).data data = StudentSerializer(studentDetails).data
@ -103,33 +101,20 @@ def getDashboard(request, id, email, user_type):
try: try:
studentDetails = get_object_or_404(Student, id=id) studentDetails = get_object_or_404(Student, id=id)
filters = Q( placements = Placement.objects.filter(allowed_batch__contains=[studentDetails.batch],
allowed_branch__contains=[studentDetails.branch], allowed_branch__contains=[studentDetails.branch],
eligiblestudents__contains=[studentDetails.degree], deadline_datetime__gte=datetime.datetime.now(),
deadline_datetime__gte=dt.now(), offer_accepted=True, email_verified=True).order_by('deadline_datetime')
offer_accepted=True,
email_verified=True
)
if studentDetails.degree == 'Btech':
filters &= Q(allowed_batch__contains=[studentDetails.batch])
placements = Placement.objects.filter(filters).order_by('deadline_datetime')
filtered_placements = placement_eligibility_filters(studentDetails, placements) filtered_placements = placement_eligibility_filters(studentDetails, placements)
placementsdata = PlacementSerializerForStudent(filtered_placements, many=True).data placementsdata = PlacementSerializerForStudent(filtered_placements, many=True).data
placementApplications = PlacementApplication.objects.filter(student_id=id).order_by('-updated_at') placementApplications = PlacementApplication.objects.filter(student_id=id).order_by('-updated_at')
placementApplications = PlacementApplicationSerializer(placementApplications, many=True).data placementApplications = PlacementApplicationSerializer(placementApplications, many=True).data
if studentDetails.degree == 'BSMS': # for BSMS branch is not considered internships = Internship.objects.filter(allowed_batch__contains=[studentDetails.batch],
internships = Internship.objects.filter( allowed_branch__contains=[studentDetails.branch],
allowed_batch__contains=[studentDetails.batch], deadline_datetime__gte=datetime.datetime.now(),
deadline_datetime__gte=datetime.datetime.now(), offer_accepted=True, email_verified=True).order_by('deadline_datetime')
offer_accepted=True,
email_verified=True
).order_by('deadline_datetime')
else:
internships = Internship.objects.filter(filters).order_by('deadline_datetime')
filtered_internships = internship_eligibility_filters(studentDetails, internships) filtered_internships = internship_eligibility_filters(studentDetails, internships)
internshipsdata = InternshipSerializerForStudent(filtered_internships, many=True).data internshipsdata = InternshipSerializerForStudent(filtered_internships, many=True).data
@ -200,14 +185,11 @@ def submitApplication(request, id, email, user_type):
if not len(PlacementApplication.objects.filter( if not len(PlacementApplication.objects.filter(
student_id=id, placement_id=data[OPENING_ID])): student_id=id, placement_id=data[OPENING_ID])):
application = PlacementApplication() application = PlacementApplication()
application_filters = Q( opening = get_object_or_404(Placement, id=data[OPENING_ID],
id=data[OPENING_ID], allowed_batch__contains=[student.batch],
allowed_branch__contains=[student.branch], allowed_branch__contains=[student.branch],
deadline_datetime__gte=timezone.now() deadline_datetime__gte=timezone.now()
) )
if student.degree == "Btech":
application_filters &= Q(allowed_batch__contains=[student.batch])
opening = get_object_or_404(Placement.objects.filter(application_filters))
if not opening.offer_accepted or not opening.email_verified: if not opening.offer_accepted or not opening.email_verified:
raise PermissionError("Placement Not Approved") raise PermissionError("Placement Not Approved")
@ -224,14 +206,11 @@ def submitApplication(request, id, email, user_type):
if not len(InternshipApplication.objects.filter( if not len(InternshipApplication.objects.filter(
student_id=id, internship_id=data[OPENING_ID])): student_id=id, internship_id=data[OPENING_ID])):
application = InternshipApplication() application = InternshipApplication()
application_filters = Q( opening = get_object_or_404(Internship, id=data[OPENING_ID],
id=data[OPENING_ID], allowed_batch__contains=[student.batch],
allowed_branch__contains=[student.branch], allowed_branch__contains=[student.branch],
deadline_datetime__gte=timezone.now() deadline_datetime__gte=timezone.now()
) )
if student.degree == "Btech":
application_filters &= Q(allowed_batch__contains=[student.batch])
opening = get_object_or_404(Internship.objects.filter(application_filters))
if not opening.offer_accepted or not opening.email_verified: if not opening.offer_accepted or not opening.email_verified:
raise PermissionError("Internship Not Approved") raise PermissionError("Internship Not Approved")

View File

@ -720,8 +720,27 @@ class AdminView(APITestCase):
self.assertEqual(response.data['message'], 'Offer Accepted Updated') self.assertEqual(response.data['message'], 'Offer Accepted Updated')
self.assertEqual(Placement.objects.get( self.assertEqual(Placement.objects.get(
id=self.placement1.id).offer_accepted, True) id=self.placement1.id).offer_accepted, True)
self.assertEqual(Placement.objects.get(
id=self.placement1.id).deadline_datetime, timezone.localtime(timezone.now()).replace(hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=2))
def test_offerAccepted_withDeadline(self):
url = reverse("Update Offer Accepted")
data = {
"opening_type": "Placement",
"opening_id": self.placement3.id,
"offer_accepted": "true",
"deadline_datetime": (timezone.localtime(timezone.now()).replace(
hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S %z')
}
self.admin.user_type = ["s_admin"]
self.admin.save()
self.client.credentials(HTTP_AUTHORIZATION='Bearer ' + self.token)
response = self.client.post(url, data=json.dumps(
data), content_type='application/json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(Placement.objects.get(
id=self.placement3.id).deadline_datetime, timezone.localtime(timezone.now()).replace(hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=1))
self.assertEqual(response.data['message'], 'Offer Accepted Updated')
def test_offerAccepted_wrongOpening(self): def test_offerAccepted_wrongOpening(self):
url = reverse("Update Offer Accepted") url = reverse("Update Offer Accepted")
@ -1180,7 +1199,28 @@ class AdminView(APITestCase):
self.assertEqual(Internship.objects.get( self.assertEqual(Internship.objects.get(
id=self.internship1.id).offer_accepted, True) id=self.internship1.id).offer_accepted, True)
self.internship1.refresh_from_db() self.internship1.refresh_from_db()
self.assertEqual(self.internship1.deadline_datetime, timezone.localtime(timezone.now()).replace(
hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=2))
def test_updateofferAccepted_withDeadline_internship(self):
url = reverse("Update Offer Accepted")
data = {
"opening_type": "Internship",
"opening_id": self.internship3.id,
"offer_accepted": "true",
"deadline_datetime": (timezone.localtime(timezone.now()).replace(
hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S %z')
}
self.admin.user_type = ["s_admin"]
self.admin.save()
self.client.credentials(HTTP_AUTHORIZATION='Bearer ' + self.token)
response = self.client.post(url, data=json.dumps(
data), content_type='application/json')
self.internship3.refresh_from_db()
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(Internship.objects.get(
id=self.internship3.id).deadline_datetime, timezone.localtime(timezone.now()).replace(hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=1))
self.assertEqual(response.data['message'], 'Offer Accepted Updated')
def test_updateofferAccepted_wrongOpening_internship(self): def test_updateofferAccepted_wrongOpening_internship(self):
url = reverse("Update Offer Accepted") url = reverse("Update Offer Accepted")

View File

@ -81,22 +81,22 @@ def precheck(required_data=None):
request_data = request.data request_data = request.data
if not len(request_data): if not len(request_data):
request_data = request.POST request_data = request.POST
if len(request_data):
if request_data and len(request_data):
for i in required_data: for i in required_data:
# print(i)
if i not in request_data: if i not in request_data:
return Response({'action': "Pre check", 'message': str(i) + " Not Found"}, return Response({'action': "Pre check", 'message': str(i) + " Not Found"},
status=status.HTTP_400_BAD_REQUEST) status=status.HTTP_400_BAD_REQUEST)
else: else:
return Response({'action': "Pre check", 'message': "Message Data not Found"}, return Response({'action': "Pre check", 'message': "Message Data not Found"},
status=status.HTTP_400_BAD_REQUEST) status=status.HTTP_400_BAD_REQUEST)
# print("Pre check: " + str(request_data))
return view_func(request, *args, **kwargs) return view_func(request, *args, **kwargs)
except:
except Exception as e: # print what exception is
# Log the full traceback for debugging purposes print(traceback.format_exc())
logger.error("Pre check error: %s", traceback.format_exc()) logger.warning("Pre check: " + str(sys.exc_info()))
return Response({'action': "Pre check", 'message': "Something went wrong: " + str(e)}, return Response({'action': "Pre check", 'message': "Something went wrong"},
status=status.HTTP_400_BAD_REQUEST) status=status.HTTP_400_BAD_REQUEST)
return wrapper_func return wrapper_func
@ -238,38 +238,27 @@ def PlacementApplicationConditions(student, placement):
PPO_PSU = [i for i in PPO if i.tier == 'psu'] PPO_PSU = [i for i in PPO if i.tier == 'psu']
# find length of PPO # find length of PPO
if len(selected_companies) + len(PPO) >= MAX_OFFERS_PER_STUDENT: if len(selected_companies) + len(PPO) >= MAX_OFFERS_PER_STUDENT:
raise PermissionError("Max Applications Reached for the Season1") raise PermissionError("Max Applications Reached for the Season")
if len(selected_companies_PSU) > 0: if len(selected_companies_PSU) > 0:
raise PermissionError('Selected for PSU Can\'t apply anymore2') raise PermissionError('Selected for PSU Can\'t apply anymore')
if len(PPO_PSU) > 0: if len(PPO_PSU) > 0:
raise PermissionError('Selected for PSU Can\'t apply anymore3') raise PermissionError('Selected for PSU Can\'t apply anymore')
if placement.tier == 'psu': if placement.tier == 'psu':
return True, "Conditions Satisfied" return True, "Conditions Satisfied"
for i in selected_companies: for i in selected_companies:
if 1.5 * i.placement.compensation_CTC > placement.compensation_CTC: if int(i.placement.tier) < int(placement.tier):
return False, "Can't apply for this Placement, 1.5 times CTC condition not satisfied" return False, "Can't apply for this tier"
for i in PPO: for i in PPO:
if 1.5 * i.compensation > placement.compensation_CTC: if int(i.tier) < int(placement.tier):
return False, "Can't apply for this Placement, 1.5 times CTC condition not satisfied" return False, "Can't apply for this tier"
if student.degree not in placement.eligiblestudents:
raise PermissionError("Can't apply for this placement4") if student.degree != 'bTech' and not placement.rs_eligible:
if student.degree == bTech and student.batch not in placement.allowed_batch: raise PermissionError("Can't apply for this placement")
raise PermissionError("Can't apply for this placement5")
if student.branch not in placement.allowed_branch:
raise PermissionError("Can't apply for this placement6")
if student.can_apply == False:
raise PermissionError("Can't apply for this placement7")
if student.isBacklog == True and placement.backlog_eligible == False:
raise PermissionError("Can't apply for this placement8")
if student.isPwd == True and placement.pwd_eligible == False:
raise PermissionError("Can't apply for this placement9")
if placement.cpi_eligible > student.cpi:
raise PermissionError("Can't apply for this placement10")
return True, "Conditions Satisfied" return True, "Conditions Satisfied"
@ -282,23 +271,9 @@ def PlacementApplicationConditions(student, placement):
def InternshipApplicationConditions(student, internship): def InternshipApplicationConditions(student, internship):
try: try:
selected_companies = InternshipApplication.objects.filter(student=student, selected=True) selected_companies = InternshipApplication.objects.filter(student=student, selected=True)
if len(selected_companies) >= 1: if len(selected_companies)>=1:
# print("selected companies > 1")
return False, "You have already secured a Internship" return False, "You have already secured a Internship"
if student.degree not in internship.eligiblestudents:
raise PermissionError("Can't apply for this Internship")
if student.degree != 'BSMS' and student.branch not in internship.allowed_branch: # for BSMS branch is not considered
raise PermissionError("Can't apply for this Internship")
if student.degree == bTech and student.batch not in internship.allowed_batch:
raise PermissionError("Can't apply for this Internship")
if student.can_apply_internship == False:
raise PermissionError("Can't apply for this Internship")
if student.isBacklog == True and internship.backlog_eligible == False:
raise PermissionError("Can't apply for this Internship")
if student.isPwd == True and internship.pwd_eligible == False:
raise PermissionError("Can't apply for this Internship")
if internship.cpi_eligible > student.cpi:
raise PermissionError("Can't apply for this Internship")
return True, "Conditions Satisfied" return True, "Conditions Satisfied"
except PermissionError as e: except PermissionError as e:
@ -431,8 +406,6 @@ def placement_eligibility_filters(student, placements):
except: except:
logger.warning("Utils - placement_eligibility_filters: " + str(sys.exc_info())) logger.warning("Utils - placement_eligibility_filters: " + str(sys.exc_info()))
return placements return placements
def internship_eligibility_filters(student, internships): def internship_eligibility_filters(student, internships):
try: try:
filtered_internships = [] filtered_internships = []
@ -450,6 +423,7 @@ def internship_eligibility_filters(student, internships):
@background_task.background(schedule=2) @background_task.background(schedule=2)
def send_opening_notifications(opening_id, opening_type=PLACEMENT): def send_opening_notifications(opening_id, opening_type=PLACEMENT):
try: try:
# print(opening_id, opening_type)
if opening_type == PLACEMENT: if opening_type == PLACEMENT:
opening = get_object_or_404(Placement, id=opening_id) opening = get_object_or_404(Placement, id=opening_id)
else: else:
@ -483,48 +457,38 @@ def send_opening_notifications(opening_id, opening_type=PLACEMENT):
logger.warning('Utils - send_opening_notifications: ' + str(sys.exc_info())) logger.warning('Utils - send_opening_notifications: ' + str(sys.exc_info()))
return False return False
def get_eligible_emails(opening_id, opening_type=PLACEMENT):
def get_eligible_emails(opening_id, opening_type='PLACEMENT', send_all=False):
try: try:
if opening_type == 'PLACEMENT': # print(opening_id, opening_type)
if opening_type == PLACEMENT:
opening = get_object_or_404(Placement, id=opening_id) opening = get_object_or_404(Placement, id=opening_id)
else: else:
opening = get_object_or_404(Internship, id=opening_id) opening = get_object_or_404(Internship, id=opening_id)
emails=[]
emails = []
students = Student.objects.all() students = Student.objects.all()
for student in students.iterator(): for student in students.iterator():
if student.branch in opening.allowed_branch and student.degree in opening.eligiblestudents: if student.branch in opening.allowed_branch:
if student.degree == 'Btech' and student.batch in opening.allowed_batch: if student.degree == 'bTech' or opening.rs_eligible is True:
if (isinstance(opening, Placement) and PlacementApplicationConditions(student, opening)[0]) or ( if (isinstance(opening,Placement) and PlacementApplicationConditions(student, opening)[0]) or (
isinstance(opening, Internship) and InternshipApplicationConditions(student, opening)[0]): isinstance(opening,Internship) and InternshipApplicationConditions(student, opening)[0]):
if (opening_type == 'PLACEMENT' and student.can_apply) or ( try:
opening_type == 'INTERNSHIP' and student.can_apply_internship):
student_user = get_object_or_404(User, id=student.id) student_user = get_object_or_404(User, id=student.id)
# check if he applied
# if send_all True send all students eligible for the opening if opening_type == PLACEMENT:
if send_all:
emails.append(student_user.email)
continue
# check if the student applied
if opening_type == 'PLACEMENT':
if PlacementApplication.objects.filter(student=student, placement=opening).exists(): if PlacementApplication.objects.filter(student=student, placement=opening).exists():
continue continue
else: else:
if InternshipApplication.objects.filter(student=student, internship=opening).exists(): if InternshipApplication.objects.filter(student=student, internship=opening).exists():
continue continue
emails.append(student_user.email) emails.append(student_user.email)
except Exception as e:
logger.warning('Utils - send_opening_notifications: For Loop' + str(e))
return False, []
return True, emails return True, emails
except:
except Exception as e: logger.warning('Utils - send_opening_notifications: ' + str(sys.exc_info()))
logger.warning('Utils - send_opening_notifications: ' + str(e))
return False, [] return False, []
def exception_email(opening): def exception_email(opening):
opening = opening.dict() opening = opening.dict()
data = { data = {
@ -601,13 +565,12 @@ def send_email_for_opening(opening):
@background_task.background(schedule=2) @background_task.background(schedule=2)
def send_opening_to_notifications_service(id,name,deadline,role,opening_type=PLACEMENT): def send_opening_to_notifications_service(id,name,deadline,role):
data={ data={
"id":id, "id":id,
"company":name, "company":name,
"deadline":deadline, "deadline":deadline,
"role":role, "role":role
"opening_type":opening_type
} }
encoded=jwt.encode(data,os.environ.get("JWT_SECRET_KEY"),algorithm="HS256") encoded=jwt.encode(data,os.environ.get("JWT_SECRET_KEY"),algorithm="HS256")
data_={ data_={

View File

@ -30,7 +30,7 @@ DEBUG = os.environ.get('DEBUG') == "True"
ALLOWED_HOSTS = ['cdc.iitdh.ac.in', 'localhost'] ALLOWED_HOSTS = ['cdc.iitdh.ac.in', 'localhost']
ADMINS = [ ('Jaya Surya', '210020051@iitdh.ac.in')] ADMINS = [ ('Karthik Mv', '200010030@iitdh.ac.in')]
# Application definition # Application definition
INSTALLED_APPS = [ INSTALLED_APPS = [
@ -47,8 +47,7 @@ INSTALLED_APPS = [
'background_task', 'background_task',
'simple_history', 'simple_history',
'import_export', 'import_export',
'django_extensions', 'django_extensions'
'django_crontab',
] ]
MIDDLEWARE = [ MIDDLEWARE = [
@ -143,10 +142,10 @@ DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.2/howto/static-files/ # https://docs.djangoproject.com/en/2.2/howto/static-files/
STATIC_URL = '/static_url/' STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static_url') STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATICFILES_DIR = ( STATICFILES_DIR = (
os.path.join(BASE_DIR, 'static_url'), os.path.join(BASE_DIR, 'static'),
) )
CORS_ORIGIN_ALLOW_ALL = False CORS_ORIGIN_ALLOW_ALL = False
@ -204,7 +203,3 @@ LOGGING = {
} }
# django_heroku.settings(locals()) # django_heroku.settings(locals())
CRONJOBS = [
('0 8,20 * * *', 'APIs.cron.clean_up_tests')
]

2
CDC_Backend/run_prod.sh Executable file → Normal file
View File

@ -1 +1 @@
gunicorn --certfile=/home/cdc/Desktop/1f9476e3959ebe60.crt --keyfile=/home/cdc/Desktop/star_iitdh_key.key --bind localhost:8000 CDC_Backend.wsgi --access-logfile access.log --error-logfile error.log --forwarded-allow-ips="cdc.iitdh.ac.in" gunicorn --certfile=/home/cdc/Desktop/1f9476e3959ebe60.crt --keyfile=/home/cdc/Desktop/star_iitdh_key.key --bind localhost:8000 CDC_Backend.wsgi --access-logfile access.log --error-logfile error.log --forwarded-allow-ips="cdc.iitdh.ac.in" &

View File

@ -1,196 +1,90 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="x-apple-disable-message-reformatting" /> <meta name="x-apple-disable-message-reformatting">
<title>Email Template</title> <title></title>
<link rel="preconnect" href="https://fonts.gstatic.com" /> <!--[if mso]>
<link rel="shortcut icon" href="favicon.ico" /> <noscript>
<link <xml>
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" <o:OfficeDocumentSettings>
rel="stylesheet" <o:PixelsPerInch>96</o:PixelsPerInch>
/> </o:OfficeDocumentSettings>
</xml>
</noscript>
<![endif]-->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="shortcut icon" href="favicon.ico"/>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet">
<style> <style>
body, table, td, div, h1, p {
table, font-family: 'Roboto', sans-serif;
td,
div,
p,
h1 {
font-family: "Roboto", sans-serif;
}
body {
margin: 0;
padding: 0;
background-color: #e1e4e8; /* Outer background color */
}
.email-wrapper {
padding: 20px;
background-color: #e1e4e8; /* Outer background color */
}
.email-container {
width: 100%;
max-width: 600px;
margin: 0 auto;
background-color: #eff7ff; /* Outer box background color */
border-radius: 8px;
overflow: hidden;
}
.email-header,
.email-footer {
padding: 40px 0;
text-align: center;
color: #ffffff;
}
.email-header img {
width: 150px;
height: auto;
margin-bottom: 20px;
}
.email-header h1 {
margin: 0;
font-size: 24px;
font-weight: 500;
}
.inner-container {
background-color: #ffffff; /* Inner box background color */
border-radius: 8px;
margin: 0 20px;
}
.inner-container .email-body {
padding: 36px 30px;
}
.inner-container .email-body h2 {
margin-bottom: 24px;
font-size: 24px;
color: black;
font-weight: 500;
}
.inner-container .email-body p {
margin-bottom: 16px;
font-size: 16px;
line-height: 24px;
color: #555555;
}
.email-footer {
padding: 20px 30px;
text-align: center;
color: #ffffff;
}
.email-footer p {
margin: 0;
font-size: 14px;
line-height: 20px;
}
.button {
display: inline-block;
padding: 12px 24px;
margin: 20px 0;
font-size: 16px;
color: #ffffff;
background-color: #ff7350;
text-decoration: none;
border-radius: 5px;
font-weight: 500;
}
@media only screen and (max-width: 600px) {
.inner-container .email-body,
.email-footer {
padding: 20px !important;
} }
}
</style>
</head>
<body>
<div class="email-wrapper">
<table role="presentation" class="email-container">
<tr>
<td>
<div class="email-header">
<img
src="https://cdc.iitdh.ac.in/storage/Images/CDC-Logo.png"
alt="CDC Logo"
style="width: 35%; height: auto; display: block; margin: 0 auto"
/>
</div>
<div class="inner-container">
<div class="email-body">
<img
src="https://cdc.iitdh.ac.in/storage/Images/Approved.png"
alt="verify Logo"
style="
width: 35%;
height: auto;
display: block;
margin: 0 auto;
"
/>
<h2 style="text-align: center">Verification Required</h2>
<p style="text-align: center">
We have received your
<strong>{{opening_type}}</strong> Notification for
<strong>{{designation}}</strong>. Please verify your email by
clicking the button below:
</p>
<p style="text-align: center">
<a
href="{{one_time_link}}"
style="
display: inline-block;
padding: 12px 24px;
margin: 20px 0;
font-size: 16px;
color: #ffffff;
background-color: #ff7350;
text-decoration: none;
border-radius: 50px;
font-weight: 500;
"
>Verify Email</a
>
</p>
</div>
</div>
<div class="email-footer">
<p style="margin-bottom: 16px; color: #555555">Follow us on:</p>
<a </style>
href="https://twitter.com/cdc_iitdh" </head>
style="margin-right: 10px; color: #eff7ff" <body style="margin:0;padding:0;">
> <table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;background:#ffffff;">
<img <tr>
src="https://cdc.iitdh.ac.in/storage/Images/twitter.png" <td align="center" style="padding:0;">
alt="Twitter" <table role="presentation"
style="width: 24px; height: 24px" style="width:602px;border-collapse:collapse;border:1px solid #334878;border-spacing:0;text-align:left;">
/> <tr>
</a> <td align="center" style="padding:40px 0 30px 0;background:#334878;">
<a <img src="https://drive.google.com/uc?id=1QTA6dB7jnsZfU1kzyUqfD_2V5xODpWFt" alt="" width="200"
href="https://www.instagram.com/cdc.iitdh/?hl=en" style="height:auto;display:block;"/>
style="margin-right: 10px; color: #eff7ff" </td>
> </tr>
<img <tr>
src="https://cdc.iitdh.ac.in/storage/Images/Instagram_icon.png" <td style="padding:36px 30px 42px 30px;">
alt="Instagram" <table role="presentation"
style="width: 24px; height: 24px" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
/> <tr>
</a> <td style="padding:0 0 36px 0;color:#153643;">
<a
href="https://www.linkedin.com/company/cdciitdharwad/?originalSubdomain=in" <p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
> We have received your {{opening_type}} Notification for {{ designation }}. Kindly verify your email by clicking <a
<img href="{{ one_time_link }}">here</a>.
src="https://cdc.iitdh.ac.in/storage/Images/LinkedIn_logo_initials.png" </p>
alt="LinkedIn" </td>
style="width: 24px; height: 24px" </tr>
/> <tr>
</a> <td style="padding:0;">
<p style="color: #555555"> <table role="presentation"
copy right &copy; 2024 CDC, all rights reserved style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
</p> <tr>
</div> <td style="width:260px;padding:0;vertical-align:top;color:#334878;">
</td>
</tr>
</table> </td>
</div> </tr>
</body> </table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:30px;background:#334878;">
<table role="presentation"
style="width:100%;border-collapse:collapse;border:0;border-spacing:0;font-size:9px;font-family: 'Roboto', sans-serif;">
<tr>
<td style="padding:0;width:50%;" align="left">
<p style="margin:0;font-size:14px;line-height:16px;font-family: 'Roboto', sans-serif;color:#ffffff;">
&reg; CDC,IIT Dharwad,2021<br/>
</p>
</td>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html> </html>

View File

@ -5,188 +5,69 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<style> <style>
body, table, td, div, p, h1 {
font-family: 'Roboto', sans-serif;
}
body {
margin: 0;
padding: 0;
background-color: #e1e4e8; /* Outer background color */
}
.email-wrapper {
padding: 20px;
background-color: #e1e4e8; /* Outer background color */
}
.email-container {
width: 100%;
max-width: 600px;
margin: 0 auto;
background-color: #eff7ff; /* Outer box background color */
border-radius: 8px;
overflow: hidden;
}
.email-header, .email-footer {
padding: 40px 0;
text-align: center;
color: #ffffff;
}
.email-header img {
width: 150px;
height: auto;
margin-bottom: 20px;
}
.email-header h1 {
margin: 0;
font-size: 24px;
font-weight: 500;
}
.inner-container {
background-color: #ffffff; /* Inner box background color */
border-radius: 8px;
margin: 0 20px;
}
.inner-container .email-body {
padding: 36px 30px;
}
.inner-container .email-body h2 {
margin-bottom: 24px;
font-size: 24px;
color: black;
font-weight: 500;
}
.inner-container .email-body p {
margin-bottom: 16px;
font-size: 16px;
line-height: 24px;
color: #555555;
}
.email-footer {
padding: 20px 30px;
text-align: center;
color: #ffffff;
}
.email-footer p {
margin: 0;
font-size: 14px;
line-height: 20px;
}
#details_table {
width: 100%;
border-collapse: collapse;
margin: 20px auto;
font-size: 16px;
}
#details_table th, #details_table td {
padding: 10px;
border: 1px solid #dddddd;
text-align: left;
}
#details_table th {
background-color: #ff7350;
color: #ffffff;
}
#details_table tr:nth-child(even) { #details_table tr:nth-child(even) {
background-color: #f2f2f2; background: #FFF
} }
#details_table tr:nth-child(odd) { #details_table tr:nth-child(odd) {
background-color: #ffffff; background: #bfe3f3
} }
#details_table ul {
padding-left: 20px; #details_table td {
margin: 0; padding: 10px;
width: 50%;
} }
#details_table a {
color: #334878; #details_table {
text-decoration: none; border: #334878 1px solid;
} border-collapse: collapse;
.social-icons img { width: 80%;
width: 24px; margin: auto;
height: 24px;
margin: 0 5px;
}
@media only screen and (max-width: 600px) {
.inner-container .email-body, .email-footer {
padding: 20px !important;
}
} }
</style> </style>
<title>Notification</title> <title>Document</title>
</head> </head>
<body> <body style="margin: 0;font-family: sans-serif;">
<div class="email-wrapper"> <header style="background-color: #334878;"><img style="height: 3cm; margin: auto; display: block; padding: 0.5cm;"
<div class="email-container"> src='{{ imgpath }}' alt="cdc logo"></header>
<h1 style="text-align: center;"> {{type}} Notification Form Response</h1>
<table id="details_table">
{% for key, value in data.items %}
<tr>
<td>
{{ key }}
</td>
<td>
{% if 'list' in value.type %}
<div class="email-header"> {% for item in value.details %}
<img src="https://cdc.iitdh.ac.in/storage/Images/CDC-Logo.png" alt="CDC Logo" style="width: 35%; height: auto; display: block; margin: 0 auto;" /> <li>
</div> {% if 'link' in value.type and value.link %}
<a href="{{ value.link|add:item}}">{{ item|slice:"16:" }}</a>
{% elif 'link' in value.type %}
<a href="{{ item }}">{{ item }}</a>
{% else %}
{{ item }}
{% endif %}
</li>
{% endfor %}
{% else %}
{% if 'link' in value.type %}
<a href="{{ value.details }}">{{ value.details }}</a>
{% else %}
{{ value }}
{% endif %}
{% endif %}
<div class="inner-container"> </td>
<div class="email-body"> </tr>
<img src="https://cdc.iitdh.ac.in/storage/Images/email_2058176.png" alt="Notification Logo" style="width: 20%; height: auto; display: block; margin: 0 auto;" /> {% endfor %}
<h2 style="text-align: center;">{{type}} Notification Form Response</h2> </table>
<p style="text-align: center;"> <p style="margin-left: 10%;">In case of any descripency regarding above details, please contact <a
<table id="details_table"> href="mailto:cdc@iitdh.ac.in">cdc@iitdh.ac.in</a>
<thead>
<tr>
<th>Key</th>
<th>Value</th>
</tr>
</thead>
<tbody>
{% for key, value in data.items %}
<tr>
<td>{{ key }}</td>
<td>
{% if 'list' in value.type %}
<ul>
{% for item in value.details %}
<li>
{% if 'link' in value.type and value.link %}
<a href="{{ value.link|add:item }}" target="_blank">{{ item|slice:"16:" }}</a>
{% elif 'link' in value.type %}
<a href="{{ item }}" target="_blank">{{ item }}</a>
{% else %}
{{ item }}
{% endif %}
</li>
{% endfor %}
</ul>
{% else %}
{% if 'link' in value.type %}
<a href="{{ value.details }}" target="_blank">{{ value.details }}</a>
{% else %}
{{ value }}
{% endif %}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
In case of any discrepancy regarding the above details, please contact <a href="mailto:cdc@iitdh.ac.in">cdc@iitdh.ac.in</a>.
</p>
</div>
</div>
<div class="email-footer"> </p>
<p style="margin-bottom: 16px; color: #555555;">Follow us on:</p>
<div class="social-icons">
<a href="https://twitter.com/cdc_iitdh" style="margin-right: 10px; color: #eff7ff">
<img src="https://cdc.iitdh.ac.in/storage/Images/twitter.png" alt="Twitter">
</a>
<a href="https://www.instagram.com/cdc.iitdh/?hl=en" style="margin-right: 10px; color: #eff7ff">
<img src="https://cdc.iitdh.ac.in/storage/Images/Instagram_icon.png" alt="Instagram">
</a>
<a href="https://www.linkedin.com/company/cdciitdharwad/?originalSubdomain=in" style="margin-right: 10px; color: #eff7ff">
<img src="https://cdc.iitdh.ac.in/storage/Images/LinkedIn_logo_initials.png" alt="LinkedIn">
</a>
</div>
<p style="color: #555555;">&copy; 2024 CDC, all rights reserved</p>
</div>
</div>
</div>
</body> </body>
</html> </html>

View File

@ -1,213 +1,135 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="x-apple-disable-message-reformatting" /> <meta name="x-apple-disable-message-reformatting">
<title></title> <title></title>
<!--[if mso]> <!--[if mso]>
<noscript> <noscript>
<xml> <xml>
<o:OfficeDocumentSettings> <o:OfficeDocumentSettings>
<o:PixelsPerInch>96</o:PixelsPerInch> <o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings> </o:OfficeDocumentSettings>
</xml> </xml>
</noscript> </noscript>
<![endif]--> <![endif]-->
<link rel="preconnect" href="https://fonts.gstatic.com" /> <link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="shortcut icon" href="favicon.ico" /> <link rel="shortcut icon" href="favicon.ico"/>
<link <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet">
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
rel="stylesheet"
/>
<style> <style>
body, table, td, div, h1, p {
table, font-family: 'Roboto', sans-serif;
td,
div,
h1,
p {
font-family: "Roboto", sans-serif;
}
body {
margin: 0;
padding: 0;
}
.email-wrapper {
width: 100%;
background-color: #ffffff;
padding: 0;
margin: 0;
}
.email-container {
max-width: 600px;
width: 100%;
margin: 0 auto;
border: 8 px;
border-collapse: collapse;
background-color: #eff7ff;
overflow: hidden;
}
.email-header,
.email-footer {
padding: 40px 0;
text-align: center;
}
.email-header img {
width: 200px;
height: auto;
}
.inner-container {
background-color: #ffffff; /* Inner box background color */
border-radius: 8px;
margin: 0 20px;
}
.inner-container .email-body {
padding: 36px 30px 42px 30px;
}
.inner-container .email-body h2 {
font-size: 24px;
margin: 0 0 20px 0;
color: #153643;
}
.inner-container .email-body p {
margin: 0 0 12px 0;
font-size: 16px;
line-height: 24px;
color: #153643;
}
#details_table {
width: 100%;
border: 1px solid #334878;
border-collapse: collapse;
}
#details_table td {
padding: 10px;
color: #153643;
border: 1px solid #334878;
}
.email-footer {
padding: 20px 30px;
text-align: center;
color: #ffffff;
}
.email-footer p {
margin: 0;
font-size: 14px;
line-height: 20px;
}
@media only screen and (max-width: 600px) {
.inner-container .email-body,
.email-footer {
padding: 20px !important;
} }
}
</style>
</head>
<body>
<div class="email-wrapper">
<table role="presentation" class="email-container">
<tr>
<td>
<div class="email-header">
<img
src="https://cdc.iitdh.ac.in/storage/Images/CDC-Logo.png"
alt="CDC Logo"
style="width: 35%; height: auto; display: block; margin: 0 auto"
/>
</div>
<div class="inner-container">
<div class="email-body">
<img
src="https://cdc.iitdh.ac.in/storage/Images/Confirmed.png"
alt="verify Logo"
style="
width: 30%;
height: auto;
display: block;
margin: 0 auto;
"
/>
<h2 style="text-align: center">
Thank You For Filling The Form
</h2>
<p style="text-align: center">
We have received your <b>{{ opening_type }}</b> notification
for a <b>{{ designation }}</b> offer at
<b>{{ company_name }}</b>. We will keep you informed with the
updates. If you have any queries, please feel free to write to
<nobr><u>cdc@iitdh.ac.in</u></nobr
>.
</p>
<!-- <table id="details_table">
{% for key, value in data.items %}
<tr>
<td>{{ key }}</td>
<td>
{% if 'list' in value.type %}
<ul>
{% for item in value.details %}
<li>{% if 'link' in value.type and value.link %}<a href="{{ value.link|add:item}}">{{ item }}</a>{% elif 'link' in value.type %}<a href="{{ item }}">{{ item }}</a>{% else %}{{ item }}{% endif %}</li>
{% endfor %}
</ul>
{% else %}
{% if 'link' in value.type %}<a href="{{ value.details }}">{{ value.details }}</a>{% else %}{{ value }}{% endif %}
{% endif %}
</td>
</tr>
{% endfor %}
</table> -->
</div>
</div>
<div class="email-footer">
<p style="margin-bottom: 16px; color: #555555">Follow us on:</p>
<a #details_table tr:nth-child(even) {
href="https://twitter.com/cdc_iitdh" background: #FFF
style="margin-right: 10px; color: #eff7ff" }
>
<img #details_table tr:nth-child(odd) {
src="https://cdc.iitdh.ac.in/storage/Images/twitter.png" background: #f9f9f9
alt="Twitter" }
style="width: 24px; height: 24px"
/> #details_table td {
</a> padding: 10px
<a }
href="https://www.instagram.com/cdc.iitdh/?hl=en"
style="margin-right: 10px; color: #eff7ff" #details_table {
> border: #334878 1px solid;
<img border-collapse: collapse;
src="https://cdc.iitdh.ac.in/storage/Images/Instagram_icon.png" }
alt="Instagram"
style="width: 24px; height: 24px"
/> </style>
</a> </head>
<a <body style="margin:0;padding:0;">
href="https://www.linkedin.com/company/cdciitdharwad/?originalSubdomain=in" <table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;background:#ffffff;">
> <tr>
<img <td align="center" style="padding:0;">
src="https://cdc.iitdh.ac.in/storage/Images/LinkedIn_logo_initials.png" <table role="presentation"
alt="LinkedIn" style="width:602px;border-collapse:collapse;border:1px solid #334878;border-spacing:0;text-align:left;">
style="width: 24px; height: 24px" <tr>
/> <td align="center" style="padding:40px 0 30px 0;background:#334878;">
</a> <img src="https://drive.google.com/uc?id=1QTA6dB7jnsZfU1kzyUqfD_2V5xODpWFt" alt="" width="200"
<p style="color: #555555"> style="height:auto;display:block;"/>
copy right &copy; 2024 CDC, all rights reserved </td>
</p> </tr>
</div> <tr>
</td> <td style="padding:36px 30px 42px 30px;">
</tr> <table role="presentation"
</table> style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
</div> <tr>
</body> <td style="padding:0 0 36px 0;color:#153643;">
<h1 style="font-size:24px;margin:0 0 20px 0;font-family: 'Roboto', sans-serif;
">Thank You for filling the form</h1>
<p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
We have received your <b>{{ opening_type }}</b> notification for a
<b>{{ designation }}</b> offer at <b>
{{ company_name }}</b>.
</p>
<p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
We will keep you informed with the updates. If you have any queries, please
feel to
write to
<nobr><u>cdc@iitdh.ac.in</u></nobr>
</p>
<table id="details_table">
{% for key, value in data.items %}
<tr>
<td>
{{ key }}
</td>
<td>
{% if 'list' in value.type %}
{% for item in value.details %}
<li>
{% if 'link' in value.type and value.link %}
<a href="{{ value.link|add:item}}">{{ item }}</a>
{% elif 'link' in value.type %}
<a href="{{ item }}">{{ item }}</a>
{% else %}
{{ item }}
{% endif %}
</li>
{% endfor %}
{% else %}
{% if 'link' in value.type %}
<a href="{{ value.details }}">{{ value.details }}</a>
{% else %}
{{ value }}
{% endif %}
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:30px;background:#334878;">
<table role="presentation"
style="width:100%;border-collapse:collapse;border:0;border-spacing:0;font-size:9px;font-family: 'Roboto', sans-serif;">
<tr>
<td style="padding:0;width:50%;" align="left">
<p style="margin:0;font-size:14px;line-height:16px;font-family: 'Roboto', sans-serif;color:#ffffff;">
&reg; CDC,IIT Dharwad,2021<br/>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html> </html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -18,133 +18,70 @@
<link rel="shortcut icon" href="favicon.ico"/> <link rel="shortcut icon" href="favicon.ico"/>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet">
<style> <style>
body, table, td, div, p, h1 { table, td, div, h1, p {
font-family: 'Roboto', sans-serif; font-family: 'Roboto', sans-serif;
} }
body {
margin: 0;
padding: 0;
background-color: #e1e4e8; /* Outer background color */
}
.email-wrapper {
padding: 20px;
background-color: #e1e4e8; /* Outer background color */
}
.email-container {
width: 100%;
max-width: 600px;
margin: 0 auto;
background-color: #eff7ff; /* Outer box background color */
border-radius: 8px;
overflow: hidden;
}
.email-header, .email-footer {
padding: 40px 0;
text-align: center;
color: #ffffff;
}
.email-header img {
width: 150px;
height: auto;
margin-bottom: 20px;
}
.email-header h1 {
margin: 0;
font-size: 24px;
font-weight: 500;
}
.inner-container {
background-color: #ffffff; /* Inner box background color */
border-radius: 8px;
margin: 0 20px;
}
.inner-container .email-body {
padding: 36px 30px;
}
.inner-container .email-body h2 {
margin-bottom: 24px;
font-size: 24px;
color: black;
font-weight: 500;
}
.inner-container .email-body p {
margin-bottom: 16px;
font-size: 16px;
line-height: 24px;
color: #555555;
}
.email-footer {
padding: 20px 30px;
text-align: center;
color: #ffffff;
}
.email-footer p {
margin: 0;
font-size: 14px;
line-height: 20px;
}
.button {
display: inline-block;
padding: 12px 24px;
margin: 20px 0;
font-size: 16px;
color: #ffffff;
background-color: #ff7350;
text-decoration: none;
border-radius: 5px;
font-weight: 500;
}
@media only screen and (max-width: 600px) {
.inner-container .email-body, .email-footer {
padding: 20px !important;
}
}
</style> </style>
</head> </head>
<body class="email-wrapper"> <body style="margin:0;padding:0;">
<table role="presentation" class="email-container"> <table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;background:#ffffff;">
<tr> <tr>
<td> <td align="center" style="padding:0;">
<table role="presentation"
<div class="email-header"> style="width:602px;border-collapse:collapse;border:1px solid #334878;border-spacing:0;text-align:left;">
<img src="https://cdc.iitdh.ac.in/storage/Images/CDC-Logo.png" alt="CDC Logo" style="width: 35%; height: auto; display: block; margin: 0 auto;" /> <tr>
</div> <td align="center" style="padding:40px 0 30px 0;background:#334878;">
<div class="inner-container"> <img src="https://drive.google.com/uc?id=1QTA6dB7jnsZfU1kzyUqfD_2V5xODpWFt" alt="" width="200"
<div class="email-body"> style="height:auto;display:block;"/>
<img src="https://cdc.iitdh.ac.in/storage/Images/notification.png" alt="verify Logo" style="width: 30%; height: auto; display: block; margin: 0 auto;" /> </td>
<h2 style="text-align: center;">{{ opening_type }} Opportunity at {{ company_name }}</h2> </tr>
<p style="text-align: center;"> <tr>
<td style="padding:36px 30px 42px 30px;">
<table role="presentation"
style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
<tr>
<td style="padding:0 0 36px 0;color:#153643;">
<h1 style="font-size:24px;margin:0 0 20px 0;font-family: 'Roboto', sans-serif;
">{{ opening_type }} Opportunity at {{ company_name }}</h1>
<p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
Greetings of the day. Hope you are fine and doing well ! Greetings of the day. Hope you are fine and doing well !
</p>
<p style="text-indent: 4ch; margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
CDC is excited to announce that <b>{{ company_name }}</b> is interested in CDC is excited to announce that <b>{{ company_name }}</b> is interested in
recruiting <b>{{ designation }}</b> from IIT Dharwad. recruiting <b>{{ designation }}</b> from IIT Dharwad.
More details can be found in the CDC Web Portal. More details can be found in the CDC Web Portal.
Interested students can apply before <b>{{ deadline }}</b> in the CDC-Web Portal</p>
<p style="text-align: center;">
<a
href="{{ link }}" style="display: inline-block; padding: 12px 24px; margin: 20px 0; font-size: 16px; color: #ffffff; background-color: #ff7350; text-decoration: none; border-radius: 50px; font-weight: 500;">CDC Web Portal</a>.
</p> </p>
</div>
</div>
<div class="email-footer">
<p style="margin-bottom: 16px; color: #555555;">Follow us on:</p>
<a href="https://twitter.com/cdc_iitdh" style="margin-right: 10px; color: #eff7ff">
<img src="https://cdc.iitdh.ac.in/storage/Images/twitter.png" alt="Twitter" style="width: 24px; height: 24px;">
</a>
<a href="https://www.instagram.com/cdc.iitdh/?hl=en" style="margin-right: 10px; color: #eff7ff;">
<img src="https://cdc.iitdh.ac.in/storage/Images/Instagram_icon.png" alt="Instagram" style="width: 24px; height: 24px;">
</a>
<a href="https://www.linkedin.com/company/cdciitdharwad/?originalSubdomain=in">
<img src="https://cdc.iitdh.ac.in/storage/Images/LinkedIn_logo_initials.png" alt="LinkedIn" style="width: 24px; height: 24px;">
</a>
<p style="color: #555555;">copy right &copy; 2024 CDC, all rights reserved</p>
</div>
<p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
Interested students can apply before <b>{{ deadline }}</b> in the <a
href="{{ link }}">CDC-Web Portal</a>.
</p>
</td> </td>
</tr> </tr>
</table> </table>
</div> </td>
</tr>
<tr>
<td style="padding:30px;background:#334878;">
<table role="presentation"
style="width:100%;border-collapse:collapse;border:0;border-spacing:0;font-size:9px;font-family: 'Roboto', sans-serif;">
<tr>
<td style="padding:0;width:50%;" align="left">
<p style="margin:0;font-size:14px;line-height:16px;font-family: 'Roboto', sans-serif;color:#ffffff;">
&reg; CDC,IIT Dharwad,2022<br/>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body> </body>
</html> </html>

View File

@ -1,206 +1,117 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="x-apple-disable-message-reformatting" /> <meta name="x-apple-disable-message-reformatting">
<title></title> <title></title>
<!--[if mso]> <!--[if mso]>
<noscript> <noscript>
<xml> <xml>
<o:OfficeDocumentSettings> <o:OfficeDocumentSettings>
<o:PixelsPerInch>96</o:PixelsPerInch> <o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings> </o:OfficeDocumentSettings>
</xml> </xml>
</noscript> </noscript>
<![endif]--> <![endif]-->
<link rel="preconnect" href="https://fonts.gstatic.com" /> <link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="shortcut icon" href="favicon.ico" /> <link rel="shortcut icon" href="favicon.ico"/>
<link <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet">
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
rel="stylesheet"
/>
<style> <style>
body, table, td, div, h1, p {
table, font-family: 'Roboto', sans-serif;
td,
div,
p,
h1 {
font-family: "Roboto", sans-serif;
}
body {
margin: 0;
padding: 0;
background-color: #e1e4e8; /* Outer background color */
}
.email-wrapper {
padding: 20px;
background-color: #e1e4e8; /* Outer background color */
}
.email-container {
width: 100%;
max-width: 600px;
margin: 0 auto;
background-color: #eff7ff; /* Outer box background color */
border-radius: 8px;
overflow: hidden;
}
.email-header,
.email-footer {
padding: 40px 0;
text-align: center;
color: #ffffff;
}
.email-header img {
width: 150px;
height: auto;
margin-bottom: 20px;
}
.email-header h1 {
margin: 0;
font-size: 24px;
font-weight: 500;
}
.inner-container {
background-color: #ffffff; /* Inner box background color */
border-radius: 8px;
margin: 0 20px;
}
.inner-container .email-body {
padding: 36px 30px;
}
.inner-container .email-body h2 {
margin-bottom: 24px;
font-size: 24px;
color: black;
font-weight: 500;
}
.inner-container .email-body p {
margin-bottom: 16px;
font-size: 16px;
line-height: 24px;
color: #555555;
}
.email-footer {
padding: 20px 30px;
text-align: center;
color: #ffffff;
}
.email-footer p {
margin: 0;
font-size: 14px;
line-height: 20px;
}
.button {
display: inline-block;
padding: 12px 24px;
margin: 20px 0;
font-size: 16px;
color: #ffffff;
background-color: #ff7350;
text-decoration: none;
border-radius: 5px;
font-weight: 500;
}
@media only screen and (max-width: 600px) {
.inner-container .email-body,
.email-footer {
padding: 20px !important;
} }
}
</style> </style>
</head> </head>
<body> <body style="margin:0;padding:0;">
<div class="email-wrapper"> <table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;background:#ffffff;">
<table role="presentation" class="email-container"> <tr>
<tr> <td align="center" style="padding:0;">
<td> <table role="presentation"
<div class="email-header"> style="width:602px;border-collapse:collapse;border:1px solid #334878;border-spacing:0;text-align:left;">
<img <tr>
src="https://cdc.iitdh.ac.in/storage/Images/CDC-Logo.png" <td align="center" style="padding:40px 0 30px 0;background:#334878;">
alt="CDC Logo" <img src="https://drive.google.com/uc?id=1QTA6dB7jnsZfU1kzyUqfD_2V5xODpWFt" alt="" width="200"
style="width: 35%; height: auto; display: block; margin: 0 auto" style="height:auto;display:block;"/>
/> </td>
</div> </tr>
<div class="inner-container"> <tr>
<div class="email-body"> <td style="padding:36px 30px 42px 30px;">
<img <table role="presentation"
src="https://cdc.iitdh.ac.in/storage/Images/tracking.png" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
alt="verify Logo" <tr>
style=" <td style="padding:0 0 36px 0;color:#153643;">
width: 35%; <h1 style="font-size:24px;margin:0 0 20px 0;font-family: 'Roboto', sans-serif;
height: auto; ">Hello, Folks</h1>
display: block; <p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
margin: 0 auto; We have received a issue regarding a <b>{{ application_type }}</b> opening at
" <b>
/> {{ company_name }}</b> From {{name}}.
<h1 style="text-align: center">Hello, Folks</h1> {% if additional_info %}
<p style="text-align: center"> We received these additional details
We have received a issue regarding a <br>
<b>{{ application_type }}</b> opening at <p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family:
<b> {{ company_name }}</b> From {{name}}. {% if 'Roboto', sans-serif;text-align: center">
additional_info %} We received these additional details
<br />
<!-- <table style="border:solid 1px; margin: auto; text-align: center;width: 80%; <table style="border:solid 1px; margin: auto; text-align: center;width: 80%;
border-radius:15px; background-color: #e0e3ee"> --> border-radius:15px; background-color: #e0e3ee">
{% for i,j in additional_info.items %} {% for i,j in additional_info.items %}
<!-- <tr> <tr>
<td style="padding:8px 10px;color:#153643; ">{{ i }}:</td> <td style="padding:8px 10px;color:#153643; ">{{ i }}:</td>
<td style="padding:8px 10px;color:#153643;">{{ j }}</td> <td style="padding:8px 10px;color:#153643;">{{ j }}</td>
</tr> --> </tr>
{% endfor %} {% endfor %}
<!-- </table> --> </table>
{% endif %} please look into it and take necessary actions. {% endif %}
get in touch with the student at
<nobr><u>{{ email }}</u></nobr>
<!-- </p> --> </p>
</p> </p>
</div> <p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
</div> please look into it and take necessary actions.
<div class="email-footer"> get in touch with the student at at <nobr><u>{{ email }}</u></nobr>
<p style="margin-bottom: 16px; color: #555555">Follow us on:</p>
<a </p>
href="https://twitter.com/cdc_iitdh" </td>
style="margin-right: 10px; color: #eff7ff" </tr>
> <tr>
<img <td style="padding:0;">
src="https://cdc.iitdh.ac.in/storage/Images/twitter.png" <table role="presentation"
alt="Twitter" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
style="width: 24px; height: 24px" <tr>
/> <td style="width:260px;padding:0;vertical-align:top;color:#334878;">
</a>
<a
href="https://www.instagram.com/cdc.iitdh/?hl=en" </td>
style="margin-right: 10px; color: #eff7ff" </tr>
> </table>
<img </td>
src="https://cdc.iitdh.ac.in/storage/Images/Instagram_icon.png" </tr>
alt="Instagram" </table>
style="width: 24px; height: 24px" </td>
/> </tr>
</a> <tr>
<a <td style="padding:30px;background:#334878;">
href="https://www.linkedin.com/company/cdciitdharwad/?originalSubdomain=in" <table role="presentation"
> style="width:100%;border-collapse:collapse;border:0;border-spacing:0;font-size:9px;font-family: 'Roboto', sans-serif;">
<img <tr>
src="https://cdc.iitdh.ac.in/storage/Images/LinkedIn_logo_initials.png" <td style="padding:0;width:50%;" align="left">
alt="LinkedIn" <p style="margin:0;font-size:14px;line-height:16px;font-family: 'Roboto', sans-serif;color:#ffffff;">
style="width: 24px; height: 24px" &reg; CDC,IIT Dharwad,2021<br/>
/> </p>
</a> </td>
<p style="color: #555555">
copy right &copy; 2024 CDC, all rights reserved
</p> </td>
</div> </tr>
</td> </table>
</tr> </td>
</table> </tr>
</div> </table>
</body> </td>
</tr>
</table>
</body>
</html> </html>

View File

@ -1,188 +1,86 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="x-apple-disable-message-reformatting" /> <meta name="x-apple-disable-message-reformatting">
<title></title> <title></title>
<!--[if mso]> <!--[if mso]>
<noscript> <noscript>
<xml> <xml>
<o:OfficeDocumentSettings> <o:OfficeDocumentSettings>
<o:PixelsPerInch>96</o:PixelsPerInch> <o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings> </o:OfficeDocumentSettings>
</xml> </xml>
</noscript> </noscript>
<![endif]--> <![endif]-->
<link rel="preconnect" href="https://fonts.gstatic.com" /> <link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="shortcut icon" href="favicon.ico" /> <link rel="shortcut icon" href="favicon.ico"/>
<link <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet">
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
rel="stylesheet"
/>
<style> <style>
body, table, td, div, h1, p {
table, font-family: 'Roboto', sans-serif;
td,
div,
p,
h1 {
font-family: "Roboto", sans-serif;
}
body {
margin: 0;
padding: 0;
background-color: #e1e4e8; /* Outer background color */
}
.email-wrapper {
padding: 20px;
background-color: #e1e4e8; /* Outer background color */
}
.email-container {
width: 100%;
max-width: 600px;
margin: 0 auto;
background-color: #eff7ff; /* Outer box background color */
border-radius: 8px;
overflow: hidden;
}
.email-header,
.email-footer {
padding: 40px 0;
text-align: center;
color: #ffffff;
}
.email-header img {
width: 150px;
height: auto;
margin-bottom: 20px;
}
.email-header h1 {
margin: 0;
font-size: 24px;
font-weight: 500;
}
.inner-container {
background-color: #ffffff; /* Inner box background color */
border-radius: 8px;
margin: 0 20px;
}
.inner-container .email-body {
padding: 36px 30px;
}
.inner-container .email-body h2 {
margin-bottom: 24px;
font-size: 24px;
color: black;
font-weight: 500;
}
.inner-container .email-body p {
margin-bottom: 16px;
font-size: 16px;
line-height: 24px;
color: #555555;
}
.email-footer {
padding: 20px 30px;
text-align: center;
color: #ffffff;
}
.email-footer p {
margin: 0;
font-size: 14px;
line-height: 20px;
}
.button {
display: inline-block;
padding: 12px 24px;
margin: 20px 0;
font-size: 16px;
color: #ffffff;
background-color: #ff7350;
text-decoration: none;
border-radius: 5px;
font-weight: 500;
}
@media only screen and (max-width: 600px) {
.inner-container .email-body,
.email-footer {
padding: 20px !important;
} }
}
</style> </style>
</head> </head>
<body> <body style="margin:0;padding:0;">
<div class="email-wrapper"> <table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;background:#ffffff;">
<table role="presentation" class="email-container"> <tr>
<tr> <td align="center" style="padding:0;">
<td> <table role="presentation"
<div class="email-header"> style="width:602px;border-collapse:collapse;border:1px solid #334878;border-spacing:0;text-align:left;">
<img <tr>
src="https://cdc.iitdh.ac.in/storage/Images/CDC-Logo.png" <td align="center" style="padding:40px 0 30px 0;background:#334878;">
alt="CDC Logo" <img src="https://drive.google.com/uc?id=1QTA6dB7jnsZfU1kzyUqfD_2V5xODpWFt" alt="" width="200"
style="width: 35%; height: auto; display: block; margin: 0 auto" style="height:auto;display:block;"/>
/> </td>
</div> </tr>
<div class="inner-container"> <tr>
<div class="email-body"> <td style="padding:36px 30px 42px 30px;">
<img <table role="presentation"
src="https://cdc.iitdh.ac.in/storage/Images/Rejected.png" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
alt="rejection Logo" <tr>
style=" <td style="padding:0 0 36px 0;color:#153643;">
width: 30%; <h1 style="font-size:24px;margin:0 0 20px 0;font-family: 'Roboto', sans-serif;
height: auto; ">Hey, {{ student_name }}</h1>
display: block; <p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
margin: 0 auto; We regret to inform you that you have not been selected for
" <b>{{ designation }}</b> role at <b>{{ company_name }}</b>.
/> CDC will keep bringing more such opportunities for you in the future.
<h2 style="text-align: center">Hey, {{ student_name }}</h2> </td>
<p style="text-align: center"> </tr>
We regret to inform you that you have not been selected for <tr>
<b>{{ designation }}</b> role at <b>{{ company_name }}</b>. <td style="padding:0;">
CDC will keep bringing more such opportunities for you in the <table role="presentation"
future. style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
</p> <tr>
</div> <td style="width:260px;padding:0;vertical-align:top;color:#334878;">
</div> </td>
<div class="email-footer"> </tr>
<p style="margin-bottom: 16px; color: #555555">Follow us on:</p> </table>
</td>
<a </tr>
href="https://twitter.com/cdc_iitdh" </table>
style="margin-right: 10px; color: #eff7ff" </td>
> </tr>
<img <tr>
src="https://cdc.iitdh.ac.in/storage/Images/twitter.png" <td style="padding:30px;background:#334878;">
alt="Twitter" <table role="presentation"
style="width: 24px; height: 24px" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;font-size:9px;font-family: 'Roboto', sans-serif;">
/> <tr>
</a> <td style="padding:0;width:50%;" align="left">
<a <p style="margin:0;font-size:14px;line-height:16px;font-family: 'Roboto', sans-serif;color:#ffffff;">
href="https://www.instagram.com/cdc.iitdh/?hl=en" &reg; CDC,IIT Dharwad,2021<br/>
style="margin-right: 10px; color: #eff7ff" </p>
> </td>
<img </tr>
src="https://cdc.iitdh.ac.in/storage/Images/Instagram_icon.png" </table>
alt="Instagram" </td>
style="width: 24px; height: 24px" </td>
/> </tr>
</a> </table>
<a </td>
href="https://www.linkedin.com/company/cdciitdharwad/?originalSubdomain=in" </tr>
> </table>
<img </body>
src="https://cdc.iitdh.ac.in/storage/Images/LinkedIn_logo_initials.png"
alt="LinkedIn"
style="width: 24px; height: 24px"
/>
</a>
<p style="color: #555555">
copy right &copy; 2024 CDC, all rights reserved
</p>
</div>
</td>
</tr>
</table>
</div>
</body>
</html> </html>

View File

@ -1,186 +1,85 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="x-apple-disable-message-reformatting" /> <meta name="x-apple-disable-message-reformatting">
<title></title> <title></title>
<!--[if mso]> <!--[if mso]>
<noscript> <noscript>
<xml> <xml>
<o:OfficeDocumentSettings> <o:OfficeDocumentSettings>
<o:PixelsPerInch>96</o:PixelsPerInch> <o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings> </o:OfficeDocumentSettings>
</xml> </xml>
</noscript> </noscript>
<![endif]--> <![endif]-->
<link rel="preconnect" href="https://fonts.gstatic.com" /> <link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="shortcut icon" href="favicon.ico" /> <link rel="shortcut icon" href="favicon.ico"/>
<link <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet">
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
rel="stylesheet"
/>
<style> <style>
body, table, td, div, h1, p {
table, font-family: 'Roboto', sans-serif;
td,
div,
p,
h1 {
font-family: "Roboto", sans-serif;
}
body {
margin: 0;
padding: 0;
background-color: #e1e4e8; /* Outer background color */
}
.email-wrapper {
padding: 20px;
background-color: #e1e4e8; /* Outer background color */
}
.email-container {
width: 100%;
max-width: 600px;
margin: 0 auto;
background-color: #eff7ff; /* Outer box background color */
border-radius: 8px;
overflow: hidden;
}
.email-header,
.email-footer {
padding: 40px 0;
text-align: center;
color: #ffffff;
}
.email-header img {
width: 150px;
height: auto;
margin-bottom: 20px;
}
.email-header h1 {
margin: 0;
font-size: 24px;
font-weight: 500;
}
.inner-container {
background-color: #ffffff; /* Inner box background color */
border-radius: 8px;
margin: 0 20px;
}
.inner-container .email-body {
padding: 36px 30px;
}
.inner-container .email-body h2 {
margin-bottom: 24px;
font-size: 24px;
color: black;
font-weight: 500;
}
.inner-container .email-body p {
margin-bottom: 16px;
font-size: 16px;
line-height: 24px;
color: #555555;
}
.email-footer {
padding: 20px 30px;
text-align: center;
color: #ffffff;
}
.email-footer p {
margin: 0;
font-size: 14px;
line-height: 20px;
}
.button {
display: inline-block;
padding: 12px 24px;
margin: 20px 0;
font-size: 16px;
color: #ffffff;
background-color: #ff7350;
text-decoration: none;
border-radius: 5px;
font-weight: 500;
}
@media only screen and (max-width: 600px) {
.inner-container .email-body,
.email-footer {
padding: 20px !important;
} }
}
</style> </style>
</head> </head>
<body> <body style="margin:0;padding:0;">
<div class="email-wrapper"> <table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;background:#ffffff;">
<table role="presentation" class="email-container"> <tr>
<tr> <td align="center" style="padding:0;">
<td> <table role="presentation"
<div class="email-header"> style="width:602px;border-collapse:collapse;border:1px solid #334878;border-spacing:0;text-align:left;">
<img <tr>
src="https://cdc.iitdh.ac.in/storage/Images/CDC-Logo.png" <td align="center" style="padding:40px 0 30px 0;background:#334878;">
alt="CDC Logo" <img src="https://drive.google.com/uc?id=1QTA6dB7jnsZfU1kzyUqfD_2V5xODpWFt" alt="" width="200"
style="width: 35%; height: auto; display: block; margin: 0 auto" style="height:auto;display:block;"/>
/> </td>
</div> </tr>
<div class="inner-container"> <tr>
<div class="email-body"> <td style="padding:36px 30px 42px 30px;">
<img <table role="presentation"
src="https://cdc.iitdh.ac.in/storage/Images/Confirmed.png" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
alt="approved Logo" <tr>
style=" <td style="padding:0 0 36px 0;color:#153643;">
width: 30%; <h1 style="font-size:24px;margin:0 0 20px 0;font-family: 'Roboto', sans-serif;
height: auto; ">Hey, {{ student_name }}</h1>
display: block; <p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
margin: 0 auto; Congratulations, You have been selected for the <b>{{ designation }}</b> at
" <b>{{ company_name }}</b>.<br>
/> </td>
<h2 style="text-align: center">Hey, {{ student_name }}</h2> </tr>
<p style="text-align: center"> <tr>
Congratulations, You have been selected for the <td style="padding:0;">
<b>{{ designation }}</b> at <b>{{ company_name }}</b>.<br /> <table role="presentation"
</p> style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
</div> <tr>
</div> <td style="width:260px;padding:0;vertical-align:top;color:#334878;">
<div class="email-footer"> </td>
<p style="margin-bottom: 16px; color: #555555">Follow us on:</p> </tr>
</table>
<a </td>
href="https://twitter.com/cdc_iitdh" </tr>
style="margin-right: 10px; color: #eff7ff" </table>
> </td>
<img </tr>
src="https://cdc.iitdh.ac.in/storage/Images/twitter.png" <tr>
alt="Twitter" <td style="padding:30px;background:#334878;">
style="width: 24px; height: 24px" <table role="presentation"
/> style="width:100%;border-collapse:collapse;border:0;border-spacing:0;font-size:9px;font-family: 'Roboto', sans-serif;">
</a> <tr>
<a <td style="padding:0;width:50%;" align="left">
href="https://www.instagram.com/cdc.iitdh/?hl=en" <p style="margin:0;font-size:14px;line-height:16px;font-family: 'Roboto', sans-serif;color:#ffffff;">
style="margin-right: 10px; color: #eff7ff" &reg; CDC,IIT Dharwad,2021<br/>
> </p>
<img </td>
src="https://cdc.iitdh.ac.in/storage/Images/Instagram_icon.png" </tr>
alt="Instagram" </table>
style="width: 24px; height: 24px" </td>
/> </td>
</a> </tr>
<a </table>
href="https://www.linkedin.com/company/cdciitdharwad/?originalSubdomain=in" </td>
> </tr>
<img </table>
src="https://cdc.iitdh.ac.in/storage/Images/LinkedIn_logo_initials.png" </body>
alt="LinkedIn"
style="width: 24px; height: 24px"
/>
</a>
<p style="color: #555555">
copy right &copy; 2024 CDC, all rights reserved
</p>
</div>
</td>
</tr>
</table>
</div>
</body>
</html> </html>

View File

@ -1,204 +1,118 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="x-apple-disable-message-reformatting" /> <meta name="x-apple-disable-message-reformatting">
<title></title> <title></title>
<!--[if mso]> <!--[if mso]>
<noscript> <noscript>
<xml> <xml>
<o:OfficeDocumentSettings> <o:OfficeDocumentSettings>
<o:PixelsPerInch>96</o:PixelsPerInch> <o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings> </o:OfficeDocumentSettings>
</xml> </xml>
</noscript> </noscript>
<![endif]--> <![endif]-->
<link rel="preconnect" href="https://fonts.gstatic.com" /> <link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="shortcut icon" href="favicon.ico" /> <link rel="shortcut icon" href="favicon.ico"/>
<link <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet">
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
rel="stylesheet"
/>
<style> <style>
body, table, td, div, h1, p {
table, font-family: 'Roboto', sans-serif;
td,
div,
p,
h1 {
font-family: "Roboto", sans-serif;
}
body {
margin: 0;
padding: 0;
background-color: #e1e4e8; /* Outer background color */
}
.email-wrapper {
padding: 20px;
background-color: #e1e4e8; /* Outer background color */
}
.email-container {
width: 100%;
max-width: 600px;
margin: 0 auto;
background-color: #eff7ff; /* Outer box background color */
border-radius: 8px;
overflow: hidden;
}
.email-header,
.email-footer {
padding: 40px 0;
text-align: center;
color: #ffffff;
}
.email-header img {
width: 150px;
height: auto;
margin-bottom: 20px;
}
.email-header h1 {
margin: 0;
font-size: 24px;
font-weight: 500;
}
.inner-container {
background-color: #ffffff; /* Inner box background color */
border-radius: 8px;
margin: 0 20px;
}
.inner-container .email-body {
padding: 36px 30px;
}
.inner-container .email-body h2 {
margin-bottom: 24px;
font-size: 24px;
color: black;
font-weight: 500;
}
.inner-container .email-body p {
margin-bottom: 16px;
font-size: 16px;
line-height: 24px;
color: #555555;
}
.email-footer {
padding: 20px 30px;
text-align: center;
color: #ffffff;
}
.email-footer p {
margin: 0;
font-size: 14px;
line-height: 20px;
}
.button {
display: inline-block;
padding: 12px 24px;
margin: 20px 0;
font-size: 16px;
color: #ffffff;
background-color: #ff7350;
text-decoration: none;
border-radius: 5px;
font-weight: 500;
}
@media only screen and (max-width: 600px) {
.inner-container .email-body,
.email-footer {
padding: 20px !important;
} }
}
</style> </style>
</head> </head>
<body> <body style="margin:0;padding:0;">
<div class="email-wrapper"> <table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;background:#ffffff;">
<table role="presentation" class="email-container"> <tr>
<tr> <td align="center" style="padding:0;">
<td> <table role="presentation"
<div class="email-header"> style="width:602px;border-collapse:collapse;border:1px solid #334878;border-spacing:0;text-align:left;">
<img <tr>
src="https://cdc.iitdh.ac.in/storage/Images/CDC-Logo.png" <td align="center" style="padding:40px 0 30px 0;background:#334878;">
alt="CDC Logo" <img src="https://drive.google.com/uc?id=1QTA6dB7jnsZfU1kzyUqfD_2V5xODpWFt" alt="" width="200"
style="width: 35%; height: auto; display: block; margin: 0 auto" style="height:auto;display:block;"/>
/> </td>
</div> </tr>
<div class="inner-container"> <tr>
<div class="email-body"> <td style="padding:36px 30px 42px 30px;">
<img <table role="presentation"
src="https://cdc.iitdh.ac.in/storage/Images/message.png" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
alt="verify Logo" <tr>
style=" <td style="padding:0 0 36px 0;color:#153643;">
width: 35%; <h1 style="font-size:24px;margin:0 0 20px 0;font-family: 'Roboto', sans-serif;
height: auto; ">Hello, {{ name }}</h1>
display: block; <p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
margin: 0 auto; We have received your application for a <b>{{ application_type }}</b> offer at
" <b>
/> {{ company_name }}</b>.
<h2 style="text-align: center">Hello, {{ name }}</h2> {% if additional_info_items %}
<p style="text-align: center"> We received these additional details
We have received your application for a <br>
<b>{{ application_type }}</b> offer at <p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family:
<b> {{ company_name }}</b>. {% if additional_info_items %} We 'Roboto', sans-serif;text-align: center">
received these additional details
<br />
<!-- <table style="border:solid 1px; margin: auto; text-align: center;width: 80%; <table style="border:solid 1px; margin: auto; text-align: center;width: 80%;
border-radius:15px; background-color: #e0e3ee"> --> border-radius:15px; background-color: #e0e3ee">
{% for i,j in additional_info.items %} {% for i,j in additional_info.items %}
<!-- <tr> --> <tr>
<!-- <td style="padding:8px 10px;color:#153643; ">{{ i }}:</td> --> <td style="padding:8px 10px;color:#153643; ">{{ i }}:</td>
<!-- <td style="padding:8px 10px;color:#153643;">{{ j }}</td> --> <td style="padding:8px 10px;color:#153643;">{{ j }}</td>
<!-- </tr> --> </tr>
{% endfor %} {% endfor %}
<!-- </table> --> </table>
{% endif %} We will keep you informed with the updates. If you {% endif %}
have any queries, please feel to write to
<nobr><u>cdc.support@iitdh.ac.in</u></nobr>
</p>
</div>
</div>
<div class="email-footer">
<p style="margin-bottom: 16px; color: #555555">Follow us on:</p>
<a </p>
href="https://twitter.com/cdc_iitdh" </p>
style="margin-right: 10px; color: #eff7ff" <p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
> We will keep you informed with the updates. If you have any queries, please
<img feel to
src="https://cdc.iitdh.ac.in/storage/Images/twitter.png" write to
alt="Twitter" <nobr><u>cdc.support@iitdh.ac.in</u></nobr>
style="width: 24px; height: 24px" </p>
/> </td>
</a> </tr>
<a <tr>
href="https://www.instagram.com/cdc.iitdh/?hl=en" <td style="padding:0;">
style="margin-right: 10px; color: #eff7ff" <table role="presentation"
> style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
<img <tr>
src="https://cdc.iitdh.ac.in/storage/Images/Instagram_icon.png" <td style="width:260px;padding:0;vertical-align:top;color:#334878;">
alt="Instagram"
style="width: 24px; height: 24px"
/> </td>
</a> </tr>
<a </table>
href="https://www.linkedin.com/company/cdciitdharwad/?originalSubdomain=in" </td>
> </tr>
<img </table>
src="https://cdc.iitdh.ac.in/storage/Images/LinkedIn_logo_initials.png" </td>
alt="LinkedIn" </tr>
style="width: 24px; height: 24px" <tr>
/> <td style="padding:30px;background:#334878;">
</a> <table role="presentation"
<p style="color: #555555"> style="width:100%;border-collapse:collapse;border:0;border-spacing:0;font-size:9px;font-family: 'Roboto', sans-serif;">
copy right &copy; 2024 CDC, all rights reserved <tr>
</p> <td style="padding:0;width:50%;" align="left">
</div> <p style="margin:0;font-size:14px;line-height:16px;font-family: 'Roboto', sans-serif;color:#ffffff;">
</td> &reg; CDC,IIT Dharwad,2021<br/>
</tr> </p>
</table> </td>
</div>
</body>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html> </html>

View File

@ -1,212 +1,124 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="x-apple-disable-message-reformatting" /> <meta name="x-apple-disable-message-reformatting">
<title></title> <title></title>
<!--[if mso]> <!--[if mso]>
<noscript> <noscript>
<xml> <xml>
<o:OfficeDocumentSettings> <o:OfficeDocumentSettings>
<o:PixelsPerInch>96</o:PixelsPerInch> <o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings> </o:OfficeDocumentSettings>
</xml> </xml>
</noscript> </noscript>
<![endif]--> <![endif]-->
<link rel="preconnect" href="https://fonts.gstatic.com" /> <link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="shortcut icon" href="favicon.ico" /> <link rel="shortcut icon" href="favicon.ico"/>
<link <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet">
href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
rel="stylesheet"
/>
<style> <style>
body, table, td, div, h1, p {
table, font-family: 'Roboto', sans-serif;
td,
div,
p,
h1 {
font-family: "Roboto", sans-serif;
}
body {
margin: 0;
padding: 0;
background-color: #e1e4e8; /* Outer background color */
}
.email-wrapper {
padding: 20px;
background-color: #e1e4e8; /* Outer background color */
}
.email-container {
width: 100%;
max-width: 600px;
margin: 0 auto;
background-color: #eff7ff; /* Outer box background color */
border-radius: 8px;
overflow: hidden;
}
.email-header,
.email-footer {
padding: 40px 0;
text-align: center;
color: #ffffff;
}
.email-header img {
width: 150px;
height: auto;
margin-bottom: 20px;
}
.email-header h1 {
margin: 0;
font-size: 24px;
font-weight: 500;
}
.inner-container {
background-color: #ffffff; /* Inner box background color */
border-radius: 8px;
margin: 0 20px;
}
.inner-container .email-body {
padding: 36px 30px;
}
.inner-container .email-body h2 {
margin-bottom: 24px;
font-size: 24px;
color: black;
font-weight: 500;
}
.inner-container .email-body p {
margin-bottom: 16px;
font-size: 16px;
line-height: 24px;
color: #555555;
}
.email-footer {
padding: 20px 30px;
text-align: center;
color: #ffffff;
}
.email-footer p {
margin: 0;
font-size: 14px;
line-height: 20px;
}
.button {
display: inline-block;
padding: 12px 24px;
margin: 20px 0;
font-size: 16px;
color: #ffffff;
background-color: #ff7350;
text-decoration: none;
border-radius: 5px;
font-weight: 500;
}
@media only screen and (max-width: 600px) {
.inner-container .email-body,
.email-footer {
padding: 20px !important;
} }
}
</style> </style>
</head> </head>
<body> <body style="margin:0;padding:0;">
<div class="email-wrapper"> <table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;background:#ffffff;">
<table role="presentation" class="email-container"> <tr>
<tr> <td align="center" style="padding:0;">
<td> <table role="presentation"
<div class="email-header"> style="width:602px;border-collapse:collapse;border:1px solid #334878;border-spacing:0;text-align:left;">
<img <tr>
src="https://cdc.iitdh.ac.in/storage/Images/CDC-Logo.png" <td align="center" style="padding:40px 0 30px 0;background:#334878;">
alt="CDC Logo" <img src="https://drive.google.com/uc?id=1QTA6dB7jnsZfU1kzyUqfD_2V5xODpWFt" alt="" width="200"
style="width: 35%; height: auto; display: block; margin: 0 auto" style="height:auto;display:block;"/>
/> </td>
</div> </tr>
<div class="inner-container"> <tr>
<div class="email-body"> <td style="padding:36px 30px 42px 30px;">
<img <table role="presentation"
src="https://cdc.iitdh.ac.in/storage/Images/mobile.png" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
alt="verify Logo" <tr>
style=" <td style="padding:0 0 36px 0;color:#153643;">
width: 35%; <h1 style="font-size:24px;margin:0 0 20px 0;font-family: 'Roboto', sans-serif;
height: auto; ">Hello, {{ name }}</h1>
display: block; <p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
margin: 0 auto; We have received some update in your application for a <b>{{ application_type }}</b> offer at
" <b>
/> {{ company_name }}</b>.
<h2 style="text-align: center">Hello, {{ name }}</h2> <table style="border:solid 1px; margin: auto; text-align: center;width: 80%;
<p style="text-align: center"> border-radius:15px; background-color: #e0e3ee">
We have received some update in your application for a <tr>
<b>{{ application_type }}</b> offer at <td style="padding:8px 10px;color:#153643; "> resume:</td>
<b> {{ company_name }}</b>. <td style="padding:8px 10px;color:#153643;">{{ resume }}</td>
<!-- <table style="border:solid 1px; margin: auto; text-align: center;width: 80%; </tr>
border-radius:15px; background-color: #e0e3ee"> </table>
<tr>
<td style="padding:8px 10px;color:#153643; "> resume:</td>
<td style="padding:8px 10px;color:#153643;">{{ resume }}</td>
</tr>
</table>
-->
<!-- {% if additional_info_items %} -->
<!-- We received these additional details -->
<!-- <br> -->
<!-- <p style="text-align: center;"> -->
<!-- {% for i,j in additional_info_items.items %} -->
<!-- <tr> {% if additional_info_items %}
<td style="padding:8px 10px;color:#153643; ">{{ i }}:</td> We received these additional details
<td style="padding:8px 10px;color:#153643;">{{ j }}</td> <br>
</tr> --> <table style="border:solid 1px; margin: auto; text-align: center;width: 80%;
<!-- {% endfor %} --> border-radius:15px; background-color: #e0e3ee">
<!-- </table> --> <p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family:
<!-- {% endif %} --> 'Roboto', sans-serif;text-align: center">
{% for i,j in additional_info_items.items %}
We will keep you informed with the updates. If you have any <tr>
queries, please feel to write to <td style="padding:8px 10px;color:#153643; ">{{ i }}:</td>
<nobr><u>cdc.support@iitdh.ac.in</u></nobr> <td style="padding:8px 10px;color:#153643;">{{ j }}</td>
</p> </tr>
</div> {% endfor %}
</div> </table>
<div class="email-footer"> {% endif %}
<p style="margin-bottom: 16px; color: #555555">Follow us on:</p>
<a </p>
href="https://twitter.com/cdc_iitdh" </p>
style="margin-right: 10px; color: #eff7ff" <p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
> We will keep you informed with the updates. If you have any queries, please
<img feel to
src="https://cdc.iitdh.ac.in/storage/Images/twitter.png" write to
alt="Twitter" <nobr><u>cdc.support@iitdh.ac.in</u></nobr>
style="width: 24px; height: 24px" </p>
/> </td>
</a> </tr>
<a <tr>
href="https://www.instagram.com/cdc.iitdh/?hl=en" <td style="padding:0;">
style="margin-right: 10px; color: #eff7ff" <table role="presentation"
> style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
<img <tr>
src="https://cdc.iitdh.ac.in/storage/Images/Instagram_icon.png" <td style="width:260px;padding:0;vertical-align:top;color:#334878;">
alt="Instagram"
style="width: 24px; height: 24px"
/> </td>
</a> </tr>
<a </table>
href="https://www.linkedin.com/company/cdciitdharwad/?originalSubdomain=in" </td>
> </tr>
<img </table>
src="https://cdc.iitdh.ac.in/storage/Images/LinkedIn_logo_initials.png" </td>
alt="LinkedIn" </tr>
style="width: 24px; height: 24px" <tr>
/> <td style="padding:30px;background:#334878;">
</a> <table role="presentation"
<p style="color: #555555"> style="width:100%;border-collapse:collapse;border:0;border-spacing:0;font-size:9px;font-family: 'Roboto', sans-serif;">
copy right &copy; 2024 CDC, all rights reserved <tr>
</p> <td style="padding:0;width:50%;" align="left">
</div> <p style="margin:0;font-size:14px;line-height:16px;font-family: 'Roboto', sans-serif;color:#ffffff;">
</td> &reg; CDC,IIT Dharwad,2021<br/>
</tr> </p>
</table> </td>
</div>
</body>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html> </html>

View File

@ -18,145 +18,101 @@
<link rel="shortcut icon" href="favicon.ico"/> <link rel="shortcut icon" href="favicon.ico"/>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet">
<style> <style>
body, table, td, div, p, h1 { table, td, div, h1, p {
font-family: 'Roboto', sans-serif; font-family: 'Roboto', sans-serif;
} }
body {
margin: 0;
padding: 0;
background-color: #e1e4e8; /* Outer background color */
}
.email-wrapper {
padding: 20px;
background-color: #e1e4e8; /* Outer background color */
}
.email-container {
width: 100%;
max-width: 600px;
margin: 0 auto;
background-color: #eff7ff; /* Outer box background color */
border-radius: 8px;
overflow: hidden;
}
.email-header, .email-footer {
padding: 40px 0;
text-align: center;
color: #ffffff;
}
.email-header img {
width: 150px;
height: auto;
margin-bottom: 20px;
}
.email-header h1 {
margin: 0;
font-size: 24px;
font-weight: 500;
}
.inner-container {
background-color: #ffffff; /* Inner box background color */
border-radius: 8px;
margin: 0 20px;
}
.inner-container .email-body {
padding: 36px 30px;
}
.inner-container .email-body h2 {
margin-bottom: 24px;
font-size: 24px;
color: black;
font-weight: 500;
}
.inner-container .email-body p {
margin-bottom: 16px;
font-size: 16px;
line-height: 24px;
color: #555555;
}
.email-footer {
padding: 20px 30px;
text-align: center;
color: #ffffff;
}
.email-footer p {
margin: 0;
font-size: 14px;
line-height: 20px;
}
.button {
display: inline-block;
padding: 12px 24px;
margin: 20px 0;
font-size: 16px;
color: #ffffff;
background-color: #ff7350;
text-decoration: none;
border-radius: 5px;
font-weight: 500;
}
@media only screen and (max-width: 600px) {
.inner-container .email-body, .email-footer {
padding: 20px !important;
}
}
</style> </style>
</head> </head>
<body> <body style="margin:0;padding:0;">
<div class="email-wrapper"> <table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;background:#ffffff;">
<table role="presentation" class="email-container">
<tr> <tr>
<td > <td align="center" style="padding:0;">
<div class="email-header"> <table role="presentation"
<img src="https://cdc.iitdh.ac.in/storage/Images/CDC-Logo.png" alt="CDC Logo" style="width: 35%; height: auto; display: block; margin: 0 auto;" /> style="width:602px;border-collapse:collapse;border:1px solid #334878;border-spacing:0;text-align:left;">
</div> <tr>
<div class="inner-container"> <td align="center" style="padding:40px 0 30px 0;background:#334878;">
<div class="email-body"> <img src="https://drive.google.com/uc?id=1QTA6dB7jnsZfU1kzyUqfD_2V5xODpWFt" alt="" width="200"
<img src="https://cdc.iitdh.ac.in/storage/Images/tracking.png" alt="verify Logo" style="width: 35%; height: auto; display: block; margin: 0 auto;" /> style="height:auto;display:block;"/>
<h2 style="text-align: center;" </td>
>Hello, {{ name }}</h1> </tr>
<p style="text-align:center;"> <tr>
We have received your issue regarding a <b>{{ application_type }}</b> opening at <td style="padding:36px 30px 42px 30px;">
<b> <table role="presentation"
{{ company_name }}</b>. style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
{% if additional_info %} <tr>
We received these additional details <td style="padding:0 0 36px 0;color:#153643;">
<br> <h1 style="font-size:24px;margin:0 0 20px 0;font-family: 'Roboto', sans-serif;
">Hello, {{ name }}</h1>
<p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
We have received your issue regarding a <b>{{ application_type }}</b> opening at
<b>
{{ company_name }}</b>.
{% if additional_info %}
We received these additional details
<br>
<p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family:
'Roboto', sans-serif;text-align: center">
<!-- <table style="border:solid 1px; margin: auto; text-align: center;width: 80%; <table style="border:solid 1px; margin: auto; text-align: center;width: 80%;
border-radius:15px; background-color: #e0e3ee"> --> border-radius:15px; background-color: #e0e3ee">
{% for i,j in additional_info.items %} {% for i,j in additional_info.items %}
<!-- <tr> <tr>
<td style="padding:8px 10px;color:#153643; ">{{ i }}:</td> <td style="padding:8px 10px;color:#153643; ">{{ i }}:</td>
<td style="padding:8px 10px;color:#153643;">{{ j }}</td> <td style="padding:8px 10px;color:#153643;">{{ j }}</td>
</tr> --> </tr>
{% endfor %} {% endfor %}
<!-- </table> --> </table>
{% endif %} {% endif %}
We will get back to you if we find it legitimate. If you have any queries, please
feel to
write to
<nobr><u>cdc.support@iitdh.ac.in</u></nobr>
</p></div></div>
<div class="email-footer">
<p style="margin-bottom: 16px; color: #555555;">Follow us on:</p>
<a href="https://twitter.com/cdc_iitdh" style="margin-right: 10px; color: #eff7ff"> </p>
<img src="https://cdc.iitdh.ac.in/storage/Images/twitter.png" alt="Twitter" style="width: 24px; height: 24px;"> </p>
</a> <p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
<a href="https://www.instagram.com/cdc.iitdh/?hl=en" style="margin-right: 10px; color: #eff7ff;"> We will get back to you if we find it legitimate. If you have any queries, please
<img src="https://cdc.iitdh.ac.in/storage/Images/Instagram_icon.png" alt="Instagram" style="width: 24px; height: 24px;"> feel to
</a> write to
<a href="https://www.linkedin.com/company/cdciitdharwad/?originalSubdomain=in"> <nobr><u>cdc.support@iitdh.ac.in</u></nobr>
<img src="https://cdc.iitdh.ac.in/storage/Images/LinkedIn_logo_initials.png" alt="LinkedIn" style="width: 24px; height: 24px;"> </p>
</a> </td>
<p style="color: #555555;">copy right &copy; 2024 CDC, all rights reserved</p> </tr>
<tr>
<td style="padding:0;">
<table role="presentation"
style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
<tr>
<td style="width:260px;padding:0;vertical-align:top;color:#334878;">
</div>
</td>
</tr>
</table>
</td> </td>
</tr> </tr>
</table> </table>
</div> </td>
</tr>
<tr>
<td style="padding:30px;background:#334878;">
<table role="presentation"
style="width:100%;border-collapse:collapse;border:0;border-spacing:0;font-size:9px;font-family: 'Roboto', sans-serif;">
<tr>
<td style="padding:0;width:50%;" align="left">
<p style="margin:0;font-size:14px;line-height:16px;font-family: 'Roboto', sans-serif;color:#ffffff;">
&reg; CDC,IIT Dharwad,2021<br/>
</p>
</td>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body> </body>
</html> </html>

View File

@ -18,128 +18,60 @@
<link rel="shortcut icon" href="favicon.ico"/> <link rel="shortcut icon" href="favicon.ico"/>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet">
<style> <style>
body, table, td, div, p, h1 { table, td, div, h1, p {
font-family: 'Roboto', sans-serif; font-family: 'Roboto', sans-serif;
} }
body {
margin: 0;
padding: 0;
background-color: #e1e4e8; /* Outer background color */
}
.email-wrapper {
padding: 20px;
background-color: #e1e4e8; /* Outer background color */
}
.email-container {
width: 100%;
max-width: 600px;
margin: 0 auto;
background-color: #eff7ff; /* Outer box background color */
border-radius: 8px;
overflow: hidden;
}
.email-header, .email-footer {
padding: 40px 0;
text-align: center;
color: #ffffff;
}
.email-header img {
width: 150px;
height: auto;
margin-bottom: 20px;
}
.email-header h1 {
margin: 0;
font-size: 24px;
font-weight: 500;
}
.inner-container {
background-color: #ffffff; /* Inner box background color */
border-radius: 8px;
margin: 0 20px;
}
.inner-container .email-body {
padding: 36px 30px;
}
.inner-container .email-body h4 {
margin-bottom: 24px;
font-size: 24px;
color: black;
font-weight: 500;
}
.inner-container .email-body p {
margin-bottom: 16px;
font-size: 16px;
line-height: 24px;
color: #555555;
}
.email-footer {
padding: 20px 30px;
text-align: center;
color: #ffffff;
}
.email-footer p {
margin: 0;
font-size: 14px;
line-height: 20px;
}
.button {
display: inline-block;
padding: 12px 24px;
margin: 20px 0;
font-size: 16px;
color: #ffffff;
background-color: #ff7350;
text-decoration: none;
border-radius: 5px;
font-weight: 500;
}
@media only screen and (max-width: 600px) {
.inner-container .email-body, .email-footer {
padding: 20px !important;
}
}
</style> </style>
</head> </head>
<body> <body style="margin:0;padding:0;">
<div class="email-wrapper"> <table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;background:#ffffff;">
<table role="presentation" class="email-container"> <tr>
<td align="center" style="padding:0;">
<table role="presentation"
style="width:602px;border-collapse:collapse;border:1px solid #334878;border-spacing:0;text-align:left;">
<tr> <tr>
<td> <td align="center" style="padding:40px 0 30px 0;background:#334878;">
<div class="email-header"> <img src="https://drive.google.com/uc?id=1QTA6dB7jnsZfU1kzyUqfD_2V5xODpWFt" alt="" width="200"
<img src="https://cdc.iitdh.ac.in/storage/Images/CDC-Logo.png" alt="CDC Logo" style="width: 35%; height: auto; display: block; margin: 0 auto;" /> style="height:auto;display:block;"/>
</div> </td>
<div class="inner-container"> </tr>
<div class="email-body"> <tr>
<img src="https://cdc.iitdh.ac.in/storage/Images/reminder.png" alt="verify Logo" style="width: 25%; height: auto; display: block; margin: 0 auto;" /> <td style="padding:36px 30px 42px 30px;">
<h4 style="text-align: center;">{{ opening_type }} Opportunity at {{ company_name }}</h3> <table role="presentation"
<p style="text-align: center;"> style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
<tr>
<td style="padding:0 0 36px 0;color:#153643;">
<h1 style="font-size:24px;margin:0 0 20px 0;font-family: 'Roboto', sans-serif;
">{{ opening_type }} Opportunity at {{ company_name }}</h1>
<p style="margin:0 0 12px 0;font-size:16px;line-height:24px;font-family: 'Roboto', sans-serif;">
Gentle reminder to fill out the application form. Gentle reminder to fill out the application form.
Interested students can apply before <b>{{ deadline }}</b> in the CDC-webportal</p> Interested students can apply before <b>{{ deadline }}</b> in the <a
<p style="text-align: center;"> <a href="{{ link }}">CDC-webportal</a>.
href="{{ link }}" style="display: inline-block; padding: 12px 24px; margin: 20px 0; font-size: 16px; color: #ffffff; background-color: #ff7350; text-decoration: none; border-radius: 50px; font-weight: 500;">CDC web portal</a>.
</p> </p>
</div></div> </td>
</tr>
<div class="email-footer">
<p style="margin-bottom: 16px; color: #555555;">Follow us on:</p>
<a href="https://twitter.com/cdc_iitdh" style="margin-right: 10px; color: #eff7ff">
<img src="https://cdc.iitdh.ac.in/storage/Images/twitter.png" alt="Twitter" style="width: 24px; height: 24px;">
</a>
<a href="https://www.instagram.com/cdc.iitdh/?hl=en" style="margin-right: 10px; color: #eff7ff;">
<img src="https://cdc.iitdh.ac.in/storage/Images/Instagram_icon.png" alt="Instagram" style="width: 24px; height: 24px;">
</a>
<a href="https://www.linkedin.com/company/cdciitdharwad/?originalSubdomain=in">
<img src="https://cdc.iitdh.ac.in/storage/Images/LinkedIn_logo_initials.png" alt="LinkedIn" style="width: 24px; height: 24px;">
</a>
<p style="color: #555555;">copy right &copy; 2024 CDC, all rights reserved</p>
</div>
</table>
</td>
</tr>
<tr>
<td style="padding:30px;background:#334878;">
<table role="presentation"
style="width:100%;border-collapse:collapse;border:0;border-spacing:0;font-size:9px;font-family: 'Roboto', sans-serif;">
<tr>
<td style="padding:0;width:50%;" align="left">
<p style="margin:0;font-size:14px;line-height:16px;font-family: 'Roboto', sans-serif;color:#ffffff;">
&reg; CDC,IIT Dharwad,2022<br/>
</p>
</td>
</tr>
</table>
</td> </td>
</tr> </tr>
</table> </table>
</div> </td>
</tr>
</table>
</body> </body>
</html> </html>

0
nginx.conf Normal file → Executable file
View File

View File

@ -1,4 +1,4 @@
asgiref>=3.5.2,<4 asgiref==3.5.0
astroid==2.11.2 astroid==2.11.2
cachetools==5.0.0 cachetools==5.0.0
certifi==2021.10.8 certifi==2021.10.8
@ -13,13 +13,11 @@ Django==3.2.18
django-background-tasks==1.2.5 django-background-tasks==1.2.5
django-compat==1.0.15 django-compat==1.0.15
django-cors-headers==3.11.0 django-cors-headers==3.11.0
django-crontab==0.7.1
django-db-logger==0.1.12 django-db-logger==0.1.12
django-extensions==3.2.1 django-extensions==3.2.1
django-import-export==2.8.0 django-import-export==2.8.0
django-simple-history==3.1.1 django-simple-history==3.1.1
djangorestframework==3.13.1 djangorestframework==3.13.1
daphne==4.1.0
et-xmlfile==1.1.0 et-xmlfile==1.1.0
google-auth==2.6.6 google-auth==2.6.6
gunicorn==20.1.0 gunicorn==20.1.0

2
setup.sh Normal file → Executable file
View File

@ -8,7 +8,7 @@ python3 manage.py migrate
echo "Migrations complete" echo "Migrations complete"
python3 manage.py collectstatic --noinput python3 manage.py collectstatic --noinput
python3 manage.py crontab add
DIR="./Storage" DIR="./Storage"
if [ -d "$DIR" ]; then if [ -d "$DIR" ]; then
### Take action if $DIR exists ### ### Take action if $DIR exists ###

View File

@ -1,7 +0,0 @@
#!/bin/bash
source /home/cdc/Desktop/CDC_Web_Portal_Backend/cdc-placement-website-backend/venv/bin/activate
cd /home/cdc/Desktop/CDC_Web_Portal_Backend/cdc-placement-website-backend/CDC_Backend
bash run_prod.sh

2
start_email_service.sh Normal file → Executable file
View File

@ -4,4 +4,4 @@ source /home/cdc/Desktop/CDC_Web_Portal_Backend/cdc-placement-website-backend/ve
cd /home/cdc/Desktop/CDC_Web_Portal_Backend/cdc-placement-website-backend/CDC_Backend cd /home/cdc/Desktop/CDC_Web_Portal_Backend/cdc-placement-website-backend/CDC_Backend
python3 manage.py process_tasks python manage.py process_tasks