We have a Django application that we just moved from a Ubuntu 9.04
server to 10.04. We're running Apache 2.2/WSGI, with PostgreSQL as the
backend.
My settings.py file:
'DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add
'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'mediatracking', # Or path to
database file if using sqlite3.
# os.path.join(PROJECT_PATH, "templates"),
'USER': 'victorhooi', # Not used with
sqlite3.
'PASSWORD': 'ourpassword', # Not used
with sqlite3.
'HOST': '', # Set to empty string for
localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for
default. Not used with sqlite3.
}
}
I created a blank PostgreSQL database as myself ("victorhooi").
I ran ./manage.py syncdb, and this seemed to authenticate fine, and
create all the required tables.
When I try to go to http://site.com/admin though, I get an error:
OperationalError at /admin/
FATAL: Ident authentication failed for user "victorhooi"
I've read elsewhere that you need to do some tom-foolery to disable
ident authentication in PostgreSQL, or something. However, I'm
confused, because:
1. This exact same configuration seemed to work fine on our old
server.
2. The syncdb command works, but actually serving the web page
doesn't.
3. In the error message, it says ident authentication failed for user
"victorhooi", but that's the righ username to authenticate with, isn't
it?
I did notice further down in the error page, under settings:
CSRF_FAILURE_VIEW 'django.views.csrf.csrf_failure'
DATABASES {'default': 'ENGINE':
'django.db.backends.postgresql_psycopg2', 'HOST': '', 'NAME':
'mediatracking', 'OPTIONS': {}, 'PASSWORD': '********************',
'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None,
'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'Australia/
Sydney', 'USER': 'victorhooi'}}
DATABASE_ENGINE ''
DATABASE_HOST ''
DATABASE_NAME ''
DATABASE_OPTIONS {}
DATABASE_PASSWORD '********************'
DATABASE_PORT ''
DATABASE_ROUTERS []
DATABASE_USER ''
DATETIME_FORMAT 'N j, Y, P'
DATETIME_INPUT_FORMATS ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M'
Any suggestions?
Cheers,
Victor
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment