Assignment Six
Due: Friday, April 19 at 11:59.999999 pm
100 Points
Add BasicAuth
to the Flask
server and use Array.map
, Array.reduce
, and Array.filter
to create a dashboard to display data about box office earnings for movies of 2018.
Using the starter repository, modify the application so users can make sense of the box office earnings for 2018. The server is currently open to any arbitrary visitor; Protect the server’s routes using BasicAuth
. Using
map
, reduce
, and filter
, populate the Top 10 Highest Grossing Films
, Top 10 by Studio
, and Top 10 by Opening Weekend Gross
for the authenticated user.
These are the base requirements for making the page work. You can enhance.
pip install Flask==1.0.2
pip install Flask-RESTful==0.3.6
passlib
, bcrypt
, or the built-in functions: from werkzeug.security import generate_password_hash, check_password_hash
BasicAuth
decorator we covered in class including the helper functions to authenticate the user for the page./api/movies
/api/movies/<int:movie_id>
base.html
base.html
has an XmlHttpRequest
in place to call the collection route to get all movies and populate a table on the page with all movies.for
, while
, etc.).#gross-movies
).#gross-average
.#studio-movies
).#studio-select
with all unique studios.#studio-name
).#studio-average
.#opening-movies
).#opening-average
.dashboard.py
, and place it in the root directory of your repository.Be sure to remember to push the latest copy of your code back to your GitHub repository before the the assignment is due. At the deadline, the repositories will automatically be copied for grading. Whatever is present in your GitHub repository at that time will be considered your submission for this assignment.
Files included in the starter repo:
/README.md
/dashboard.py
/templates/base.html
/requirements.txt
/static/main.css
We will download a zip archive of the repo and run the dashboard.py
file in a terminal/console using Python version 3.7 (export FLASK_APP='connect4.py' flask run
).
map
, reduce
, filter
: 10%sort
without mutating original array: 10%Late assignments will receive zero credit.