开发者

python manage.py syncdb

开发者 https://www.devze.com 2023-02-24 10:26 出处:网络
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.

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 pyt开发者_StackOverflow中文版hon 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


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)


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号