21 lines
380 B
Python
21 lines
380 B
Python
import datetime
|
|
import flask
|
|
|
|
app = flask.Flask(__name__)
|
|
|
|
@app.context_processor
|
|
def inject_libs():
|
|
return {
|
|
'datetime': datetime
|
|
}
|
|
|
|
@app.route('/')
|
|
def index():
|
|
return flask.render_template('index.html', today=datetime.date.today())
|
|
|
|
@app.errorhandler(404)
|
|
def error_404(error):
|
|
return flask.render_template('error.html', error=error)
|
|
|
|
application = app
|