WaiterShop is a simple shop application with RESTAPI, where users can buy products .
- Setup
- Running
- Accessing Admin Panel
- How buy products
- User Stories
- Features
- Dependencies
- What the app looks like
- Testing Tool
- RESTAPI
- Download the Repository to your local machine
- Create a Virtual Environment in the WaiterShop folder with this command below
python -m venv venv
- Activate the environment with this command
.\venv\Scripts\activate
- Install the dependencies
pip install -r requirements.txt
- Activate the environment with this command.
.\venv\Scripts\activate
- Start the application by running this command (Run the command where manage.py is
located)
python manage.py runserver
- You can access the admin panel by running the server and opening http://localhost:8000/admin
- Run
python manage.py createsuperuser
to create a user to access the admin panel. - Set up the Username and Password
- You can log in and change the database values anytime.
- In home or our products page click on one item
- you should see price and detail of those item
- if you want it, click add to cart
- login to site
- you can back to products page with continue shopping botton and add other items in your cart
- or click on proceed to checkout for buy your cart items
- fill your shipping adress form
- if you have shipping address in site,you can use Use default shipping address checkbox
- choice your payment option
- click continue to checkout
- A user can rate products if logged in .
- A user can have refund request with bill code on 'request-refund/' endpoint .
- A user can have coupon for reduce the price .
- A user can search products on top navigation .
- category
- items ordered by category
- can click on category name and just see items for those category
- Python
- Django
- SQLite
- Redis
- DRF
- Django Packages
WaiterShop makes use of Coverage.py. As taken from their website, "Coverage.py is a tool for measuring code coverage of Python programs. It monitors your program, noting which parts of the code have been executed, then analyzes the source to identify code that could have been executed but was not."
Running tests can be done using the following command:
coverage run manage.py test
.
Obtaining the coverage report in the command line can then be done using:
coverage report
.
Alternatively, the following command can be used to obtain the coverage report in HTML-format:
coverage html
.
NB: You'll need to re-run the first command each time you make a change to your source code or test file in order to obtain an up-to-date coverage report.
Only files with a .py extension are tested by default.
this api is based on JWT Auth, if you dont know RESTfulAPI what is it, visit https://restfulapi.net/ .