Skip to content

External Database

kannibalox edited this page Jan 30, 2022 · 1 revision

While the default SQLite database should be sufficient for almost all use cases, PtpUploader supports using an external database such as PostgreSQL or MariaDB/MySQL.

PostgreSQL example

  • Ensure the user and database have been created.
  • Install pre-requisites
pip install psycopg2
  • In config.yml, add a new section
DATABASES:
  default:
    ENGINE: 'django.db.backends.postgresql_psycopg2'
    NAME: 'ptpuploader'
    USER: 'ptpuploader'
    PASSWORD: 'PtPuPlOaDeR'
    HOST: 'sql.example.com'
    PORT: ''

For more details, see Django's database documentation: https://docs.djangoproject.com/en/3.2/ref/databases/

Clone this wiki locally