def combined_reviews(): pitchfork_reviews = PitchforkReviews.get_all_reviews() metacritic_reviews = MetacriticReviews.get_all_reviews() return render_template('combined reviews.html', title='Combined reviews', pitchfork=pitchfork_reviews, metacritic=metacritic_reviews)
def index(): # use d3.scale.quantile() # https://github.com/mbostock/d3/wiki/Quantitative-Scales#quantile reviewers, dict_reviewers = PitchforkReviews.get_reviewers_graph() json_reviewers = json.dumps(dict_reviewers) return render_template('index.html', title='Home', json_reviewers=json_reviewers, reviewers=dict_reviewers)
def pitchfork_search(): form = PitchforkSearch() if form.validate_on_submit(): reviews = PitchforkReviews.get_reviews_from_criteria(form) g.standalone = True # use this to skip the header for all reviews in the template return render_template('pitchfork.html', title='Search results', reviews=reviews) return render_template('pitchfork search.html', title='Search', form=form)
def pitchfork(): reviews = PitchforkReviews.get_all_reviews() return render_template('pitchfork.html', title='Pitchfork reviews', reviews=reviews)
def best_new_music(): reviews = PitchforkReviews.get_best_new_music() return render_template('best new music.html', title='Best New Music', reviews=reviews)
def get_reviewer_list(): reviewers, dict_reviewers = PitchforkReviews.get_reviewers_graph() json_reviewers = json.dumps(dict_reviewers) return jsonify(dict_reviewers)