What databases does Django support for the setup of the Django database
Can be viewed here, support postgresql,mysql, and so on.
Installing the PostgreSQL database
Address: https://www.postgresql.org/
Normal installation.
Installing PSYCOPG2
PSYCOPG2 is the bridge between Python and PostgreSQL.
Window Address: http://www.stickpeople.com/projects/python/win-psycopg/
C:\> C:\virtualenv\Scripts\activate.bat(virtualenv) C:\> easy_install psycopg2-2.6.2.win32-py2.7-pg9.5.3-release.exe
Configuration of the database
As we use PostgreSQL, we put Settings.py's
DATABASES = { ‘default‘: { ‘ENGINE‘: ‘django.db.backends.sqlite3‘, ‘NAME‘: ‘mydatabase‘, }}
Change into
DATABASES = { ‘default‘: { ‘ENGINE‘: ‘django.db.backends.postgresql‘, ‘NAME‘: ‘mydatabase‘, ‘USER‘: ‘mydatabaseuser‘, ‘PASSWORD‘: ‘mypassword‘, ‘HOST‘: ‘127.0.0.1‘, ‘PORT‘: ‘5432‘, }}
Here the name is written to create the database:
User write:
Password write: Install PostgreSQL password for this software setting
The rest of the above is consistent with the above.
From for notes (Wiz)
Setup configuration for the Django database