"The Item Catalog project consists of developing an application that provides a list of items within a variety of categories, as well as provide a user registration and authentication system."
.
├── application.py
├── client_secrets.json
├── catalogdb_setup.py
├── fakedb.py
├── catalog.db
├── README.md
├── static
│ └── style.css
└── templates
├── categories.html
├── categoryItems.html
├── deleteCategoryItem.html
├── editCategoryItem.html
├── header.html
├── itemDescription.html
├── login.html
└── newCategoryItem.html
-
Download and install Vagrant.
-
Download and install VirtualBox.
-
Clone or download the Vagrant VM configuration file from here.
-
You will end up with a new directory containing the VM files.
-
Change directory to the vagrant directory:
cd vagrant/
-
-
In
vagrant/
run:vagrant up
-
Connect to the VM by running:
vagrant ssh
-
Type
cd /vagrant/
to navigate to the shared repository.- "Files in the VM's /vagrant directory are shared with the vagrant folder on your computer. But other data inside the VM is not. For instance, the PostgreSQL database itself lives only inside the VM."
-
Download this repository in the
catalog/
folder -
Set up the database:
python catalogdb_setup.py
-
Insert dummy values:
python fakedb.py
-
Run
application.py
:python application.py
-
Open
http://localhost:5000/
in your favourite Web browser, and enjoy.
Returns JSON of all categories
/catalog.json
Returns JSON of all category items
/catalog/items/json
Returns JSON of specific category items
/catalog/<int:category_id>/<int:item_id>/json