diff options
| author | asciimoo <asciimoo@gmail.com> | 2013-10-19 16:18:41 +0200 |
|---|---|---|
| committer | asciimoo <asciimoo@gmail.com> | 2013-10-19 16:18:41 +0200 |
| commit | 1b3712c1893ac730fed8c0eca7dd344595593fe7 (patch) | |
| tree | 6863e7679d608782497fecf6b0d0814a63708621 /searx/webapp.py | |
| parent | bbdd255407bf2a3ad2546ae032515443dfcb1830 (diff) | |
[enh] settings.py added
Diffstat (limited to 'searx/webapp.py')
| -rw-r--r-- | searx/webapp.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 4a1de7905..4e81ed093 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -26,6 +26,7 @@ from flask import Flask, request, flash, render_template, url_for, Response, mak import ConfigParser from os import getenv from searx.engines import search, categories +from searx import settings import json cfg = ConfigParser.SafeConfigParser() @@ -36,7 +37,7 @@ cfg.read('searx.conf') app = Flask(__name__) -app.secret_key = cfg.get('app', 'secret_key') +app.secret_key = settings.secret_key opensearch_xml = '''<?xml version="1.0" encoding="utf-8"?> <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> @@ -113,7 +114,7 @@ if __name__ == "__main__": from gevent import monkey monkey.patch_all() - app.run(debug = cfg.get('server', 'debug') - ,use_debugger = cfg.get('server', 'debug') - ,port = int(cfg.get('server', 'port')) + app.run(debug = settings.debug + ,use_debugger = settings.debug + ,port = settings.port ) |