add auto datetime and year
This commit is contained in:
parent
6d4f77a92a
commit
64fba789d0
@ -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():
|
||||
|
||||
@ -153,7 +153,7 @@
|
||||
|
||||
<!-- Copyright -->
|
||||
<div class="text-center p-3" style="background-color: rgba(0, 0, 0, 0.2);">
|
||||
© {{ moment().format('YYYY') }} Copyright:
|
||||
© {{ now.year }} Copyright:
|
||||
<a class="text-dark" href="http://klintorg.ru">klintorg.ru</a>
|
||||
</div>
|
||||
<!-- Copyright -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user