From fb7df37a905695b55bd5a1ca911219879b3b6171 Mon Sep 17 00:00:00 2001 From: Arnaud Delcasse Date: Mon, 3 Sep 2012 19:54:18 +0200 Subject: [PATCH] Separate configuration --- main.py | 10 +--------- settings.py.example | 12 ++++++++++++ 2 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 settings.py.example diff --git a/main.py b/main.py index 4bbd46c..5cc7e32 100755 --- 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 index 0000000..105d398 --- /dev/null +++ b/settings.py.example @@ -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']} -- 2.20.1