Skip to content

hongbo-wei/Proejct-WebApp-LittleLemon

Repository files navigation

LittleLemon

How to start the application

Please run the following commands in sequence

# activate virtual environment
pipenv shell

# install all dependencies from Pipfile.lock
pipenv install

# Creates migration files based on changes to the models.
python manage.py makemigrations

# Applies pending migrations to the database.
python manage.py migrate

Start the server

python manage.py runserver

Endpoints

Superuser:
# create superuser to log in the adminitration panel
python manage.py createsuperuser --username=admin --email=admin@littlelemon.com
# password: adminlemon@123
Create new user
CREATE USER 'testuser'@'localhost' IDENTIFIED BY 'testlemon@123';
CREATE USER 'joe'@'localhost' IDENTIFIED BY 'joelemon@123';
Test
python manage.py test