app-generator / intro

App Generator - Deliver your projects faster | AppSeed
https://appseed.us
53 stars 14 forks source link

Django MySql Driver - MacOS #76

Open app-generator opened 1 year ago

app-generator commented 1 year ago

Raised by paying user in Discord.

On Mac, the MySql driver can be mysql.connector.django instead of django.db.backends.mysql

The runtime error:

  File "/Volumes/DATA/OmomoPro/django-datta-able-pro/env/lib/python3.11/site-packages/django/db/utils.py", line 126, in load_backend
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: 'django.db.backends.mysql.connector.django' isn't an available database backend or couldn't be imported. Check the above exception. To use one of the built-in backends, use 'django.db.backends.XXX', where XXX is one of:
    'mysql', 'oracle', 'postgresql', 'sqlite3'

The fix is to set the DB_ENGINE: