|
@@ -26,6 +26,7 @@ from flask import Flask, request, flash, render_template, url_for, Response, mak
|
26
|
26
|
import ConfigParser
|
27
|
27
|
from os import getenv
|
28
|
28
|
from searx.engines import search, categories
|
|
29
|
+from searx import settings
|
29
|
30
|
import json
|
30
|
31
|
|
31
|
32
|
cfg = ConfigParser.SafeConfigParser()
|
|
@@ -36,7 +37,7 @@ cfg.read('searx.conf')
|
36
|
37
|
|
37
|
38
|
|
38
|
39
|
app = Flask(__name__)
|
39
|
|
-app.secret_key = cfg.get('app', 'secret_key')
|
|
40
|
+app.secret_key = settings.secret_key
|
40
|
41
|
|
41
|
42
|
opensearch_xml = '''<?xml version="1.0" encoding="utf-8"?>
|
42
|
43
|
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
|
@@ -113,7 +114,7 @@ if __name__ == "__main__":
|
113
|
114
|
from gevent import monkey
|
114
|
115
|
monkey.patch_all()
|
115
|
116
|
|
116
|
|
- app.run(debug = cfg.get('server', 'debug')
|
117
|
|
- ,use_debugger = cfg.get('server', 'debug')
|
118
|
|
- ,port = int(cfg.get('server', 'port'))
|
|
117
|
+ app.run(debug = settings.debug
|
|
118
|
+ ,use_debugger = settings.debug
|
|
119
|
+ ,port = settings.port
|
119
|
120
|
)
|