removing prints

This commit is contained in:
Gowtham Sai 2022-07-28 18:06:05 +05:30
parent 756dd5ae61
commit ce0f45d2bf
4 changed files with 0 additions and 28 deletions

View File

@ -114,7 +114,6 @@ def updateOfferAccepted(request, id, email, user_type):
opening.offer_accepted = True
opening.changed_by = get_object_or_404(User, id=id)
opening.save()
print('offer accepted sending email to students')
send_opening_notifications(opening.id)
return Response({'action': "Update Offer Accepted", 'message': "Offer Accepted Updated"},
status=status.HTTP_200_OK)
@ -350,7 +349,6 @@ def generateCSV(request, id, email, user_type):
status=status.HTTP_200_OK)
except:
logger.warning("Create csv: " + str(sys.exc_info()))
print(sys.exc_info())
return Response({'action': "Create csv", 'message': "Something Went Wrong"},
status=status.HTTP_400_BAD_REQUEST)
@ -381,7 +379,6 @@ def addPPO(request, id, email, user_type):
status=status.HTTP_200_OK)
except:
logger.warning("Add PPO: " + str(sys.exc_info()))
print(sys.exc_info())
return Response({'action': "Add PPO", 'message': "Something Went Wrong"},
status=status.HTTP_400_BAD_REQUEST)

View File

@ -278,9 +278,6 @@ def verifyEmail(request):
"opening_type": PLACEMENT,
"company_name": opening.company_name,
}
print(data)
print(attachment_jnf_respone)
json_data = json.dumps(data, default=str)
sendEmail(opening.email, COMPANY_OPENING_SUBMITTED_TEMPLATE_SUBJECT.format(id=opening.id), data,
COMPANY_OPENING_SUBMITTED_TEMPLATE, attachment_jnf_respone)

View File

@ -71,9 +71,7 @@ def getDashboard(request, id, email, user_type):
allowed_branch__contains=[studentDetails.branch],
deadline_datetime__gte=datetime.datetime.now(),
offer_accepted=True, email_verified=True).order_by('deadline_datetime')
print(placements)
filtered_placements = placement_eligibility_filters(studentDetails, placements)
print(filtered_placements)
placementsdata = PlacementSerializerForStudent(filtered_placements, many=True).data
@ -88,7 +86,6 @@ def getDashboard(request, id, email, user_type):
status=status.HTTP_404_NOT_FOUND)
except:
logger.warning("Get Dashboard -Student: " + str(sys.exc_info()))
print(sys.exc_info())
return Response({'action': "Get Dashboard - Student", 'message': "Something Went Wrong"},
status=status.HTTP_400_BAD_REQUEST)
@ -198,8 +195,6 @@ def submitApplication(request, id, email, user_type):
status=status.HTTP_404_NOT_FOUND)
except:
logger.warning("Submit Application: " + str(sys.exc_info()))
print(traceback.format_exc())
print(sys.exc_info())
return Response({'action': "Submit Application", 'message': "Something Went Wrong"},
status=status.HTTP_400_BAD_REQUEST)

View File

@ -77,7 +77,6 @@ def isAuthorized(allowed_users=None):
token_id = headers['HTTP_AUTHORIZATION'][7:]
idinfo = id_token.verify_oauth2_token(token_id, requests.Request(), CLIENT_ID)
email = idinfo[EMAIL]
print(email)
user = get_object_or_404(User, email=email)
if user:
user.last_login_time = timezone.now()
@ -160,7 +159,6 @@ def sendEmail(email_to, subject, data, template, attachment_jnf_response=None):
return True
except:
logger.error("Send Email: " + str(sys.exc_info()))
print(str(sys.exc_info()[1]))
return False
@ -175,12 +173,10 @@ def PlacementApplicationConditions(student, placement):
if len(selected_companies_PSU) > 0:
raise PermissionError('Selected for PSU Can\'t apply anymore')
print(placement, 'placement')
if placement.tier == 'psu':
return True, "Conditions Satisfied"
for i in selected_companies:
print(int(i.placement.tier) < int(placement.tier), int(i.placement.tier), int(placement.tier))
if int(i.placement.tier) < int(placement.tier):
return False, "Can't apply for this tier"
@ -189,9 +185,6 @@ def PlacementApplicationConditions(student, placement):
except PermissionError as e:
return False, e
except:
print(sys.exc_info())
print(traceback.format_exc())
logger.warning("Utils - PlacementApplicationConditions: " + str(sys.exc_info()))
return False, "_"
@ -229,7 +222,6 @@ def getTier(compensation_gross, is_psu=False):
logger.warning("Utils - getTier: " + str(sys.exc_info()))
return False, e
except:
print(sys.exc_info())
logger.warning("Utils - getTier: " + str(sys.exc_info()))
return False, "_"
@ -246,29 +238,21 @@ def generateOneTimeVerificationLink(email, opening_id, opening_type):
link = LINK_TO_EMAIl_VERIFICATION_API.format(token=token)
return True, link
except:
print(sys.exc_info())
logger.warning("Utils - generateOneTimeVerificationLink: " + str(sys.exc_info()))
return False, "_"
def verify_recaptcha(request):
try:
print(settings.RECAPTCHA_SECRET_KEY)
data = {
'secret': settings.RECAPTCHA_SECRET_KEY,
'response': request
}
print(data)
r = rq.post('https://www.google.com/recaptcha/api/siteverify', data=data)
result = r.json()
# logger.info("Recaptcha Response: " + str(result)+"request: "+str(data))
print(result, "Result")
return result['success']
except:
# get exception line number
print(sys.exc_info())
print(traceback.format_exc())
logger.warning("Utils - verify_recaptcha: " + str(sys.exc_info()))
return False, "_"
@ -293,7 +277,6 @@ def opening_description_table_html(opening):
new_key = new_key.capitalize()
newdetails[new_key] = details[key]
imagepath = os.path.abspath('./templates/image.png')
print(imagepath)
data = {
"data": newdetails,
"imgpath": imagepath