Пример #1
0
def index():
    with db:
        jobs_count = Job.count()
        companies_count = Job.companies_count()
    return render_template('index.html',
                           jobs_count=jobs_count,
                           companies_count=companies_count,
                           stories=Story.listing())
Пример #2
0
def test_companies_count_takes_only_approved_jobs(db):
    create_job('1', company_link='https://abc.example.com', is_approved=True)
    create_job('2', company_link='https://abc.example.com', is_approved=False)
    create_job('3', company_link='https://xyz.example.com', is_approved=True)
    create_job('4', company_link='https://xyz.example.com', is_approved=False)
    create_job('5', company_link='https://def.example.com', is_approved=False)

    assert Job.companies_count() == 2
Пример #3
0
def candidate():
    with db:
        jobs_count = Job.count()
        companies_count = Job.companies_count()
    return render_template(
        'candidate.html',
        jobs_count=jobs_count,
        companies_count=companies_count,
        thumbnail=thumbnail(title='Příručka hledání první práce v\u00a0IT'))
Пример #4
0
def test_companies_count(db_connection):
    create_job('1', company_link='https://abc.example.com', approved_at=date(1987, 8, 30))
    create_job('2', company_link='https://abc.example.com', approved_at=None)
    create_job('3', company_link='https://xyz.example.com', approved_at=date(1987, 8, 30))
    create_job('4', company_link='https://xyz.example.com', approved_at=None)
    create_job('5', company_link='https://def.example.com', approved_at=None)
    create_job('6', company_link='https://def.example.com', approved_at=date(1987, 8, 30), expires_at=date(1987, 9, 1))

    assert Job.companies_count() == 2
Пример #5
0
def job(job_id):
    with db:
        job = Job.get_by_id(job_id) or abort(404)
        jobs_count = Job.count()
        companies_count = Job.companies_count()
    return render_template('job.html',
                           job=job,
                           jobs_count=jobs_count,
                           companies_count=companies_count,
                           thumbnail=thumbnail(job_title=job.title,
                                               job_company=job.company_name,
                                               job_location=job.location))
Пример #6
0
def jobs():
    with db:
        jobs = Job.listing()
        jobs_count = Job.count()
        companies_count = Job.companies_count()
        jobs_bot = Job.bot_listing()
    return render_template(
        'jobs.html',
        jobs=jobs,
        jobs_count=jobs_count,
        companies_count=companies_count,
        jobs_bot=jobs_bot,
        thumbnail=thumbnail(title='Práce v\u00a0IT pro začátečníky'))
Пример #7
0
def jobs():
    with db:
        jobs = Job.listing()
        jobs_count = Job.count()
        companies_count = Job.companies_count()
        jobs_bot = Job.bot_listing()
    return render_template(
        'jobs.html',
        jobs=jobs,
        jobs_count=jobs_count,
        companies_count=companies_count,
        jobs_bot=jobs_bot,
        thumbnail=thumbnail(title='Práce pro začínající programátory'))