Prerequisite
How-to
- Compile all dependencies
pip-compile -o requirements.txt requirements.in
- Install all dependencies
pip install -r requirements.txt
- Run migration
python manage.py migrate
- Test local server
python manage.py runserver
Default database is using SQLite, but cause this using Django, change database is simple enough just change on settings with something like this:
# MySQL
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'DB_NAME',
'USER': 'DB_USER',
'PASSWORD': 'DB_PASSWORD',
'HOST': 'localhost',
'PORT': '3306',
}
}
# Postgres
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'db_name',
'USER': 'db_user',
'PASSWORD': 'db_user_password',
'HOST': '',
'PORT': 'db_port_number',
}
}