def job_get_by_idx(job_idx):
 try:
  job = Job.objects.get(pk=job_idx)
  return job
 except Job.DoesNotExist:
  return None

def job_get_by_idx ( job_idx ) : try : job = Job . objects . get ( pk = job_idx ) return job except Job . DoesNotExist : return None
return a job based on its idx .