當前位置: 首頁>>代碼示例>>Python>>正文


Python Job.industry方法代碼示例

本文整理匯總了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
開發者ID:codeforoakland,項目名稱:txt2wrk,代碼行數:53,代碼來源:backends.py


注:本文中的job.models.Job.industry方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。