Separate configuration
authorArnaud Delcasse <arnaud@delcasse.fr>
Mon, 3 Sep 2012 17:54:18 +0000 (19:54 +0200)
committerArnaud Delcasse <arnaud@delcasse.fr>
Mon, 3 Sep 2012 17:54:18 +0000 (19:54 +0200)
main.py
settings.py.example [new file with mode: 0644]

diff --git a/main.py b/main.py
index 4bbd46c..5cc7e32 100755 (executable)
--- a/main.py
+++ b/main.py
@@ -15,15 +15,7 @@ import hashlib
 import smtplib
 import string
 
-DATABASE = '/tmp/cavote.db'
-PASSWD_SALT = 'change this value to some random chars!'
-SECRET_KEY = '{J@uRKO,xO-PK7B,jF?>iHbxLasF9s#zjOoy=+:'
-DEBUG = True
-TITLE = u"Cavote FFDN"
-EMAIL = '"' + TITLE + '"' + ' <' + u"cavote@ffdn.org" + '>'
-VERSION = "cavote 0.1.1"
-SMTP_SERVER = "127.0.0.1"
-PATTERNS = {u'Oui/Non': [u'Oui', u'Non'], u'Oui/Non/Blanc': [u'Oui', u'Non', u'Blanc'], u'Oui/Non/Peut-être': [u'Oui', u'Non', u'Peut-être']}
+from settings import *
 
 app = Flask(__name__)
 app.config.from_object(__name__)
diff --git a/settings.py.example b/settings.py.example
new file mode 100644 (file)
index 0000000..105d398
--- /dev/null
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+DATABASE = '/tmp/cavote.db'
+PASSWD_SALT = 'change this value to some random chars!'
+SECRET_KEY = '{J@uRKO,xO-PK7B,jF?>iHbxLasF9s#zjOoy=+:'
+DEBUG = True
+TITLE = u"Cavote FFDN"
+EMAIL = '"' + TITLE + '"' + ' <' + u"cavote@ffdn.org" + '>'
+VERSION = "cavote 0.1.1"
+SMTP_SERVER = "127.0.0.1"
+PATTERNS = {u'Oui/Non': [u'Oui', u'Non'], u'Oui/Non/Blanc': [u'Oui', u'Non', u'Blanc'], u'Oui/Non/Peut-être': [u'Oui', u'Non', u'Peut-être']}