# from django.db.models.signals import post_save
# from django.dispatch import receiver
# from . import models
#
# @receiver(post_save, sender=models.Candidate)
# def parse_resume(sender, instance, created, **kwargs):
#     if instance.resume and not instance.summary:
#         from .utils import extract_summary_from_pdf,match_resume_with_job_description
#         summary = extract_summary_from_pdf(instance.resume.path)
#         if 'error' not in summary:
#             instance.summary = summary
#             instance.save()
#
#         # match_resume_with_job_description