Skip to content

Flask App for a pizza restaurant management. You can see and manage orders, ingredients, bevarages, etc.

Notifications You must be signed in to change notification settings

andresacg30/andresc-pizza-planet-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Pizza Planet

python-badge

This is an example software for a pizzeria that takes customizable orders.

Table of Contents

Getting started

You will need the following general tools:

Running the backend project

  • Clone the repository
git clone https://github.com/ioet/python-pizza-planet.git
  • Create a virtual environment in the root folder of the project
python3 -m venv venv
  • Activate the virtual environment (In vscode if you select the virtual env for your project it will activate once you open a new console window)

For linux/MacOS users:

source venv/bin/activate 

For windows users:

\path\to\env\Scripts\activate
  • Install all necessary dependencies:
pip3 install -r requirements.txt
  • Start the database (Only needed for the first run):
python3 manage.py db init
python3 manage.py db migrate
python3 manage.py db upgrade
  • If you want to use the hot reload feature set FLASK_ENV before running the project:

For linux/MacOS users:

export FLASK_ENV=development 

For windows users:

set FLASK_ENV=development
  • Run the project with:
python3 manage.py run

Running the frontend

  • Clone git UI submodule
git submodule update --init
  • Install Live Server extension if you don't have it from here on VSCode Quick Open (Ctrl + P)
ext install ritwickdey.LiveServer
  • To run the frontend, start ui/index.html file with Live Server (Right click Open with Live Server)

  • Important Note You have to open vscode in the root folder of the project.

  • To avoid CORS errors start the backend before the frontend, some browsers have CORS issues otherwise

Testing the backend

  • Make sure that you have pytest installed

  • Run the test command

python3 manage.py test

About

Flask App for a pizza restaurant management. You can see and manage orders, ingredients, bevarages, etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published