This repository has been archived by the owner on Jun 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.py
59 lines (49 loc) · 1.6 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/local/bin/python3.6
# coding: utf-8
# noinspection PyUnresolvedReferences
from common import *
# noinspection PyUnresolvedReferences
from andrew.dashboard import *
# noinspection PyUnresolvedReferences
from first.super_admin import *
# noinspection PyUnresolvedReferences
from first.stage1 import *
# noinspection PyUnresolvedReferences
from andrew.stage2 import *
# noinspection PyUnresolvedReferences
from first.stage3 import *
# noinspection PyUnresolvedReferences
from andrew.stage4 import *
# noinspection PyUnresolvedReferences
from first.stage5 import *
# noinspection PyUnresolvedReferences
from chat.chat import *
@app.error()
@app.error(400)
@app.error(401)
@app.error(402)
@app.error(403)
@app.error(404)
@app.error(405)
@app.error(500)
@app.error(501)
@app.error(502)
@app.error(503)
@view('errors')
def our_err(err):
return dict(e=err, ver=PROJECT_VERSION, date=str(datetime.now())[:-7])
@app.route('/static/<name:path>')
def static_handler(name):
return static_file(name, root='.')
@app.route ('/full_stats')
def stats():
projects = [i for i in Project.select().order_by(Project.create_time.desc())]
tickets = [i for i in Ticket.select().order_by(Ticket.add_time.desc())]
return template('stats.tpl', projects=projects, tickets=tickets, ver=PROJECT_VERSION, date=str(datetime.now())[:-7]);
from gevent import monkey
monkey.patch_os()
monkey.patch_time()
monkey.patch_thread(threading=False, _threading_local=False, Event=True, logging=True,
existing_locks=True)
monkey.patch_all(os=False, time=False, thread=False)
app.run(host='0.0.0.0', port=8080, debug=True, reloader=False)