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/>.
|
|
|
|
"""
|
2013-01-24 00:01:42 +01:00
|
|
|
from app import app
|
|
|
|
|
|
|
|
from api.controller.entries import *
|
|
|
|
from api.controller.accounts import *
|
2013-07-28 23:25:51 +02:00
|
|
|
from api.controller.scheduled_operations import *
|
2013-01-24 00:01:42 +01:00
|
|
|
|
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('/')
|
2013-07-28 23:25:51 +02:00
|
|
|
def root():
|
|
|
|
return redirect('index.html')
|
|
|
|
|
|
|
|
@app.route('/index.html')
|
2013-03-20 17:03:25 +01:00
|
|
|
def index():
|
2013-07-28 23:25:51 +02:00
|
|
|
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
|
|
|
|
|
2013-01-24 00:01:42 +01:00
|
|
|
if __name__ == '__main__':
|
|
|
|
app.run(debug=True)
|
|
|
|
|