title: postgresql: FATAL: password authentication failed for user "douglas"
body: <p>I am trying to migrate a DB from sqlite to postgresql...so I typed:</p>
  
  <pre><code>sudo -u postgres psql
  postgres=# ALTER USER postgres WITH PASSWORD 'newpassword';
  </code></pre>
  
  <p>and the output returns <code>ALTER ROLE</code></p>
  
  <p>but when I type <code>python manage.py migrate</code> I receive always the same error:</p>
  
  <blockquote>
    <p>django.db.utils.OperationalError: FATAL:  password authentication
    failed for user "douglas"</p>
  </blockquote>
  
  <p>This is the database sections of my settings.py.</p>
  
  <pre><code># Old, using mysqlite
  """
  DATABASES = {
      #'default': {
      #    'ENGINE': 'django.db.backends.sqlite3',
      #    'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
      #}
      'default': dj_database_url.config(default='postgres://localhost:5432/postgres_db_name'),
  }
  """
  
  # New, using postgres
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.postgresql',
          'NAME': 'douglas_db',
          'USER': 'douglas',
          'PASSWORD': 'vamointer',
          'HOST': '127.0.0.1',
          'PORT': '5432',
      }
  }
  </code></pre>
  
  <p>Note: When I run the '<em>ALTER USER postgres WITH PASSWORD</em>' I put in the same password defined in the settings.py.</p>