diff --git a/__init__.py b/__init__.py index 548d910..22ddc25 100644 --- a/__init__.py +++ b/__init__.py @@ -1,5 +1,6 @@ from flask import Flask, render_template from flask_sqlalchemy import SQLAlchemy +from datetime import datetime app = Flask(__name__, static_folder='static', static_url_path='') @@ -30,6 +31,11 @@ menu = [ ] +@app.context_processor +def inject_now(): + return {'now': datetime.utcnow()} + + @app.route("/") @app.route("/home") def home(): diff --git a/templates/new_layout.html b/templates/new_layout.html index 8edec8c..5efd3ec 100644 --- a/templates/new_layout.html +++ b/templates/new_layout.html @@ -153,7 +153,7 @@
- © {{ moment().format('YYYY') }} Copyright: + © {{ now.year }} Copyright: klintorg.ru