This Django-based pizza restaurant app featuring a cart with purchasing through Stripe. It features an admin interface to edit menu items and view pending orders. Users can add items to their cart and view their pending and past orders.
Set-up a virtual environment and activate it:
python3 -m venv env
source env/bin/activate
You should see (env) before your command prompt now. (You can type deactivate
to exit the virtual environment any time.)
Install the requirements:
pip install -U pip
pip install -r requirements.txt
Create a Stripe account and obtain api keys here
Set up your environment variables:
touch .env
echo DOMAIN="XXX" >> .env
echo STRIPE_SECRET_KEY="sk_test_XXX" >> .env
echo STRIPE_PUBLIC_KEY="pk_test_XXX" >> .env
Make sure you are in the virtual environment (you should see (env) before your command prompt). If not source /env/bin/activate
to enter it.
Usage: manage.py runserver
A sqlite database has been included with the repo. The admin interface can be accessed at /admin
and the default admin username:password is admin:Pinocchio
.
HarvardX: CS50's Web Programming with Python and JavaScript
Pinocchio's Pizza & Subs is licensed under the MIT license.