This project just for demonstrating how to use Django with templates. The style of this project is built by Bootstrap.
The supper user's username and password included in the document of Task 1.
- Linux or Mac
- Installed python 3.12(this project just tested at this version)
# The default allowed demain list at setting.py
ALLOWED_HOSTS = ['*']
# active venv
cd [the root of this project]
python3 -m venv .venv
source venv/bin/activate
# exit venv
deactivate
pip install -r requirements.txt
# This information recorded by .env and Dockerfile
export DJANGO_DEBUG=False
export DJANGO_SUPERUSER_USERNAME=admin
export DJANGO_SUPERUSER_PASSWORD=admin
export DJANGO_SUPERUSER_EMAIL=admin@django-example.app
# add environment stored in .env file
source .env
# Check environment
echo $DJANGO_SUPERUSER_USERNAME
# create tables
python manage.py migrate
# create super user
# option 1: by interactive way
python manage.py createsuperuser
# option 2: by environment variables based on environment setting
python manage.py create_superuser
python3 manage.py runserver
Please check out docker branch for this.