Here is what I am trying to do
- python manage.py dumpdata > database.json
Changing my setting files: from
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } }
to
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'mydatabase', 'USER': 'myusername', 'PASSWORD': 'mypassword', 'HOST': '127.0.0.1', 'PORT': '5432', } }
Now I m getting an error that
Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?
I have following doubts
- Do I need to create a new database('mydatabase') for postgres. If so please point out how can I do so?
- Do I need to create a new superuser for postgres? I have been using the same user and password that I created for sqllite3.
- What follows when above error is fixed.