This code is the result I achieved for Udacity Full Stack Web Developer Nanodegree - Project 1: Movie Trailer Website. Instructions on how to run the application can be found at the bottom of this README text.
This code has been reviewed by me. According to me, based on the rubric used by the Udacity reviewer, this code:
- Exceeds Specifications: Student includes additional information about their favorite movies (actors, release date, etc) or personalizes their page with additional HTML or CSS features.
- Meets Specifications: Page is dynamically generated from a Python data structure.
- Meets Specifications: Page is error free.
- Meets Specifications: Code is ready for personal review and neatly formatted.
- Meets Specifications: Comments are present.
- Exceeds Specifications: Comments are thorough and concise. Code is self documenting.
- Meets Specifications: A README file is included. README file includes details of all the steps required to successfully run the application.
A list of websites, books, forums, blog posts, Github repositories etcetera that I have referred to or used in this submission can be found in the references.txt file.
This code is based on the Python module called fresh_tomatoes.py provided in Udacity's course about Programming Foundations with Python. There are several things I've added to (or modified in) this module:
- The movie-tiles now all have similar height, resulting in rows filled with movie-tiles starting from the left. This has been achieved by making sure the title will be rendered on a single line (with an ellipsis if needed), and reserving 4 lines of space for the plot (and limit its word-count if needed)
- Each movie-tile has a block with additional information from the Open Movie Database: release date, director, plot, rating on IMDb and metascore on Metacritic
- For every movie with an MPAA film rating (in OMDb), the rating symbol is rendered as an overlay on the movie-poster. Assets for the rating symbols have been downloaded from Wikipedia
- And more...
A module with classes for the movies can be found in media.py, which has a generic Movie-class based on the one used in Udacity's course about Programming Foundations with Python. For all the OMDb-related information, I have added an OMDbMovie-class which extends the Movie-class.
- Make sure Python and Git have been installed on your computer
- Make sure your computer is connected to the internet
- Clone this repository to a directory on your computer
- Run
python mediacenter.py
, wait for a little moment, and the website will be opened in your webbrowser