本文整理汇总了Python中job.models.Job.industry方法的典型用法代码示例。如果您正苦于以下问题:Python Job.industry方法的具体用法?Python Job.industry怎么用?Python Job.industry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类job.models.Job
的用法示例。
在下文中一共展示了Job.industry方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run
# 需要导入模块: from job.models import Job [as 别名]
# 或者: from job.models.Job import industry [as 别名]
def run(self):
counter = 0
for job in self.jobs:
new_job = Job(
title=job.title,
description=job.description,
employer=self.profile,
availability=job.availability,
experience=job.experience,
education=job.education,
employment_type=job.employment_type,
overtime=job.overtime,
latitude=job.latitude,
longitude=job.longitude,
)
new_job.save()
new_job.workday = job.workday.all()
new_job.industry = job.industry.all()
new_job.save()
new_location = JobLocation(
business_name=job.location.business_name,
business_address1=job.location.business_address1,
business_address2=job.location.business_address2,
city=job.location.city,
zip_code=job.location.zip_code,
latitude=job.location.latitude,
longitude=job.location.longitude,
job=new_job,
)
new_location.save()
for existing_profile in self.profiles:
rec = JobRecommendation(
job=new_job,
applicant=existing_profile,
state=(JobRecommendation.NEW_REC_SENT if counter > 2 else JobRecommendation.APPLIED_REC),
)
rec.save()
if counter <= 2:
application = ApplicantJob(job=new_job, applicant=existing_profile, send_email=False)
application.save()
if existing_profile.id == 24 and job.id == 12:
application = ApplicantJob(job=new_job, applicant=existing_profile, send_email=False)
application.save()
counter = counter + 1
counter = 0