Added default redirect to Monkey Island

This commit is contained in:
daniel goldberg 2016-08-22 19:29:44 +03:00
parent 67d77408f6
commit ceabd8ddd0
1 changed files with 6 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import sys
import array
import struct
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.pymongo import PyMongo
from flask import make_response
@ -387,6 +387,11 @@ def send_admin(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}
api = restful.Api(app)
api.representations = DEFAULT_REPRESENTATIONS