summaryrefslogtreecommitdiff
path: root/postgresqleu/auth.py
diff options
context:
space:
mode:
authorMagnus Hagander2009-02-20 13:57:43 +0000
committerMagnus Hagander2009-02-20 14:02:17 +0000
commit08db19ce45adf3c93fb072d321799ed0e8fc9b31 (patch)
tree35b0de35873d23d8cf9d9282a6917c90c2103156 /postgresqleu/auth.py
parent53a73b86940b267ca79494404965dd4f23827af7 (diff)
Move connection string for authentication services to config file
Diffstat (limited to 'postgresqleu/auth.py')
-rw-r--r--postgresqleu/auth.py3
1 files changed, 2 insertions, 1 deletions
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()