From 4f9fbb837dbff10218201167a5f1d3910fefa538 Mon Sep 17 00:00:00 2001 From: Alexander Bozhenko Date: Thu, 15 Oct 2015 20:11:58 -0700 Subject: [PATCH 1/4] Movie storyline to appear on hover on poster --- fresh_tomatoes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fresh_tomatoes.py b/fresh_tomatoes.py index 5cd75599c..769288007 100644 --- a/fresh_tomatoes.py +++ b/fresh_tomatoes.py @@ -123,7 +123,7 @@ # A single movie entry html template movie_tile_content = '''
- +

{movie_title}

''' @@ -144,6 +144,7 @@ def create_movie_tiles_content(movies): # Append the tile for the movie with its content filled in content += movie_tile_content.format( movie_title=movie.title, + storyline=movie.storyline, poster_image_url=movie.poster_image_url, trailer_youtube_id=trailer_youtube_id ) From fd222e194036bad1c8cebf04e04f6bb3706e4646 Mon Sep 17 00:00:00 2001 From: William Crandell Date: Fri, 16 Oct 2015 01:31:05 -0400 Subject: [PATCH 2/4] Updating Bootstrap and adding __init__.py This allows me to import with: from ud036_StarterCode import fresh_tomatoes --- __init__.py | 2 ++ fresh_tomatoes.py | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 __init__.py diff --git a/__init__.py b/__init__.py new file mode 100644 index 000000000..8ca456a6f --- /dev/null +++ b/__init__.py @@ -0,0 +1,2 @@ +## this file is required to use +## from xxx import x diff --git a/fresh_tomatoes.py b/fresh_tomatoes.py index 5cd75599c..808a01fcf 100644 --- a/fresh_tomatoes.py +++ b/fresh_tomatoes.py @@ -12,10 +12,10 @@ Fresh Tomatoes! - - - - + + + + @@ -114,7 +131,9 @@
- {movie_tiles} +
+ {movie_tiles} +
@@ -122,10 +141,11 @@ # A single movie entry html template -movie_tile_content = ''' -
- -

{movie_title}

+movie_content = ''' +
+
+ {movie_title} +
''' @@ -143,7 +163,7 @@ def create_movie_tiles_content(movies): else None) # Append the tile for the movie with its content filled in - content += movie_tile_content.format( + content += movie_content.format( movie_title=movie.title, storyline=movie.storyline, poster_image_url=movie.poster_image_url,