import traceback
from cheroot import wsgi
import os
import functools
import flask
from flask import render_template

application = app = flask.Flask(__name__)
app.config['TEMPLATES_AUTO_RELOAD'] = True
@app.route('/')
def root():
    return render_template('index.html')

@app.route('/<anspath>')
def ans(anspath):
    if (anspath == 'favicon.ico'):
        return ''
    anspath = ''.join("/%02d" % int(i) for i in anspath.split('.')) + '/body.html'
    return render_template('ans.html', anspath=anspath)
