accountant-ui/main.py

44 lines
1.3 KiB
Python
Raw Normal View History

2013-02-08 13:07:27 +01:00
"""
This file is part of Accountant.
Accountant is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Foobar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
"""
from app import app
from api.controller.entries import *
from api.controller.accounts import *
from api.controller.scheduled_operations import *
2013-07-30 21:29:47 +02:00
from flask import redirect, render_template, jsonify
2013-03-20 17:03:25 +01:00
@app.route('/')
def root():
return redirect('index.html')
@app.route('/index.html')
2013-03-20 17:03:25 +01:00
def index():
return render_template('index.html')
@app.route('/scheduler.html')
def scheduler():
return render_template('scheduler.html')
2013-03-20 17:03:25 +01:00
2013-07-30 21:29:47 +02:00
@app.errorhandler(BaseException)
def default_errorhandler(error):
return jsonify(title="Error", text="Error %s" % str(error)), 500
if __name__ == '__main__':
app.run(debug=True)