-
Notifications
You must be signed in to change notification settings - Fork 10
/
admin.py
39 lines (29 loc) · 867 Bytes
/
admin.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
#coding:utf-8
import datetime
from flask import Flask
from flask.ext import admin
from flask.ext.mongoengine import MongoEngine
from flask.ext.admin.contrib.mongoengine import ModelView
from flask.ext import admin, wtf
from wtforms import widgets
# Create application
from webadmin import app
from webadmin.modes import *
from webadmin.views import *
# Flask views
@app.route('/')
def index():
return '<a href="/admin/">Click me to get to Admin!</a>\
<br><a href="/cqlui/">Click me to get to CQL UI Tool!</a>\
<br><a href="/blacklist/">Click me to get to Blacklist Tool!</a>'
if __name__ == '__main__':
# Create admin
# Start app
import os
import sys
try:
if sys.argv[1] == 'debug':
app.debug = True
except:
pass
app.run('0.0.0.0', 9992)