async def get_movie(item_id: int): return crud.get_movie(item_id)
def read_movie(movie_id: int, db: Session = Depends(get_db)): db_movie = crud.get_movie(db, movie_id=movie_id) if db_movie is None: raise HTTPException(status_code=404, detail="Movie to read not found") return db_movie
def all_movies(): """View all movies.""" movies = crud.get_movie() return render_template('all_movies.html', movies=movies)