https://notarious2.pythonanywhere.com/admin/
login: admin/admin@example.com
password: admin
This e-commerce app was built using the following technologies:
-
Customer Registration, Login and Logout. Customers may login with either email or username
-
Customer and Guest Checkout (using device ID set in Cookies)
-
Delivery and Carry-out option
-
Special Orders tab for registered users to view completed orders
-
Deferred Cash payment and Instant online payment with Stripe
-
99% test coverage with 100+ of both functional and unit tests
The app uses SQLite database. Relational representation of Django Models used in ePizza app are provided below.
3 coupons (integrated with Stripe Payment Gateway) are available at Checkout
WINTER: 50% off the order total
SUMMER: $10 off the order total
Clone Repository:
git clone https://github.com/notarious2/Django-Pizza-Delivery.git
cd Django-Pizza-Delivery
Configure Environmental variables:
inside 'epizza' folder add .env file and add Secret Key, Stripe Publishable Key and Stripe Secret Key:
SECRET_KEY=
STRIPE_PUBLISHABLE_KEY=
STRIPE_SECRET_KEY=
To test Stripe's Percent Coupon (otherwise tests are automatically skipped) add:
STRIPE_COUPON_ID_PERCENT=
Create and Activate Virtual Environment:
virtualenv env
env\Scripts\activate
Install Dependencies:
pip install -r requirements.txt
Run Development Server:
python manage.py runserver
You must have Node.js installed in your PC
Tailwind Directives are in store/static/store/src/input.css
Output (autogenerated) stored in store/static/store/src/styles.css
Install Dependencies:
npm install
Start Tailwind CLI build process
runs: "tailwind build -i store/static/store/src/input.css -o store/static/store/src/styles.css --watch" Script inside package.json
npm run build
The project contains 60+ both functional and unit tests.
Unit tests cover urls, models, forms and views
Functional testing is done using Selenium and django's StaticLiveServerTestCase
Run all tests
python manage.py test
Run functional tests
Located in functional tests folder of a root directory. to see the testing process remove options.add_argument('headless') in SetUp of each functional test
python manage.py test functional_tests
Run unit tests
python manage.py test users store orders
Test coverage report
coverage run manage.py test
to show report in command line:
coverage report
generates html report in test_coverage_report folder
coverage html