Skip to content

elbernante/movieindex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Movie Index

A single-page web application showing a list of movies with infos and trailers. The page is dynamically generated by Python code on the back end.

Running the Web Application

Environment Requirements

The page will be generated by a Python code. To run the code, to following must be installed.

  • Python 2.7
  • Git

Getting the Source Code

Clone a copy of the main Movie Index git repo by running:

git clone https://github.com/elbernante/movieindex.git

Launching the Page

In the command line, go to the directory of movieindex/ and run the command:

python index.py

A new file index.html will be created (if it doesn't already exists, otherwise it will be overwritten) in the movieindex/ directory. This file will then be automatically launched on the default browser.

Supported Browsers

The following browsers are supported. Other browsers might work, but are not tested.

  • Google Chrome on Mac (Version 43)
  • Safari on Mac(Version 8)

Files

Movie Index is following MVC pattern. It's directory includes 3 main folders soul/, outfit/, and brain/ to represent the model, view, and controller respectively for the design pattern.

movieindex/
├── soul/
│   ├── movie.py
│   └── movie_list.json
├── outfit/
│   ├── templates.py
│   ├── template_index.py
│   ├── template_index.html
│   ├── template_tile.py
│   ├── template_tile.html
│   ├── tempalte_nav_bar.py
│   ├── template_nav_bar.html
│   ├── template_banner.py
│   ├── template_banner.html
│   ├── template_footer.py
│   ├── template_footer.html
│   ├── css/
│   │   └── main.css
│   ├── js/
│   │   └── main.js
│   └── lib/
│       └── ... (external javascript libraries)
├── brain/
│   └── control_room.py 
└── index.py

Model

The soul/ represents the model part of the MVC pattern. It holds classes definitions. movie_list.json holds a list of records of movies which is used to generate instances of Movie() class.

View

The outfit/ represents the view part of the MVC pattern. It holds the files related to front-end. templates.py contains an abstract class for html template classes. Each *.html file has corresponding *.py file to represent its Python class.

Controller

The brain/ represents the controller part of the MVC pattern. It contains the ControlRoom() class which is responsible for coordinating between data and view.

index.py

A special file index.py is the entry point of the application. It generates the index.html file and launches it in the default browsing through ControlRoom() class.

About

Single-page web app showing list of movies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published