0

I am very new to python and Django, was actually thrown in to finish off some coding for my company since our coder left for overseas.

When I run python manage.py syncdb I receive the following error

psycopg2.OperationalError: FATAL: password authentication failed for user "winepad"

I'm not sure why I am being prompted for user "winepad" as I've created no such user by that name, I am running the sync from a folder named winepad. In my pg_hba.conf file all I have is a postgres account which I altered with a new password.

Any help would be greatly appreciated as the instructions I left are causing me some issues.

Thank you in advance

2 Answers 2

4

Once you start a Django project, you have to set your database settings in your_project/settings.py . The settings you want to check/change is (assuming you use Django 1.3) something like this:

DATABASES = {
    'default': {
        'ENGINE': '',
        'NAME': '',
        'USER': '',
        'PASSWORD': '', 
        'HOST': '',
        'PORT': '',
    }
}

So make sure those settings are correctly set up (you have to do it manually)

Sign up to request clarification or add additional context in comments.

Comments

1

Check your settings.py file. The most likely reason for this issue is that the username for the database is set to "winepad". Change that to the appropriate value and rerun python manage.py syncdb That should fix the issue.

2 Comments

Aminho's answer clarifies where to set the value for username, in case you are still a little lost.
Thank you both for your help, it was that simple. Once I read the settings.py file a little closer I noticed that it was pointing to info in the localsettings.py file. Changed the value and it worked. Once again thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.