Connect Django to SQLEye
Set DATABASES in settings.py with HOST as 127.0.0.1 and the instance’s port. Create the database first, see CLI clients.
How do I configure PostgreSQL?
Section titled “How do I configure PostgreSQL?”Django’s documentation recommends psycopg (3.1.8 or later) as the driver.
DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "myapp", "USER": "postgres", "PASSWORD": "", "HOST": "127.0.0.1", "PORT": "5432", }}How do I configure MySQL?
Section titled “How do I configure MySQL?”Django’s documentation recommends mysqlclient as the driver.
DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "myapp", "USER": "root", "PASSWORD": "", "HOST": "127.0.0.1", "PORT": "3306", }}Replace the port with your instance’s port, then run python manage.py migrate.
Source: Django database notes. To watch the queries Django’s ORM generates, turn on capture.
SQLEye is developed and maintained by CodeROG. This page is also available as Markdown.