summaryrefslogtreecommitdiffstats
path: root/virtualenv/pffedportal
diff options
context:
space:
mode:
authorThomas NOEL <tnoel@entrouvert.com>2012-06-29 22:13:15 (GMT)
committerThomas NOEL <tnoel@entrouvert.com>2012-06-29 22:13:15 (GMT)
commit9b615b31bae4e3e435639b9271899606fe0801ab (patch)
treebbbbf87b39b5c4fed126e9a993b3b7603335fe39 /virtualenv/pffedportal
parent2f961a9238afe9879a14eb136f4dfb9f4515bda2 (diff)
downloadunivnautes-old-9b615b31bae4e3e435639b9271899606fe0801ab.zip
univnautes-old-9b615b31bae4e3e435639b9271899606fe0801ab.tar.gz
univnautes-old-9b615b31bae4e3e435639b9271899606fe0801ab.tar.bz2
mail form: pfSense part (pkg)
Diffstat (limited to 'virtualenv/pffedportal')
-rw-r--r--virtualenv/pffedportal/settings.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/virtualenv/pffedportal/settings.py b/virtualenv/pffedportal/settings.py
index 586a714..4d915ba 100644
--- a/virtualenv/pffedportal/settings.py
+++ b/virtualenv/pffedportal/settings.py
@@ -8,15 +8,11 @@ LOG_DEBUG = False
TEMPLATE_DEBUG = DEBUG
USE_DEBUG_TOOLBAR = False
-#
-#
-
import os
-_PROJECT_PATH = os.path.join(os.path.dirname(__file__))
+import re
+import xml.etree.ElementTree as ET
-#
-#
-#
+_PROJECT_PATH = os.path.join(os.path.dirname(__file__))
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
@@ -189,7 +185,6 @@ FORCE_SCRIPT_NAME=""
USERBL = '/var/lib/univnautes/userbl'
# parameters from pfSense (/conf/config.xml)
-import xml.etree.ElementTree as ET
f = open('/conf/config.xml','r')
root = ET.fromstring(f.read())
f.close()
@@ -264,7 +259,8 @@ except:
EMAIL_RCPT = None
try:
- EMAIL_SUBJECTS = [ l for l in root.find('installedpackages/univnautestexts/config/email_subjects').text.splitlines() if not re.match('^\s*$', l) ]
+ subjects = root.find('installedpackages/univnautestexts/config/email_subjects').text.decode('base64').decode('iso-8859-1').splitlines()
+ EMAIL_SUBJECTS = [ l for l in subjects if not re.match('^\s*$', l) ]
except:
EMAIL_SUBJECTS = (
u"Je ne trouve pas mon établissement dans la liste",