The purpose of this project is to emulate a website that hosts a catalog of items within various categories (i.e. a sport such as soccer under a sports category)
- Open the terminal and navigate to the project directory
- Run the command
vagrant upin the terminal to configure the virtual machine - Run the command
vagrant sshto boot the virtual machine - Use the command
cd /vagrantto enter the shared folder - Navigate to the directory with the file
views.py - Run
views.pywith the commandpython views.pyto start the server - Type
localhost:8000into your browser to go to the site
NOTICE BEFORE RUNNING views.py, YOU MUST INSTALL THESE MODULES:
- flask_login
- requests
To install these modules, run the commands sudo pip install flask_login and
sudo pip install requests in your virtual machine inside the shared /vagrant
folder.
To access the json formatted links, follow these URIs:
/catalog/json/catalog/<string:cat_name>/json-OR-/catalog/<string:cat_name>/items/json/catalog/<string:cat_name>/<string:item_name>/json