Ticket #1481: mysql_base_unixsocket.diff
File mysql_base_unixsocket.diff, 768 bytes (added by , 19 years ago) |
---|
-
base.py
58 58 'user': settings.DATABASE_USER, 59 59 'db': settings.DATABASE_NAME, 60 60 'passwd': settings.DATABASE_PASSWORD, 61 'host': settings.DATABASE_HOST,62 61 'conv': django_conversions, 63 62 } 63 if settings.DATABASE_HOST.startswith("/"): 64 kwargs['unix_socket'] = settings.DATABASE_HOST 65 else: 66 kwargs['host'] = settings.DATABASE_HOST 64 67 if settings.DATABASE_PORT: 65 68 kwargs['port'] = settings.DATABASE_PORT 66 69 self.connection = Database.connect(**kwargs)