forked from p15670423/monkey
Added default redirect to Monkey Island
This commit is contained in:
parent
67d77408f6
commit
ceabd8ddd0
|
@ -5,7 +5,7 @@ import sys
|
||||||
import array
|
import array
|
||||||
import struct
|
import struct
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
from flask import Flask, request, abort, send_from_directory
|
from flask import Flask, request, abort, send_from_directory, redirect
|
||||||
from flask.ext import restful
|
from flask.ext import restful
|
||||||
from flask.ext.pymongo import PyMongo
|
from flask.ext.pymongo import PyMongo
|
||||||
from flask import make_response
|
from flask import make_response
|
||||||
|
@ -387,6 +387,11 @@ def send_admin(path):
|
||||||
return send_from_directory('admin/ui', path)
|
return send_from_directory('admin/ui', path)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/")
|
||||||
|
def send_to_default():
|
||||||
|
return redirect('/admin/index.html')
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_REPRESENTATIONS = {'application/json': output_json}
|
DEFAULT_REPRESENTATIONS = {'application/json': output_json}
|
||||||
api = restful.Api(app)
|
api = restful.Api(app)
|
||||||
api.representations = DEFAULT_REPRESENTATIONS
|
api.representations = DEFAULT_REPRESENTATIONS
|
||||||
|
|
Loading…
Reference in New Issue