diff --git a/accountant/__init__.py b/accountant/__init__.py index 94b0363..536645c 100644 --- a/accountant/__init__.py +++ b/accountant/__init__.py @@ -23,6 +23,7 @@ from flask_sqlalchemy import SQLAlchemy # The app app = Flask(__name__, static_folder=None, template_folder=None) +# Configure it from config.cfg. app.config.from_pyfile('config.cfg') app.config['SQLALCHEMY_ECHO'] = app.debug @@ -40,13 +41,8 @@ authorizations = { } } -api = Api(app, doc='/doc/', authorizations=authorizations) +api = Api(app, authorizations=authorizations, prefix='/api') CORS(app) # Load all views. from .views import * # flake8: noqa - -# Redirect / to API documentation. -@app.route('/') -def index(): - return redirect(url_for('doc'))