This website is developed as a project of Full Stack Web Developer Nanodegree Program, offered by Udacity.
This project requires Python 3.x to run. Please make sure you have the latest version of Python installed in your system. If not, follow this guide to install Python to your system.
The project folder consists of four files:
- entertainment_center.py This file contains all the data and function calls required to run the website.
- fresh_tomatoes.py This file contains all the logic required to generate a HTML file, which can be run in browser.
- media.py This file contains all the class definitions used in this project.
- README.md
- Make sure you satisfy all the Dependencies mentioned above.
- Download the project folder.
- Open your terminal, and navigate to the root of the project folder.
- Run the following command in your terminal:
python -m entertainment_center.py
- A browser window will open and load the movie trailer website in a new tab.
When you run python -m entertainment_center.py
in your terminal, the code inside the file entertainment_center.py gets executed, which calls a function inside the file fresh_tomatoes.py, which then generates a HTML file, and loads it in the browser window.
To make changes like adding/deleting/modifying Movies or Tv Shows, edit the entertainment_center.py file. It is very simple to understand. I recommend you to go through the whole file, read through the code and comments, and once you have understood it, you will be able to easily modify it.
To make changes to style, look and feel of the website, you will have to modify the file fresh_tomatoes.py, It contains the template for the HTML file, and the functions to append the data from the file entertainment_center.py dynamically to the generated website. The code in fresh_tomatoes.py is well commented and fairly easy to understand it. You will be able to make changes to it once you understand it.
To make changes to the class structure, edit the file media.py. Once again, this file is well commented. You will be able to make changes to it after you understand it.