def show_movie(movie_id): """Show details on a particular movie.""" movie = crud.get_movie_by_id(movie_id) return render_template( 'movie_details.html', jinja_movie=movie) # we changed movies_jinja from movies (in solution)
def show_movie(movie_id): """Show detals on a particular movie""" movie = crud.get_movie_by_id(movie_id) movie_ratings = crud.get_average_rating(movie) return render_template('movie_details.html', movie=movie, movie_ratings=movie_ratings)
def movie_details(movie_id2): "Show Movie detail" movie_detail = crud.get_movie_by_id(movie_id2) # 'movie' on the left is the variable in the .html5 # This will be dynamically changed based on the movie_detail information returned # by the function get_movie_by_id in the crud file return render_template('movie_details.html', movie=movie_detail)
def process_rating(): user_id = session['user_id'] rating = request.args.get('rating') user = crud.get_user_by_id(session['user_id']) movie = crud.get_movie_by_id(session['movie_id']) #Have rating, need to use Session to track user and movie crud.create_rating(user, movie, rating) return redirect(f'/users/{user_id}')
def show_movie(movie_id): """Show details for a movie.""" # next_movie_id = movie_id + 1 #TypeError (str and int) # Below: SQLAlchemy equality is True movie = crud.get_movie_by_id(movie_id) # print("#" * 100) # print(movie.movie_id == movie_id) #Python is False return render_template("movie_details.html", movie=movie)
def movie(id): """View specific movie""" movie = crud.get_movie_by_id(id) return jsonify({ 'movie': { 'movie_id': movie.movie_id, 'title': movie.title, 'overview': movie.overview, 'release_date': movie.release_date, 'poster_path': movie.poster_path } })
def make_movie_rating(movie_id): """Create a new rating.""" movie = crud.get_movie_by_id(movie_id) user_s = session['user'] score = request.form['score'] new_rating = crud.create_rating(user_s, movie, score) print(new_rating) session['rating'] = new_rating return redirect('movie_details.html') return render_template('movie_details.html', movie=movie)
def show_movie(movie_id): """get movie by id""" movie = crud.get_movie_by_id(movie_id) return render_template("movie_details.html", movie=movie)
def display_movie(movie_id): """Display a movie.""" movie = crud.get_movie_by_id(movie_id) return render_template('movie_details.html', movie=movie)
def movie_detail(movie_id): """Show individual movie details.""" movie_details = crud.get_movie_by_id(movie_id) return render_template('movie_details.html', movie=movie_details)
def movie_details(movie_id): """return movie details""" details = crud.get_movie_by_id(movie_id) return render_template('movie_details.html', details=details)
def show_movie(movie_id): movie= crud.get_movie_by_id(movie_id) return render_template('movie_details.html'movie=movie)
def show_movies_by_id(movie_id): """Show movie details by ID""" movie = crud.get_movie_by_id(movie_id) return render_template('movie_details.html', movie=movie)
def show_movie(movie_id): """Show details on a particular movie.""" movie = crud.get_movie_by_id(movie_id) return render_template('movie_details.html', movie=movie)
def movie_detail(movie_id): """View movie detail""" movie = crud.get_movie_by_id(movie_id) return render_template('movie_detail.html', movie = movie)
def movie_details(movie_id): """Show details on specific movies""" movie = crud.get_movie_by_id(movie_id) return render_template('movie_details.html', movie=movie)
def movie_details(movie_id): """View details about one movie""" movie = crud.get_movie_by_id(movie_id) return render_template('movie_details.html', movie=movie)
def get_movie(movie_id): """ Show a movie's detail """ movie = crud.get_movie_by_id(movie_id) return render_template("movie_details.html", movie=movie)
def show_movie_info(movie_id): """Show movie info page""" movie = crud.get_movie_by_id(movie_id) return render_template('movie_details.html', movie=movie)
def show_movie_details(movie_id): """Shows details for a movie""" movie = crud.get_movie_by_id(movie_id) return render_template('movie_details.html', movie=movie)
def show_movie(movie_id): """Show details of a certain movie.""" movie = crud.get_movie_by_id(movie_id) return render_template('movie_details.html', movie=movie)
def moviedetails(movie_id): "Show details." movie_details = crud.get_movie_by_id(movie_id) return render_template("movie_details.html", movie=movie_details)
def movie_details(movie_id): """View the details page for the movie of the given id.""" movie = crud.get_movie_by_id(movie_id) return render_template("movie_details.html", movie=movie)
def movie_details(movie_id): movie = crud.get_movie_by_id(movie_id) return render_template('/movie_details.html', movie=movie)
def show_rating_page(movie_id): """Display movie rating page.""" movie = crud.get_movie_by_id(movie_id) session['movie_id'] = movie_id return render_template('rate_movie.html', movie=movie)
def show_movie_details(movie_id): """Show more detailed information on a particular movie.""" movie = crud.get_movie_by_id(movie_id) return render_template('movie_details.html', movie=movie)
def movie_by_id(movie_id): """Show movie of a given movie id""" movie = crud.get_movie_by_id(movie_id) return render_template('movie_details.html', movie=movie)
def show_movie(movie_id): """View movie details.""" movie = crud.get_movie_by_id(movie_id) return render_template('movie_details.html', movie=movie)
def show_movie_details(movie_id): """List details of a particular movie given its movie_id""" movie = crud.get_movie_by_id(movie_id) return render_template("movie_details.html", movie=movie)