How to Connect Django With PostgreSql / Mysql / Oracel Database
How to Connect Django With PostgreSql Database: Before need to Download: PostgreSql ( download ) and PG Admin- Download ( To view Data We use This Software) Install psycopg2 Package in your virtual environment or Command Prompt ( Using pip install django psycopg2) Goto your settings.py in your django project and add DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'postgres', 'USER': 'postgres', 'PASSWORD': 'password, 'HOST': 'localhost', 'PORT': '5432', } } cd ~/myproject python manage.py makemigrations python manage.py migrate After creating the database structure, we can ...
Comments
Post a Comment