예제 #1
0
def index():
    if flask.request.method == 'POST':
        try:
            form_data = flask.json.loads(next(flask.request.form.keys()))
        except StopIteration:
            return flask.jsonify(submit=False)
        if issue.create_issue(form_data['title'], form_data['message']):
            return flask.jsonify(submit=True)
        return flask.jsonify(submit=False)
    return app.send_static_file("index.html")
예제 #2
0
def login():
    if flask.request.method == 'POST':
        try:
            form_data = flask.json.loads(next(flask.request.form.keys()))
        except StopIteration:
            return flask.jsonify(login=False)
        if login_service.login_account(form_data['username'],
                                       form_data['password']):
            return flask.jsonify(login=True)
        return flask.jsonify(login=False)
    return app.send_static_file("login.html")
예제 #3
0
def task():
    return app.send_static_file("task.html")
예제 #4
0
def vote():
    return app.send_static_file("vote.html")
예제 #5
0
def favicon():
    return app.send_static_file('favicon.ico')
예제 #6
0
def record():
    return app.send_static_file("records.html")