From 08db19ce45adf3c93fb072d321799ed0e8fc9b31 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Fri, 20 Feb 2009 14:57:43 +0100 Subject: Move connection string for authentication services to config file --- postgresqleu/auth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'postgresqleu/auth.py') diff --git a/postgresqleu/auth.py b/postgresqleu/auth.py index d937e1e1..66356b71 100644 --- a/postgresqleu/auth.py +++ b/postgresqleu/auth.py @@ -1,10 +1,11 @@ from django.contrib.auth.models import User from django.contrib.auth.backends import ModelBackend +from django.conf import settings import psycopg2 class AuthBackend(ModelBackend): def authenticate(self, username=None, password=None): - conn = psycopg2.connect('host=wwwmaster.postgresql.org dbname=186_www user=auth_svc password=g7y3m9u8 sslmode=require') + conn = psycopg2.connect(settings.AUTH_CONNECTION_STRING) try: conn.set_client_encoding('UNICODE') cur = conn.cursor() -- cgit v1.2.3