0
嗨,我是 django 的新手。我正在server Webfaction
上建立一个 django 项目。当我执行“python manage.py sync”时出现错误:
> Traceback (most recent call last): File "manage.py", line 10, in
> <module> execute_from_command_line(sys.argv) File
> "//home/xx/lib/python2.7/django/core/management/init.py", line 443, in
> execute_from_command_line utility.execute() File
"//home/xx/lib/python2.7/django/core/management/init.py", line 382, in
> execute self.fetch_command(subcommand).run_from_argv(self.argv) File
> "//home/xx/lib/python2.7/django/core/management/base.py", line 196, in
> run_from_argv self.execute(*args, options.dict) File
> "//home/xx/lib/python2.7/django/core/management/base.py", line 232, in
> execute output = self.handle(*args, options) File
> "//home/xx/lib/python2.7/django/core/management/base.py", line 371, in
> handle return self.handle_noargs(options) File
> "//home/xx/lib/python2.7/django/core/management/commands/syncdb.py",
> line 57, in handle_noargs cursor = connection.cursor() File
> "//home/xx/lib/python2.7/django/db/backends/init.py", line 306, in
> cursor cursor = self.make_debug_cursor(self._cursor()) File
> "//home/xx/lib/python2.7/django/db/backends/postgresql_psycopg2/base.py",
> line 177, in _cursor self.connection = Database.connect(conn_params)
> File "/usr/lib64/python2.6/site-packages/psycopg2/init.py", line 179,
> in connect connection_factory=connection_factory, async=async)
>
> psycopg2.OperationalError: FATAL: password authentication failed for
> user "postgres"
实际上在我的数据库设置中,我正在使用其他帐户(不是postgres),为什么要求postgres
的密码?
顺便说一句,我是否需要在psycopy2
上安装webfaction
?
以前它在我创建新数据库时有效。但是现在当我尝试django auth
并创建一个新用户时,它会抛出此错误。
答案 0 :(得分:0)