This project describe that, how to develop an application that provides a list of items within a variety of categories as well as provide a user registration and authentication system. Registered users will have the ability to post, edit and delete their own items.
- Git 2.50.1 Version Control System
- Python 3.10.12 High-Level Programming Language
- Vagrant 2.4.7 Build and Maintain Virtual Machine
- VirtualBox 7.1.4 Execute the Virtual Machine
- Flask Framework (Pre-installed in Virtual Machine)
- Bootstrap 4.1.3 (Required Proper Inrernet Connection)
-
Install Git.
-
Install Vagrant and VirtualBox.
-
Python and PostgreSQL are already pre-installed in VM.
-
If you're using Python 3 specifically (and pip3 is available), use:
pip3 install -r requirements.txt
-
Download or Clone fullstack-nanodegree-vm repository.
-
Download or Clone Buid an Item Catalog Application repository.
-
You will need to unzip repository after downloading it or open it after cloning. Move all the content of the cloning/downloaded folder in (New Folder) whose name is catalog and move this catalog folder inside vagrant sub-directory in the downloaded fullstack-nanodegree-vm.
The VM is a Linux server system that runs on top of your own computer. You can share files easily between your compute. Launch the VM inside vagrant sub-directory in the downloaded fullstack-nanodegree-vm repository using command in terminal/Git Bash:
#!/bin/bash
$ vagrant up
log in VM using command in terminal/Git Bash:
#!/bin/bash
$ vagrant ssh
After log in VM, change directory cd
to /vagrant and look around with ls
. Then you will get Shell Prompt look like this:
vagrant@vagrant:/vagrant$
After in vagrant directory, change directory cd
to /catalog and look around with ls
. Then you will get Shell Prompt look like this:
vagrant@vagrant:/vagrant/catalog$
After in catalog directory in VM. Create database using the command:
#!/bin/bash
$ python3 database_setup.py
After creating database populate it with dummy data by using this command:
#!/bin/bash
$ python3 lotsofitems.py
Inside vagrant/catalog sub-directory run the project.py
file using the command:
#!/bin/bash
$ python3 project.py
After this open your favourite Browser and then type this address in address bar:
http://localhost:8000/catalog/
Try these links to access public JSON Endpoints.
Return the JSON objects of all categories and items:
http://localhost:8000/catalog/JSON
Return the JSON objects of items of specific category:
http://localhost:8000/catalog/<int:categories_id>/JSON
Return the JSON objects of specific item:
http://localhost:8000/catalog/<int:categories_id>/<int:itemID>/JSON
Buid an Item Catalog Application is Copyright ©️ 2018 Kashif Iqbal. It is free, and may be redistributed under the terms specified in the LICENSE file.