The purpose of this project is to generate foundational code for creating and populating databases using Django framework, as well as utilizing the admin panel and documenting command line instructions.
Built With
python3 manage.py runserver
python3 manage.py createsuperuser
python3 manage.py shell
from food.models import Item <-- import our db model
Item.objects.all() <-- list all items stored in item table
a = Item(item_name="Pizza", item_desc="Cheesy Pizza", item_price=20) <-- create an item object
a.save() <-- store object in DB
python3 manage.py migrate
python3 manage.py makemigrations <app name>
python3 manage.py makemigrations food
python3 manage.py sqlmigrate food 0001
# notice the 0001 was provided by django
python3 manage.py migrate
Features:
- Administration panel
- Front End