def nochill(): ''' Routes the nochill page which is displayed if temperature is higher than 15 degrees Shows the list of movies in nearby theaters return template html nochill ''' movies = api.showtimes(zipc) if genre != 'no': movies = api.filterGenre(movies, genre) if rating != 'no': movies = api.filterRating(movies, rating) return render_template("nochill.html", movies=movies, temp=temp)
def chill(): ''' Routes the chill page, which is displayed if temperature is lower than 15 celsius, also accounts for genre and rating Shows the list of movies available in amazon prime return template html chill ''' links = [] movies = api.amazon() if genre != 'no': movies = api.filterGenre(movies, genre) if rating != 'no': movies = api.filterRating(movies, rating) for movie in movies: links.append(api.amazonPurchase(movie['id'])) return render_template("chill.html", movies=movies, temp=temp, links=links)