Answers for "create database django"

SQL
0

database setup in django

sudo apt install python3-dev libmysqlclient-dev default-libmysqlclient-dev
Posted by: Guest on November-15-2020
0

use django with another database

DATABASES = {
    'default': {},
    'users': {
        'NAME': 'user_data',
        'ENGINE': 'django.db.backends.mysql',
        'USER': 'mysql_user',
        'PASSWORD': 'superS3cret'
    },
    'customers': {
        'NAME': 'customer_data',
        'ENGINE': 'django.db.backends.mysql',
        'USER': 'mysql_cust',
        'PASSWORD': 'veryPriv@ate'
    }
}
Posted by: Guest on August-05-2020
-2

how to store the database in the django

>>> Person.objects.raw('''SELECT first AS first_name,
...                              last AS last_name,
...                              bd AS birth_date,
...                              pk AS id,
...                       FROM some_other_table''')
Posted by: Guest on June-22-2020

Code answers related to "create database django"

Code answers related to "SQL"

Browse Popular Code Answers by Language