Esempio n. 1
0
def deploy():
    db.drop_all()
    db.create_all()
    downey = Star(name='Robert Downey Jr', age='53')
    chevy = Star(name='Chevy Chase', age='74')
    pratt = Star(name='Chris Pratt', age='38')
    avenger = Movie(title='Avengers',
                    about='superheros get together',
                    year='2012',
                    star=downey)
    caddy = Movie(title='Caddyshack',
                  about='the snobs vs the slobs',
                  year='1983',
                  star=chevy)
    galaxy = Movie(title='Guardians of the Galaxy',
                   about='space superheros',
                   year='2014',
                   star=pratt)
    db.session.add(downey)
    db.session.add(chevy)
    db.session.add(pratt)
    db.session.add(avenger)
    db.session.add(caddy)
    db.session.add(galaxy)
    db.session.commit()
Esempio n. 2
0
def deploy():
    db.drop_all()
    db.create_all()
    tomcruise = Actor(name='Tom Cruise', about='American Action Star')
    annehathaway = Actor(name='Anne Hathaway', about='A-list Movie Star')
    bradpitt = Actor(name='Brad Pitt', about='American Movie Star')
    movie1 = Movie(name='Mission Impossible',
                   year=1996,
                   producer="Paula Wagner",
                   actor=tomcruise)
    movie2 = Movie(name='Devil Wears Prada',
                   year=2006,
                   producer="Wendy Finerman",
                   actor=annehathaway)
    movie3 = Movie(name='Fight Club',
                   year=1999,
                   producer="Art Linson",
                   actor=bradpitt)
    db.session.add(tomcruise)
    db.session.add(annehathaway)
    db.session.add(bradpitt)
    db.session.add(movie1)
    db.session.add(movie2)
    db.session.add(movie3)
    db.session.commit()
Esempio n. 3
0
def deploy():
    db.drop_all()
    db.create_all()
    nolan = Director(
        name='Christopher Nolan',
        about=
        'Christopher Edward Nolan is an English film director, screenwriter, and producer who holds both British and American citizenship. He is one of the highest-grossing directors in history, and among the most acclaimed filmmakers of the 21st century.'
    )
    jackson = Director(
        name='Peter Jackson',
        about=
        'Sir Peter Robert Jackson is a New Zealand film director, screenwriter and film producer. He is best known as the director, writer, and producer of The Lord of the Rings trilogy (2001-03) and The Hobbit trilogy (2012-14), both of which are adapted from the novels of the same name by J. R. R. Tolkien.'
    )
    tarantino = Director(
        name='Quentin Tarantino',
        about=
        'Quentin Jerome Tarantino is an American film director, writer, and actor. His filmsare characterized by nonlinear storylines, satirical subject matter, an aestheticization of violence, extended scenes of dialogue, ensemble casts consisting of established and lesser-known performers, references to popular culture, soundtracksprimarily containing songs and score pieces from the 1960s to the 1980s, and features of neo-noir film. He is widely considered one of the greatest filmmakers of his generation.'
    )
    interstellar = Movie(
        name='Interstellar',
        year=2014,
        about=
        "A team of explorers travel through a wormhole in space in an attempt to ensure humanity's survival.",
        director=nolan)
    lotr3 = Movie(
        name='The Lord of the Rings: The Return of the King',
        year=2003,
        about=
        "Gandalf and Aragorn lead the World of Men against Sauron's army to draw his gaze from Frodo and Sam as they approach Mount Doom with the One Ring.",
        director=jackson)
    inglourious = Movie(
        name='Inglourious Basterds',
        year=2009,
        about=
        "In Nazi-occupied France during World War II, a plan to assassinate Nazi leaders by a group of Jewish U.S. soldiers coincides with a theatre owner's vengeful plans for the same.",
        director=tarantino)
    db.session.add(nolan)
    db.session.add(jackson)
    db.session.add(tarantino)
    db.session.add(interstellar)
    db.session.add(lotr3)
    db.session.add(inglourious)
    db.session.commit()
Esempio n. 4
0
def deploy():
    db.drop_all()
    db.create_all()
    ryanreynolds = Actor(
        name='Ryan Reynolds',
        about=
        'Ryan Rodney Reynolds is a Canadian actor, film producer, and screenwriter'
    )
    channingtatum = Actor(name='Channing Tatum',
                          about='Channing Matthew Tatum is an American actor')
    tomcruise = Actor(name="Tom Cruise",
                      about='Thomas Cruise is an American actor and producer')
    movie1 = Movie(name='21 Jump Street', year=2012, actor_id=2)
    movie2 = Movie(name='Deadpool', year=2014, actor_id=1)
    movie3 = Movie(name="Top Gun", year=1986, actor_id=3)
    db.session.add(ryanreynolds)
    db.session.add(channingtatum)
    db.session.add(tomcruise)
    db.session.add(movie1)
    db.session.add(movie2)
    db.session.add(movie3)
    db.session.commit()
Esempio n. 5
0
def deploy():
    db.drop_all()
    db.create_all()
    actor1 = Actor(
        name='Liam Nesson',
        quote=
        '"I do not know who you are. I do not know what you want. If you are looking for ransom I can tell you I do not have money, but what I do have are a very particular set of skills. Skills I have acquired over a very long career. Skills that make me a nightmare for people like you. If you let my daughter go now that will be the end of it. I will not look for you, I will not pursue you, but if you do not, I will look for you, I will find you and I will kill you."'
    )
    actor2 = Actor(name='Nicholas Cage',
                   quote='"We have to steal The Declaration of Independence!"')
    actor3 = Actor(name='Al Pacino',
                   quote='"I always tell tell the truth, even when I lie"')
    movie1 = Movie(
        name='National Treasure',
        year=2004,
        plot=
        "A historian races to find the legendary Templar Treasure before a team of mercenaries.",
        actor=actor2)
    movie2 = Movie(
        name='Scarface',
        year=1983,
        plot=
        "In Miami in 1980, a determined Cuban immigrant takes over a drug cartel and succumbs to greed.",
        actor=actor3)
    movie3 = Movie(
        name='Taken',
        year=2008,
        plot=
        "A retired CIA agent travels across Europe and relies on his old skills to save his estranged daughter, who has been kidnapped while on a trip to Paris.",
        actor=actor1)

    db.session.add(actor1)
    db.session.add(actor2)
    db.session.add(actor3)
    db.session.add(movie1)
    db.session.add(movie2)
    db.session.add(movie3)
    db.session.commit()