pip3 install django
pip3 install django-environ
django-admin startproject Tiketin
cd Tiketin
python3 startapp core
python3 migrate
python3 createsuperuser
The core app directory will start with the following files inside:
core/
│
├── migrations/
│ └── __init__.py
│
├── __init__.py
├── admin.py
├── apps.py
├── models.py
├── tests.py
├── views.py
├── .env.example
└── .env
Create file named .env
that contains database environment variables, refer to .env.example
file.
Run the Django development server using:
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py runserver