from django.conf import settings
settings.configure(DATABASE_ENGINE="mysql",
DATABASE_HOST="localhost",
DATABASE_NAME="my_database",
DATABASE_USER="user",
DATABASE_PASSWORD="password")
sometimes we need use django orm directly
settings.configure(DATABASE_ENGINE="mysql",
DATABASE_HOST="localhost",
DATABASE_NAME="my_database",
DATABASE_USER="user",
DATABASE_PASSWORD="password")
sometimes we need use django orm directly