aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/__init__.py
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2014-06-09 14:04:38 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2014-06-09 15:15:25 +0200
commit16ec162838eb8ab891f5b04351bb202d84a2b834 (patch)
tree975f0b567f48604f976adf35ba62f8a536a5ab16 /pyaggr3g470r/__init__.py
parentsupporting feed without date or with ill formated date (diff)
downloadnewspipe-16ec162838eb8ab891f5b04351bb202d84a2b834.tar.gz
newspipe-16ec162838eb8ab891f5b04351bb202d84a2b834.tar.bz2
newspipe-16ec162838eb8ab891f5b04351bb202d84a2b834.zip
making pyagregator runnable by apache
* adding bootstrap module for basic import * redoing logging (config, proper use of the logging module) * making secret part of config (random wouldn't work with apache since it uses different instances of python) * making server entry point not executing application if just imported * not writing file for opml when we can read it from memory
Diffstat (limited to 'pyaggr3g470r/__init__.py')
-rw-r--r--pyaggr3g470r/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pyaggr3g470r/__init__.py b/pyaggr3g470r/__init__.py
index 9dae02cb..5044d344 100644
--- a/pyaggr3g470r/__init__.py
+++ b/pyaggr3g470r/__init__.py
@@ -12,10 +12,12 @@ import conf
# Create Flask application
app = Flask(__name__)
-app.debug = True
+app.debug = conf.WEBSERVER_DEBUG
# Create dummy secrey key so we can use sessions
-app.config['SECRET_KEY'] = os.urandom(12)
+app.config['SECRET_KEY'] = getattr(conf, 'WEBSERVER_SECRET', None)
+if not app.config['SECRET_KEY']:
+ app.config['SECRET_KEY'] = os.urandom(12)
app.config['SQLALCHEMY_DATABASE_URI'] = conf.SQLALCHEMY_DATABASE_URI
db = SQLAlchemy(app)
bgstack15