Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

changing database of django

# settings.py

...

# Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases

DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.mysql',
            #'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
            'OPTIONS' : {
                'read_default_file': '/etc/mysql/my.cnf',
                }
            }
        }

...
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #changing #database #django
ADD COMMENT
Topic
Name
4+2 =