README for a Item Catalog project using SQLite database and JSON APIs.
Running the Python code will give webpages where Sports and particular Sport Items for that Sport are listed.
Based on authentication and authorization of the user the user can edit, delete and add new Sport Items.
The python file to be executed in the virtual machine is called
application.py
- Python
- Install Python 2.7.14 at https://www.python.org/downloads/
- Vagrant
- Install Vagrant at https://www.vagrantup.com/downloads.html
- Virtual Box
- Install Virtual Box 5.1 at https://www.virtualbox.org/wiki/Download_Old_Builds_5_1
- Bring the virtual machine up using the commands
vagrant upfollowed byvagrant ssh cdinto thevagrant/catalogdirectory- Run the command
python category.pyto populate the database. A file called sportcategorieswithusers.db will now appear in your directory - Run the command
python application.pyto access the webpage athttp://localhost:5000/...where...refers to the API endpoints.
- For any type of user you will be able to see:
- The home page which will list the Sports along with the Latest Added Items
- Details of a Sport Item (name and description)
- If you are able to login in you can:
- add a new Sport Item
- delete a Sport Item
- edit a Sport Item
/and/catalogshow the home page with the Sport List and Latest Items List/loginlets you login using Google Sign In/catalog/newSportItemlets you create a New Sport Item/catalog/<sport_item>/editlets you edit an existing Sport/catalog/<sport_name>/<sport_item>/deletelets you delete an existing Sport Item/catalog/<sport_name>/<sport_item>lets you see the details of an existing Sport Item
- I tried to comply with the PEP8 guidelines in
application.pybut by complying completely (usually as the length of a line is too large) the file doesn't run in vagrant, so I reverted a couple changes.