当前位置: 首页>>代码示例>>Python>>正文


Python Job.workday方法代码示例

本文整理汇总了Python中job.models.Job.workday方法的典型用法代码示例。如果您正苦于以下问题:Python Job.workday方法的具体用法?Python Job.workday怎么用?Python Job.workday使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在job.models.Job的用法示例。


在下文中一共展示了Job.workday方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: run

# 需要导入模块: from job.models import Job [as 别名]
# 或者: from job.models.Job import workday [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
开发者ID:codeforoakland,项目名称:txt2wrk,代码行数:53,代码来源:backends.py


注:本文中的job.models.Job.workday方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。