Skip to content

Commit

Permalink
Update routes.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KKGanguly authored Nov 27, 2024
1 parent 3291641 commit ab6fb57
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,40 +139,6 @@ def job_recommendations():
return render_template('review-page.html', jobs=recommended_reviews)


# view all
@app.route('/pageContent')
def page_content():
"""An API for the user to view all the reviews entered"""
intialize_db()
entries = get_all_jobs()
dept_filter_entries = JOBS_DB.distinct("department")
location_filter_entries = JOBS_DB.distinct("locations")
# title_filter_entries = JOBS_DB.distinct("title")
company_filter_entries = JOBS_DB.distinct("company")

# pagination

# print(entries)
page, per_page, offset = get_page_args(
page_parameter="page", per_page_parameter="per_page")
total = len(entries)

if not page or not per_page:
offset = 0
per_page = 10
pagination_entries = entries[offset: offset + per_page]
else:
pagination_entries = entries[offset: offset + per_page]
# print("ELSE!!!")

pagination = Pagination(page=page, per_page=per_page,
total=total, css_framework='bootstrap4')

return render_template('page_content.html', entries=pagination_entries, page=page,
per_page=per_page, pagination=pagination,
dept_filter_entries=dept_filter_entries,
location_filter_entries=location_filter_entries,
company_filter_entries=company_filter_entries)
def getCurrentTime():
"""A method to get current time"""
return datetime.now().replace(microsecond=0).strftime("%Y-%m-%d %H:%M:%S")
Expand Down

0 comments on commit ab6fb57

Please sign in to comment.