Temp. fix for ticket #71

This commit is contained in:
tonio
2010-06-18 17:34:53 +02:00
parent ee03742e3f
commit ac7ae13dac
2 changed files with 8 additions and 4 deletions
+2 -3
View File
@@ -438,8 +438,7 @@ add the following line inside root's crontab::
Replace mailng_dir with the installation path of MailNG.
By default, messages older than 14 days are automatically purged. You
can modify this value by changing the variable MAX_MESSAGES_AGE inside
settings.py.
can modify this value by changing the MAX_MESSAGES_AGE parameter in the admin panel.
Using the statistics plugin
---------------------------
@@ -526,4 +525,4 @@ Last but not least, modify the SECRET_KEY parameter and choose a new
value (exactly 16 characters). This key is really important, it is
used to encrypt/decrypt user passwords stored inside sessions.
Do not communicate this key to anyone!!
Do not communicate this key to anyone!!
+6 -1
View File
@@ -13,13 +13,18 @@ def mysql_newconnection(host, dbname, login, password):
return MySQLdb.connect(host=host, db=dbname, user=login, passwd=password)
def getconnection(name):
if not name in connections.keys():
# if not name in connections.keys():
if True:
from django.conf import settings
cfg = settings.DB_CONNECTIONS[name]
if cfg["driver"] == "mysql":
conn = mysql_newconnection(cfg["host"], cfg["dbname"], cfg["login"],
cfg["password"])
if connections.has_key(name):
close(connections[name])
connections[name] = conn
return connections[name]